GeezerVison is showing github.com — Revert "docs(docs-infra): Remove unused annotation template (#50114)"… · angular/angular@9d4842c
File treeExpand file treeCollapse file tree Open diff view settings aio/tools/transforms/templates/api/includes
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboard +13Lines changed: 13 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +{%- if doc.decorators.length %} | | 2 | +<section class="annotations"> | | 3 | + <h2>Annotations</h2> | | 4 | + | | 5 | + {%- for decorator in doc.decorators %} | | 6 | + <code-example language="ts" hideCopy="true" class="no-box api-heading{% if decorator.deprecated %} deprecated-api-item{% endif %}">@{$ decorator.name $}({$ decorator.arguments $})</code-example> | | 7 | + | | 8 | + {%- if not decorator.notYetDocumented %} | | 9 | + {$ decorator.description | marked $} | | 10 | + {%- endif %} | | 11 | + {%- endfor %} | | 12 | +</section> | | 13 | +{%- endif -%} |
Collapse file Copy file name to clipboardExpand all lines: packages/core/src/di/injectable.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -85,6 +85,7 @@ export interface Injectable { | 85 | 85 | /** | 86 | 86 | * Injectable decorator and metadata. | 87 | 87 | * | | 88 | + * @Annotation | 88 | 89 | * @publicApi | 89 | 90 | */ | 90 | 91 | export const Injectable: InjectableDecorator = makeDecorator( | |
Collapse file Copy file name to clipboardExpand all lines: packages/core/src/di/metadata.ts +5-4Lines changed: 5 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -54,6 +54,7 @@ export interface Inject { | 54 | 54 | /** | 55 | 55 | * Inject decorator and metadata. | 56 | 56 | * | | 57 | + * @Annotation | 57 | 58 | * @publicApi | 58 | 59 | */ | 59 | 60 | export const Inject: InjectDecorator = attachInjectFlag( | @@ -98,7 +99,7 @@ export interface Optional {} | 98 | 99 | /** | 99 | 100 | * Optional decorator and metadata. | 100 | 101 | * | 101 | | -
| | 102 | + * @Annotation | 102 | 103 | * @publicApi | 103 | 104 | */ | 104 | 105 | export const Optional: OptionalDecorator = | @@ -146,7 +147,7 @@ export interface Self {} | 146 | 147 | /** | 147 | 148 | * Self decorator and metadata. | 148 | 149 | * | 149 | | -
| | 150 | + * @Annotation | 150 | 151 | * @publicApi | 151 | 152 | */ | 152 | 153 | export const Self: SelfDecorator = | @@ -194,7 +195,7 @@ export interface SkipSelf {} | 194 | 195 | /** | 195 | 196 | * `SkipSelf` decorator and metadata. | 196 | 197 | * | 197 | | -
| | 198 | + * @Annotation | 198 | 199 | * @publicApi | 199 | 200 | */ | 200 | 201 | export const SkipSelf: SkipSelfDecorator = | @@ -237,7 +238,7 @@ export interface Host {} | 237 | 238 | /** | 238 | 239 | * Host decorator and metadata. | 239 | 240 | * | 240 | | -
| | 241 | + * @Annotation | 241 | 242 | * @publicApi | 242 | 243 | */ | 243 | 244 | export const Host: HostDecorator = | |
Collapse file Copy file name to clipboardExpand all lines: packages/core/src/di/metadata_attr.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -56,6 +56,7 @@ export interface Attribute { | 56 | 56 | /** | 57 | 57 | * Attribute decorator and metadata. | 58 | 58 | * | | 59 | + * @Annotation | 59 | 60 | * @publicApi | 60 | 61 | */ | 61 | 62 | export const Attribute: AttributeDecorator = makeParamDecorator( | |
Collapse file Copy file name to clipboardExpand all lines: packages/core/src/metadata/di.ts +9-3Lines changed: 9 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -150,6 +150,7 @@ export interface ContentChildrenDecorator { | 150 | 150 | * | 151 | 151 | * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'} | 152 | 152 | * | | 153 | + * @Annotation | 153 | 154 | */ | 154 | 155 | (selector: ProviderToken<unknown>|Function|string, opts?: { | 155 | 156 | descendants?: boolean, | @@ -164,6 +165,7 @@ export interface ContentChildrenDecorator { | 164 | 165 | * Type of the ContentChildren metadata. | 165 | 166 | * | 166 | 167 | * | | 168 | + * @Annotation | 167 | 169 | * @publicApi | 168 | 170 | */ | 169 | 171 | export type ContentChildren = Query; | @@ -172,6 +174,7 @@ export type ContentChildren = Query; | 172 | 174 | * ContentChildren decorator and metadata. | 173 | 175 | * | 174 | 176 | * | | 177 | + * @Annotation | 175 | 178 | * @publicApi | 176 | 179 | */ | 177 | 180 | export const ContentChildren: ContentChildrenDecorator = makePropDecorator( | @@ -239,6 +242,7 @@ export interface ContentChildDecorator { | 239 | 242 | * | 240 | 243 | * {@example core/di/ts/contentChild/content_child_example.ts region='Component'} | 241 | 244 | * | | 245 | + * @Annotation | 242 | 246 | */ | 243 | 247 | (selector: ProviderToken<unknown>|Function|string, | 244 | 248 | opts?: {descendants?: boolean, read?: any, static?: boolean}): any; | @@ -257,7 +261,7 @@ export type ContentChild = Query; | 257 | 261 | * ContentChild decorator and metadata. | 258 | 262 | * | 259 | 263 | * | 260 | | -
| | 264 | + * @Annotation | 261 | 265 | * | 262 | 266 | * @publicApi | 263 | 267 | */ | @@ -324,6 +328,7 @@ export interface ViewChildrenDecorator { | 324 | 328 | * | 325 | 329 | * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'} | 326 | 330 | * | | 331 | + * @Annotation | 327 | 332 | */ | 328 | 333 | (selector: ProviderToken<unknown>|Function|string, | 329 | 334 | opts?: {read?: any, emitDistinctChangesOnly?: boolean}): any; | @@ -341,7 +346,7 @@ export type ViewChildren = Query; | 341 | 346 | /** | 342 | 347 | * ViewChildren decorator and metadata. | 343 | 348 | * | 344 | | -
| | 349 | + * @Annotation | 345 | 350 | * @publicApi | 346 | 351 | */ | 347 | 352 | export const ViewChildren: ViewChildrenDecorator = makePropDecorator( | @@ -405,6 +410,7 @@ export interface ViewChildDecorator { | 405 | 410 | * | 406 | 411 | * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'} | 407 | 412 | * | | 413 | + * @Annotation | 408 | 414 | */ | 409 | 415 | (selector: ProviderToken<unknown>|Function|string, opts?: {read?: any, static?: boolean}): any; | 410 | 416 | new(selector: ProviderToken<unknown>|Function|string, | @@ -421,7 +427,7 @@ export type ViewChild = Query; | 421 | 427 | /** | 422 | 428 | * ViewChild decorator and metadata. | 423 | 429 | * | 424 | | -
| | 430 | + * @Annotation | 425 | 431 | * @publicApi | 426 | 432 | */ | 427 | 433 | export const ViewChild: ViewChildDecorator = makePropDecorator( | |
Collapse file Copy file name to clipboardExpand all lines: packages/core/src/metadata/directives.ts +10-6Lines changed: 10 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -98,6 +98,7 @@ export interface DirectiveDecorator { | 98 | 98 | * accessible for components outside of the NgModule. | 99 | 99 | * | 100 | 100 | * | | 101 | + * @Annotation | 101 | 102 | */ | 102 | 103 | (obj?: Directive): TypeDecorator; | 103 | 104 |
| @@ -110,6 +111,7 @@ export interface DirectiveDecorator { | 110 | 111 | /** | 111 | 112 | * Directive decorator and metadata. | 112 | 113 | * | | 114 | + * @Annotation | 113 | 115 | * @publicApi | 114 | 116 | */ | 115 | 117 | export interface Directive { | @@ -289,6 +291,7 @@ export interface Directive { | 289 | 291 | * } | 290 | 292 | * ``` | 291 | 293 | * | | 294 | + * @Annotation | 292 | 295 | */ | 293 | 296 | queries?: {[key: string]: any}; | 294 | 297 |
| @@ -508,6 +511,7 @@ export interface ComponentDecorator { | 508 | 511 | * To preserve sequences of whitespace characters, use the | 509 | 512 | * `ngPreserveWhitespaces` attribute. | 510 | 513 | * | | 514 | + * @Annotation | 511 | 515 | */ | 512 | 516 | (obj: Component): TypeDecorator; | 513 | 517 | /** | @@ -659,7 +663,7 @@ export interface Component extends Directive { | 659 | 663 | /** | 660 | 664 | * Component decorator and metadata. | 661 | 665 | * | 662 | | -
| | 666 | + * @Annotation | 663 | 667 | * @publicApi | 664 | 668 | */ | 665 | 669 | export const Component: ComponentDecorator = makeDecorator( | @@ -737,7 +741,7 @@ export interface Pipe { | 737 | 741 | } | 738 | 742 |
| 739 | 743 | /** | 740 | | -
| | 744 | + * @Annotation | 741 | 745 | * @publicApi | 742 | 746 | */ | 743 | 747 | export const Pipe: PipeDecorator = makeDecorator( | @@ -816,7 +820,7 @@ export interface Input { | 816 | 820 | } | 817 | 821 |
| 818 | 822 | /** | 819 | | -
| | 823 | + * @Annotation | 820 | 824 | * @publicApi | 821 | 825 | */ | 822 | 826 | export const Input: InputDecorator = | @@ -866,7 +870,7 @@ export interface Output { | 866 | 870 | } | 867 | 871 |
| 868 | 872 | /** | 869 | | -
| | 873 | + * @Annotation | 870 | 874 | * @publicApi | 871 | 875 | */ | 872 | 876 | export const Output: OutputDecorator = makePropDecorator('Output', (alias?: string) => ({alias})); | @@ -925,7 +929,7 @@ export interface HostBinding { | 925 | 929 | } | 926 | 930 |
| 927 | 931 | /** | 928 | | -
| | 932 | + * @Annotation | 929 | 933 | * @publicApi | 930 | 934 | */ | 931 | 935 | export const HostBinding: HostBindingDecorator = | @@ -1029,7 +1033,7 @@ export interface HostListener { | 1029 | 1033 | * The global target names that can be used to prefix an event name are | 1030 | 1034 | * `document:`, `window:` and `body:`. | 1031 | 1035 | * | 1032 | | -
| | 1036 | + * @Annotation | 1033 | 1037 | * @publicApi | 1034 | 1038 | */ | 1035 | 1039 | export const HostListener: HostListenerDecorator = | |
Collapse file Copy file name to clipboardExpand all lines: packages/core/src/metadata/ng_module.ts +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -203,6 +203,7 @@ export interface NgModule { | 203 | 203 | } | 204 | 204 |
| 205 | 205 | /** | | 206 | + * @Annotation | 206 | 207 | */ | 207 | 208 | export const NgModule: NgModuleDecorator = makeDecorator( | 208 | 209 | 'NgModule', (ngModule: NgModule) => ngModule, undefined, undefined, | |
|