Created
January 12, 2019 01:41
-
-
Save rogerpoon/30782fab0fbae3c4792ffa4bc6ed0339 to your computer and use it in GitHub Desktop.
Typescript OOB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./node_modules/typescript/bin/tsc --version | |
Version 3.2.2 | |
$ cat test.ts | |
const xs: number[] = [1,2,3]; | |
let x:number = xs[100] // number, even with strictNullChecks | |
console.log(x); | |
$ time ./node_modules/typescript/bin/tsc --strictNullChecks test.ts | |
real 0m1.084s | |
user 0m1.692s | |
sys 0m0.016s | |
$ node test.js | |
undefined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment