Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
mohamedhegazy
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
mohamedhegazy
9y ago
No. TypeScript has no dependency on classes the way Java or C# does; nor is class-oriented code the recondeded style by the TS team. As a matter of fact the typescript compiler core is all written as functions and immmutable objects with no
2.
▲
by
mohamedhegazy
9y ago
you could. jsut add `@ts-check` in your .js file, open it in VSCode, or pass it to the `tsc --allowjs a.js` on the commandline.
3.
▲
by
mohamedhegazy
9y ago
TypeScript allows for JSDoc Comments for types in .js files with `--allowJs`. you do not need to change your code for that. See https://github.com/Microsoft/TypeScript/wiki/JSDoc-support-i...
4.
▲
by
mohamedhegazy
10y ago
TypeScript has `--target ESNext` this will strip out any TypeScript-specific type annotations, and leave you with standard-track-only JS code that looks identical to your input (modulo type annotations).
5.
▲
by
mohamedhegazy
10y ago
Without `--strictNullChecks`, both `undefined` and `null` are in the domain of all types.
6.
▲
by
mohamedhegazy
10y ago
`--noImplicitAny` is the recommended flag. It is not set by default to ease the use on JS code bases. The new changes makes `--noImplicitAny` require less type annotations; where the compiler can figure out the type of a variable through fo
7.
▲
by
mohamedhegazy
10y ago
You can just use `--target ESNext` and this will disable all ES features transformations and just erase types.
8.
▲
by
mohamedhegazy
10y ago
We have been testing this on insider builds of vscode for a few weeks as well as preview builds of visual studio with no issues. We were just notified today by npm that we are flooding their servers.
9.
▲
by
mohamedhegazy
10y ago
The TypeScript team will do feature work to minimize npm requests via a well-known cached list of packages.
10.
▲
by
mohamedhegazy
10y ago
async-await transpilation for ES5/ES3 target is already available in the nightly drops of TS (`typescript@next`).
11.
▲
by
mohamedhegazy
10y ago
async-await for ES5/ES3 is already available in `typescript@next`. give it a try.
12.
▲
by
mohamedhegazy
11y ago
If you are using VS 2015, TypeScript is accessible through the Extensions & updates window. For downloading plugin for VS 2015 available at: http://www.microsoft.com/en-us/download/details.aspx?id=4859... and V