Skip to content

Commit a56d33d

Browse files
committed
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.
1 parent 2b45bd2 commit a56d33d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/dgeni-package/templates/type-definition.template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
{$ member.name $}
4444
{%- if member.optional %}?{% endif -%}
4545
{%- if member.parameters %}({% for param in member.parameters %}{$ param $}{% if not loop.last %}, {% endif %}{% endfor %}){%- endif %}
46-
{%- if member.returnType %}: {$ member.returnType $}{%- else -%}: any{% endif -%}
46+
{%- if member.returnType %}: {$ member.returnType $}{%- else -%}: void{% endif -%}
4747
;
4848
{%- endfor %}
4949
}

modules/angular2/src/forms/directives/ng_model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class NgModel extends NgControl {
6363
}
6464
}
6565

66-
get control() { return this._control; }
66+
get control(): Control { return this._control; }
6767

6868
get path(): List<string> { return []; }
6969

0 commit comments

Comments
 (0)