For example, a following signature of function f should be defined like function g with strictNullChecks option.
TypeScript Version: master
Code
functionf(a?: number){}f();f(0);f(undefined);functiong()functiong(a: number)functiong(a?: number){}g();g(0);g(undefined);Expected behavior:
$ node built/local/tsc.js --strictNullChecks index.ts
index.ts(5,3): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.
index.ts(13,3): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.
Actual behavior:
$ node built/local/tsc.js --strictNullChecks index.ts
index.ts(13,3): error TS2345: Argument of type 'undefined' is not assignable to parameter of type 'number'.
For example, a following signature of function
fshould be defined like functiongwith strictNullChecks option.TypeScript Version: master
Code
Expected behavior:
Actual behavior: