fix(.d.ts): show unknown fields as ‘any’ not ‘void’.

Closes #3637
This commit is contained in:
Misko Hevery 2015-08-19 20:36:57 -07:00
parent 9afcb00216
commit a0b240884b
1 changed files with 6 additions and 1 deletions

View File

@ -13,7 +13,12 @@
{$ member.name $}{% if member.optional %}?{% endif -%} {$ member.name $}{% if member.optional %}?{% endif -%}
{% if member.typeParameters %}<{% for typeParam in member.typeParameters %}{$ typeParam $}{% if not loop.last %}, {% endif %}{% endfor %}>{% 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.parameters -%}({% for param in member.parameters %}{$ param $}{% if not loop.last %}, {% endif %}{% endfor %}){%- endif -%}
{%- if member.returnType == 'Directive' %}: DirectiveAnnotation{%- elif member.returnType -%}: {$ member.returnType $}{%- else -%}: void {%- if member.returnType -%}
: {$ member.returnType $}
{%- elif member.parameters -%}
: void
{%- else -%}
: any
{%- endif -%}; {%- endif -%};
{%- endmacro -%} {%- endmacro -%}