You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior:
compiler error '7' is not type AllMembersOptional -- let a: AllMembersOptional = 7;
compiler error 'function: number' is not type AllMembersOptional -- let b: AllMembersOptional = () => 7;
Actual behavior:
no compiler errors or warnings and the following javascript is generated:
vara=7;varb=function(){return7;};
Actual example
Referencing angular.d.ts and converting an angular directive
options parameter cannot a function (or number or string etc).
Just about anything passed in for a parameter of an interface type with all optional parameters will be allowed by typescript
The text was updated successfully, but these errors were encountered:
TypeScript Version: 1.8.0 / nightly (2.0.0-dev.201xxxxx)
Code
Expected behavior:
compiler error '7' is not type AllMembersOptional -- let a: AllMembersOptional = 7;
compiler error 'function: number' is not type AllMembersOptional -- let b: AllMembersOptional = () => 7;
Actual behavior:
no compiler errors or warnings and the following javascript is generated:
Actual example
Referencing angular.d.ts and converting an angular directive
carelessly into a component
generates no typescript compiler error messages and will fail at run-time because the options parameter needs to be an object
options parameter cannot a function (or number or string etc).
Just about anything passed in for a parameter of an interface type with all optional parameters will be allowed by typescript
The text was updated successfully, but these errors were encountered: