chore(tsickle): add @Annotation annotations

This lets users continue using runtime-sideeffect Decorators if they choose,
only down-leveling the marked ones to Annotations.

Also remove the "skipTemplateCodegen" option, which is no longer needed
since Angular compiles with tsc-wrapped rather than ngc. The former doesn't
include any codegen.
This commit is contained in:
Alex Eagle
2016-06-15 06:58:57 -07:00
parent c60ef45bc8
commit 37b617dccf
37 changed files with 37 additions and 106 deletions

View File

@ -60,18 +60,21 @@ export interface SkipSelfMetadataFactory {
/**
* Factory for creating {@link InjectMetadata}.
* @stable
* @Annotation
*/
export var Inject: InjectMetadataFactory = makeParamDecorator(InjectMetadata);
/**
* Factory for creating {@link OptionalMetadata}.
* @stable
* @Annotation
*/
export var Optional: OptionalMetadataFactory = makeParamDecorator(OptionalMetadata);
/**
* Factory for creating {@link InjectableMetadata}.
* @stable
* @Annotation
*/
export var Injectable: InjectableMetadataFactory =
<InjectableMetadataFactory>makeDecorator(InjectableMetadata);
@ -79,17 +82,20 @@ export var Injectable: InjectableMetadataFactory =
/**
* Factory for creating {@link SelfMetadata}.
* @stable
* @Annotation
*/
export var Self: SelfMetadataFactory = makeParamDecorator(SelfMetadata);
/**
* Factory for creating {@link HostMetadata}.
* @stable
* @Annotation
*/
export var Host: HostMetadataFactory = makeParamDecorator(HostMetadata);
/**
* Factory for creating {@link SkipSelfMetadata}.
* @stable
* @Annotation
*/
export var SkipSelf: SkipSelfMetadataFactory = makeParamDecorator(SkipSelfMetadata);

View File

@ -471,6 +471,7 @@ export interface HostListenerMetadataFactory {
*
* {@example core/ts/metadata/metadata.ts region='component'}
* @stable
* @Annotation
*/
export var Component: ComponentMetadataFactory =
<ComponentMetadataFactory>makeDecorator(ComponentMetadata, (fn: any) => fn.View = View);
@ -854,6 +855,7 @@ export var Component: ComponentMetadataFactory =
* the instantiated
* view occurs on the second `<li></li>` which is a sibling to the `<template>` element.
* @stable
* @Annotation
*/
export var Directive: DirectiveMetadataFactory =
<DirectiveMetadataFactory>makeDecorator(DirectiveMetadata);
@ -888,6 +890,7 @@ export var Directive: DirectiveMetadataFactory =
* }
* ```
* @deprecated
* @Annotation
*/
var View: ViewMetadataFactory =
<ViewMetadataFactory>makeDecorator(ViewMetadata, (fn: any) => fn.View = View);
@ -909,6 +912,7 @@ var View: ViewMetadataFactory =
*
* {@example core/ts/metadata/metadata.ts region='attributeMetadata'}
* @stable
* @Annotation
*/
export var Attribute: AttributeMetadataFactory = makeParamDecorator(AttributeMetadata);
@ -1020,6 +1024,7 @@ export var Attribute: AttributeMetadataFactory = makeParamDecorator(AttributeMet
* The injected object is an unmodifiable live list.
* See {@link QueryList} for more details.
* @deprecated
* @Annotation
*/
export var Query: QueryMetadataFactory = makeParamDecorator(QueryMetadata);
@ -1044,6 +1049,7 @@ export var Query: QueryMetadataFactory = makeParamDecorator(QueryMetadata);
* }
* ```
* @stable
* @Annotation
*/
export var ContentChildren: ContentChildrenMetadataFactory =
makePropDecorator(ContentChildrenMetadata);
@ -1078,6 +1084,7 @@ export var ContentChildren: ContentChildrenMetadataFactory =
* </container>
* ```
* @stable
* @Annotation
*/
export var ContentChild: ContentChildMetadataFactory = makePropDecorator(ContentChildMetadata);
@ -1161,6 +1168,7 @@ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(Content
*
* See also: [ViewChildrenMetadata]
* @stable
* @Annotation
*/
export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChildrenMetadata);
@ -1235,6 +1243,7 @@ export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChi
* ```
* See also: [ViewChildMetadata]
* @stable
* @Annotation
*/
export var ViewChild: ViewChildMetadataFactory = makePropDecorator(ViewChildMetadata);
@ -1274,6 +1283,7 @@ export var ViewChild: ViewChildMetadataFactory = makePropDecorator(ViewChildMeta
* The injected object is an iterable and observable live list.
* See {@link QueryList} for more details.
* @deprecated
* @Annotation
*/
export var ViewQuery: QueryMetadataFactory = makeParamDecorator(ViewQueryMetadata);
@ -1285,6 +1295,7 @@ export var ViewQuery: QueryMetadataFactory = makeParamDecorator(ViewQueryMetadat
*
* {@example core/ts/metadata/metadata.ts region='pipe'}
* @stable
* @Annotation
*/
export var Pipe: PipeMetadataFactory = <PipeMetadataFactory>makeDecorator(PipeMetadata);
@ -1330,6 +1341,7 @@ export var Pipe: PipeMetadataFactory = <PipeMetadataFactory>makeDecorator(PipeMe
* bootstrap(App);
* ```
* @stable
* @Annotation
*/
export var Input: InputMetadataFactory = makePropDecorator(InputMetadata);
@ -1375,6 +1387,7 @@ export var Input: InputMetadataFactory = makePropDecorator(InputMetadata);
* bootstrap(App);
* ```
* @stable
* @Annotation
*/
export var Output: OutputMetadataFactory = makePropDecorator(OutputMetadata);
@ -1414,6 +1427,7 @@ export var Output: OutputMetadataFactory = makePropDecorator(OutputMetadata);
* bootstrap(App);
* ```
* @stable
* @Annotation
*/
export var HostBinding: HostBindingMetadataFactory = makePropDecorator(HostBindingMetadata);
@ -1452,5 +1466,6 @@ export var HostBinding: HostBindingMetadataFactory = makePropDecorator(HostBindi
* bootstrap(App);
* ```
* @stable
* @Annotation
*/
export var HostListener: HostListenerMetadataFactory = makePropDecorator(HostListenerMetadata);