fix(.d.ts): correct ComponentAnnotation inheritance

Closes #2356
This commit is contained in:
Misko Hevery 2015-07-03 10:53:07 +02:00 committed by Alex Eagle
parent 0052c6b120
commit 12a427e158
3 changed files with 3 additions and 9 deletions

View File

@ -9,7 +9,6 @@
interface List<T> extends Array<T> {}
interface Map<K,V> {}
interface StringMap<K,V> extends Map<K,V> {}
declare type Type = ng.Type;
declare module ng {
type SetterFn = typeof Function;

View File

@ -13,8 +13,7 @@
{$ member.name $}{% if member.optional %}?{% endif -%}
{% if member.typeParameters %}<{% for typeParam in member.typeParameters %}{$ typeParam $}{% if not loop.last %}, {% endif %}{% endfor %}>{% endif -%}
{%- if member.parameters -%}({% for param in member.parameters %}{$ param $}{% if not loop.last %}, {% endif %}{% endfor %}){%- endif -%}
{%- if member.returnType -%}
: {$ member.returnType $}{%- else -%}: void
{%- if member.returnType == 'Directive' %}: DirectiveAnnotation{%- elif member.returnType -%}: {$ member.returnType $}{%- else -%}: void
{%- endif -%};
{%- endmacro -%}
@ -38,7 +37,7 @@ declare module ng {
{%- if export.content -%}
{$ commentBlock(export, 3) $}
{%- endif %}
{$ export.docType $} {$ export.name $}{$ export.typeParams $}{$ export.heritage $}
{$ export.docType $} {$ export.name $}{$ export.typeParams $}{%- if export.heritage == ' extends Directive' %} extends DirectiveAnnotation{% else %}{$ export.heritage $}{% endif %}
{%- if export.docType == 'class' or export.docType == 'interface' %} {
{%- if export.newMember %}
{$ memberInfo(export.newMember) $}

View File

@ -11,13 +11,9 @@ export * from './angular2';
// 1) if the symbol is intended to be part of the public API, then re-export somewhere else
// 2) if the symbol should be omitted from the public API, then the class exposing it should
// not be exported, or should avoid exposing the symbol.
export {ProtoRecord, RecordType} from './src/change_detection/proto_record';
export * from './src/core/compiler/element_injector';
export {DependencyAnnotation} from './src/di/annotations_impl';
// FIXME: this is a workaround for https://github.com/angular/angular/issues/2356
// We export the Directive *annotation* instead of the *decorator*.
// But it breaks the build.
export {Directive, LifecycleEvent} from './src/core/annotations_impl/annotations';
export {LifecycleEvent} from './src/core/annotations_impl/annotations';
export {Form} from './src/forms/directives/form_interface';
export {TypeDecorator, ClassDefinition} from './src/util/decorators';
export {Query} from './src/core/annotations_impl/di';