TypeScript Version:
3853bb8 (master after merging #7140 )
Code
declare const foo: string;
console.log(foo);
tsc -t es5 --strictNullChecks ./foo.ts
Expected behavior:
Compiles.
Actual behavior:
foo.ts(2,13): error TS2454: Variable 'foo' is used before being assigned.
Allowing foo to be undefined makes it compile, but this shouldn't be required of course.
declare const foo: string | undefined;
console.log(foo);
TypeScript Version:
3853bb8 (master after merging #7140 )
Code
tsc -t es5 --strictNullChecks ./foo.tsExpected behavior:
Compiles.
Actual behavior:
foo.ts(2,13): error TS2454: Variable 'foo' is used before being assigned.Allowing
footo be undefined makes it compile, but this shouldn't be required of course.