Skip to content

Instantly share code, notes, and snippets.

@rogerpoon
Created January 12, 2019 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rogerpoon/30782fab0fbae3c4792ffa4bc6ed0339 to your computer and use it in GitHub Desktop.
Save rogerpoon/30782fab0fbae3c4792ffa4bc6ed0339 to your computer and use it in GitHub Desktop.
Typescript OOB
$ ./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