Skip to content

Commit

Permalink
fix(.d.ts): correct ComponentAnnotation inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
mhevery authored and jteplitz committed Jul 14, 2015
1 parent 06d8bbc commit 3a222ed
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions docs/dgeni-package/templates/type-definition.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%}

Expand All @@ -38,7 +37,7 @@
{%- 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) $}
Expand Down
6 changes: 1 addition & 5 deletions modules/angular2/angular2.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 3a222ed

Please sign in to comment.