From a1ca162fd6e8f6f5b1171e8d8f1c6b7b1973e353 Mon Sep 17 00:00:00 2001 From: Matthieu Riegler Date: Tue, 2 May 2023 21:56:37 +0200 Subject: [PATCH] docs(docs-infra): Remove unused annotation template (#50114) This page is unused since v7. PR Close #50114 --- .../templates/api/includes/annotations.html | 13 ------------- packages/core/src/di/injectable.ts | 1 - packages/core/src/di/metadata.ts | 9 ++++----- packages/core/src/di/metadata_attr.ts | 1 - packages/core/src/metadata/di.ts | 12 +++--------- packages/core/src/metadata/directives.ts | 16 ++++++---------- packages/core/src/metadata/ng_module.ts | 1 - 7 files changed, 13 insertions(+), 40 deletions(-) delete mode 100644 aio/tools/transforms/templates/api/includes/annotations.html diff --git a/aio/tools/transforms/templates/api/includes/annotations.html b/aio/tools/transforms/templates/api/includes/annotations.html deleted file mode 100644 index ff0b6f6a193d8..0000000000000 --- a/aio/tools/transforms/templates/api/includes/annotations.html +++ /dev/null @@ -1,13 +0,0 @@ -{%- if doc.decorators.length %} -
-

Annotations

- - {%- for decorator in doc.decorators %} - @{$ decorator.name $}({$ decorator.arguments $}) - - {%- if not decorator.notYetDocumented %} - {$ decorator.description | marked $} - {%- endif %} - {%- endfor %} -
-{%- endif -%} diff --git a/packages/core/src/di/injectable.ts b/packages/core/src/di/injectable.ts index d92500e945931..9496c0090e12c 100644 --- a/packages/core/src/di/injectable.ts +++ b/packages/core/src/di/injectable.ts @@ -85,7 +85,6 @@ export interface Injectable { /** * Injectable decorator and metadata. * - * @Annotation * @publicApi */ export const Injectable: InjectableDecorator = makeDecorator( diff --git a/packages/core/src/di/metadata.ts b/packages/core/src/di/metadata.ts index 856ecd308c598..254ffcf6fbbcb 100644 --- a/packages/core/src/di/metadata.ts +++ b/packages/core/src/di/metadata.ts @@ -54,7 +54,6 @@ export interface Inject { /** * Inject decorator and metadata. * - * @Annotation * @publicApi */ export const Inject: InjectDecorator = attachInjectFlag( @@ -99,7 +98,7 @@ export interface Optional {} /** * Optional decorator and metadata. * - * @Annotation + * @publicApi */ export const Optional: OptionalDecorator = @@ -147,7 +146,7 @@ export interface Self {} /** * Self decorator and metadata. * - * @Annotation + * @publicApi */ export const Self: SelfDecorator = @@ -195,7 +194,7 @@ export interface SkipSelf {} /** * `SkipSelf` decorator and metadata. * - * @Annotation + * @publicApi */ export const SkipSelf: SkipSelfDecorator = @@ -238,7 +237,7 @@ export interface Host {} /** * Host decorator and metadata. * - * @Annotation + * @publicApi */ export const Host: HostDecorator = diff --git a/packages/core/src/di/metadata_attr.ts b/packages/core/src/di/metadata_attr.ts index dc7646db032db..a94b44114295d 100644 --- a/packages/core/src/di/metadata_attr.ts +++ b/packages/core/src/di/metadata_attr.ts @@ -56,7 +56,6 @@ export interface Attribute { /** * Attribute decorator and metadata. * - * @Annotation * @publicApi */ export const Attribute: AttributeDecorator = makeParamDecorator( diff --git a/packages/core/src/metadata/di.ts b/packages/core/src/metadata/di.ts index 4c2e3bf88e1f9..3e2d921312dfe 100644 --- a/packages/core/src/metadata/di.ts +++ b/packages/core/src/metadata/di.ts @@ -150,7 +150,6 @@ export interface ContentChildrenDecorator { * * {@example core/di/ts/contentChildren/content_children_example.ts region='Component'} * - * @Annotation */ (selector: ProviderToken|Function|string, opts?: { descendants?: boolean, @@ -165,7 +164,6 @@ export interface ContentChildrenDecorator { * Type of the ContentChildren metadata. * * - * @Annotation * @publicApi */ export type ContentChildren = Query; @@ -174,7 +172,6 @@ export type ContentChildren = Query; * ContentChildren decorator and metadata. * * - * @Annotation * @publicApi */ export const ContentChildren: ContentChildrenDecorator = makePropDecorator( @@ -242,7 +239,6 @@ export interface ContentChildDecorator { * * {@example core/di/ts/contentChild/content_child_example.ts region='Component'} * - * @Annotation */ (selector: ProviderToken|Function|string, opts?: {descendants?: boolean, read?: any, static?: boolean}): any; @@ -261,7 +257,7 @@ export type ContentChild = Query; * ContentChild decorator and metadata. * * - * @Annotation + * * @publicApi */ @@ -328,7 +324,6 @@ export interface ViewChildrenDecorator { * * {@example core/di/ts/viewChildren/view_children_example.ts region='Component'} * - * @Annotation */ (selector: ProviderToken|Function|string, opts?: {read?: any, emitDistinctChangesOnly?: boolean}): any; @@ -346,7 +341,7 @@ export type ViewChildren = Query; /** * ViewChildren decorator and metadata. * - * @Annotation + * @publicApi */ export const ViewChildren: ViewChildrenDecorator = makePropDecorator( @@ -410,7 +405,6 @@ export interface ViewChildDecorator { * * {@example core/di/ts/viewChild/view_child_howto.ts region='HowTo'} * - * @Annotation */ (selector: ProviderToken|Function|string, opts?: {read?: any, static?: boolean}): any; new(selector: ProviderToken|Function|string, @@ -427,7 +421,7 @@ export type ViewChild = Query; /** * ViewChild decorator and metadata. * - * @Annotation + * @publicApi */ export const ViewChild: ViewChildDecorator = makePropDecorator( diff --git a/packages/core/src/metadata/directives.ts b/packages/core/src/metadata/directives.ts index ec001285c4821..52494e57b280e 100644 --- a/packages/core/src/metadata/directives.ts +++ b/packages/core/src/metadata/directives.ts @@ -98,7 +98,6 @@ export interface DirectiveDecorator { * accessible for components outside of the NgModule. * * - * @Annotation */ (obj?: Directive): TypeDecorator; @@ -111,7 +110,6 @@ export interface DirectiveDecorator { /** * Directive decorator and metadata. * - * @Annotation * @publicApi */ export interface Directive { @@ -291,7 +289,6 @@ export interface Directive { * } * ``` * - * @Annotation */ queries?: {[key: string]: any}; @@ -511,7 +508,6 @@ export interface ComponentDecorator { * To preserve sequences of whitespace characters, use the * `ngPreserveWhitespaces` attribute. * - * @Annotation */ (obj: Component): TypeDecorator; /** @@ -663,7 +659,7 @@ export interface Component extends Directive { /** * Component decorator and metadata. * - * @Annotation + * @publicApi */ export const Component: ComponentDecorator = makeDecorator( @@ -741,7 +737,7 @@ export interface Pipe { } /** - * @Annotation + * @publicApi */ export const Pipe: PipeDecorator = makeDecorator( @@ -820,7 +816,7 @@ export interface Input { } /** - * @Annotation + * @publicApi */ export const Input: InputDecorator = @@ -870,7 +866,7 @@ export interface Output { } /** - * @Annotation + * @publicApi */ export const Output: OutputDecorator = makePropDecorator('Output', (alias?: string) => ({alias})); @@ -929,7 +925,7 @@ export interface HostBinding { } /** - * @Annotation + * @publicApi */ export const HostBinding: HostBindingDecorator = @@ -1033,7 +1029,7 @@ export interface HostListener { * The global target names that can be used to prefix an event name are * `document:`, `window:` and `body:`. * - * @Annotation + * @publicApi */ export const HostListener: HostListenerDecorator = diff --git a/packages/core/src/metadata/ng_module.ts b/packages/core/src/metadata/ng_module.ts index 605ee7213df72..72006671a0e6e 100644 --- a/packages/core/src/metadata/ng_module.ts +++ b/packages/core/src/metadata/ng_module.ts @@ -203,7 +203,6 @@ export interface NgModule { } /** - * @Annotation */ export const NgModule: NgModuleDecorator = makeDecorator( 'NgModule', (ngModule: NgModule) => ngModule, undefined, undefined,