feat(typings): mark void methods in angular2.d.ts

Previously, when a return type was missing it
could have been any. But following #2746 we
require return types so remaining untyped returns
must be void.
This commit is contained in:
Alex Eagle 2015-07-06 12:23:11 -07:00
parent 2b45bd2a63
commit a56d33d7ca
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ declare module "{$ module.id $}" {
{$ member.name $}
{%- if member.optional %}?{% endif -%}
{%- if member.parameters %}({% for param in member.parameters %}{$ param $}{% if not loop.last %}, {% endif %}{% endfor %}){%- endif %}
{%- if member.returnType %}: {$ member.returnType $}{%- else -%}: any{% endif -%}
{%- if member.returnType %}: {$ member.returnType $}{%- else -%}: void{% endif -%}
;
{%- endfor %}
}

View File

@ -63,7 +63,7 @@ export class NgModel extends NgControl {
}
}
get control() { return this._control; }
get control(): Control { return this._control; }
get path(): List<string> { return []; }