We need: - exact object type - match expression flow is still better at: - OO - nominal typing for classes, conforming to liskov substitution principles - first class opaque types - first class exact object types - better flow based inference - comment types - no extra dsl, full access to the language, so simple, so powerfull for the times you don't want transpilation phase - [edit] spread types map to spread in runt…
Ten Years of TypeScript
11–20 of 147 posts
Re: Ten Years of TypeScript
#12We need: - exact object type - match expression flow is still better at: - OO - nominal typing for classes, conforming to liskov substitution principles - first class opaque types - first class exact object types - better flow based inference - comment types - no extra dsl, full access to the language, so simple, so powerfull for the times you don't want transpilation phase - [edit] spread types map to spread in runt…
Re: Ten Years of TypeScript
#13Earlier quoted context omitted.
> TS is known to produce app bundles that perform slower than handwritten JS code Wrong. TS doesn’t bundle files. TS doesn’t produce code unless you target an earlier ES version than what you write, in which case there’s no way around it: native for-of loops and await/async will always be faster regardless of what you use to transpile it. I think you’re confusing the tool with something else.
Ts does produce code, ie. for enums, modules/namespaces.
Non-const enums and namespaces are probably the only aspects of typescript that actually have any significance at runtime, but they get compiled into simple objects. The compiler output is very close to what you'd write by hand. Take a look at this compiler output here [1].
Unless you're constantly recreating enums and namespaces inside of a loop (which you'd never do in real life code), I can't imagine there'd be any performance penalty.
[1] https://www.typescriptlang.org/play?target=99#code/HYQwtgpgz...
Re: Ten Years of TypeScript
#14Re: Ten Years of TypeScript
#15The number one problem with typescript is how slow it is. Compiling a 14k line project takes 5s. This is absurdly slow.
Re: Ten Years of TypeScript
#16Re: Ten Years of TypeScript
#17To me, that's saying something.
Re: Ten Years of TypeScript
#18We need: - exact object type - match expression flow is still better at: - OO - nominal typing for classes, conforming to liskov substitution principles - first class opaque types - first class exact object types - better flow based inference - comment types - no extra dsl, full access to the language, so simple, so powerfull for the times you don't want transpilation phase - [edit] spread types map to spread in runt…
The specifics of the proposal will likely shift a bit since it's still stage 1 (2?).
Re: Ten Years of TypeScript
#19The number one problem with typescript is how slow it is. Compiling a 14k line project takes 5s. This is absurdly slow.
Typescript by itself is just the language. You could try a different typescript compiler like esbuild for example.