microsoft/TypeScript
View on GitHub ↗ ★ 111,716 Go
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
617 mentions on Hacker News by 467 people: 78 stories, 539 comments · first 2014-07-23 · latest 2026-10-20
20082026
-
…type A ≠ string-equivalent type B), though there's ongoing discussion around adding it ( https://github.com/Microsoft/TypeScript/issues/202 ).
comment by crooked-v · 2021-01-05 · in GUIDs Are Not the Only Answer -
In poking around, I found this: https://github.com/microsoft/TypeScript/issues/14833 Where someone actually implements a compile-time check for prime numbers. I guess saying that it _can't_ be done is inaccurate. It's just absolutely…
comment by amw-zero · 2021-01-05 · in Verified Programming in F*: A Tutorial -
…programming in TypeScript. I haven't given a close look yet, but here are some relevant links: - https://github.com/microsoft/TypeScript/issues/31364 - https://johtela.github.io/litscript/ - https://mistlog.github.io/ray-tracing/index.html
comment by hoten · 2020-12-31 · in Interview Transcript – Donald Knuth [pdf] -
…the system extensible so that external tools can use the compiler for more complex build workflows. https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi...
comment by 205g0 · 2020-12-10 · in Deno 1.6 supports compiling TypeScript to a single executable -
…In fact, the skipLibCheck flag was originally developed to improve NativeScript compile time: https://github.com/microsoft/TypeScript/issues/8521 Unfortunately, editing still feels slow to me when including NativeScript’s iOS/Android types…
comment by LinguaBrowse · 2020-11-25 · in Tips for Performant TypeScript -
…looked at the server logs (using the instructions on this page). That quickly led me to this bug: https://github.com/microsoft/TypeScript/issues/35036 . Even though it took a while to get fixed, I felt immensely better that the problem was…
comment by danvk · 2020-11-24 · in Tips for Performant TypeScript -
…are more performant on newer versions. (Notion is stuck on 3.4 because of this issue: https://github.com/microsoft/TypeScript/issues/31445 )
comment by jitl · 2020-11-24 · in Tips for Performant TypeScript -
…this. One of my colleagues wrote up on his work on TypeScript 4.1's `--generateTrace` flag: https://github.com/microsoft/TypeScript/wiki/Performance-Tra... That page can give some guidance on diagnosing what the compiler's time is going…
comment by DanRosenwasser · 2020-11-24 · in Tips for Performant TypeScript -
…code. In my opinion, both of those are far more important than small changes in compile time. [0] https://github.com/microsoft/TypeScript/wiki/Performance#usi...
comment by Etheryte · 2020-11-24 · in Tips for Performant TypeScript -
…for JSON.parse() isn't inferred/deduced, it's explicit in lib.es5.d.ts (imported from lib.d.ts): https://github.com/microsoft/TypeScript/blob/master/lib/lib.... You could provide your own lib.d.ts with `unknown` type returned for…
comment by WorldMaker · 2020-11-20 · in TypeScript 4.1 -
…[1] https://github.com/yarnpkg/berry/blob/f384f0f40e87d636e4021b... [2] https://github.com/microsoft/TypeScript/pull/35206
comment by acemarke · 2020-10-24 · in Node.js 15.0 -
…TypeScript team will show interest eventually and we'll be able to streamline the development. [1] https://github.com/microsoft/TypeScript/pull/35206
comment by arcatek · 2020-10-23 · in Node.js 15.0 -
Apparently for markting reasons. https://github.com/Microsoft/TypeScript/issues/14116#issueco...
comment by jp3141 · 2020-10-12 · in Sentimental Versioning -
…JS cruft. Apart from the i32, i64 stuff I guess. [1] https://github.com/tc39/proposal-temporal [2] https://github.com/Microsoft/TypeScript/pull/12253#issuecomm... [3] https://github.com/microsoft/TypeScript/issues/12936 [4]…
comment by inbx0 · 2020-09-28 · in Show HN: A SQL database implemented purely in TypeScript type annotations -
…it's basically the same :/ They're definition avoiding anything different now: see goal 6: https://github.com/microsoft/TypeScript/wiki/TypeScript-Desi...
comment by virtue3 · 2020-09-02 · in TypeScript is weakening the JavaScript ecosystem -
…at some point. (see other commends under my original). Your reasoning is unsound. I'm sorry. https://github.com/microsoft/TypeScript/wiki/TypeScript-Desi... Please see goal number 6. Typescript is an opensource language (probably in mostly…
comment by virtue3 · 2020-09-02 · in TypeScript is weakening the JavaScript ecosystem -
…years ago, and hilariously, someone linked that issue to the new types mentioned in this post :) https://github.com/microsoft/TypeScript/issues/14833 I've been using Typescript for years, and I still like it. But I'm starting to get…
comment by throwaway189262 · 2020-09-02 · in TypeScript: Template string types and mapped type 'as' clauses -
https://github.com/Microsoft/TypeScript/issues/467#issuecomm...
comment by ht85 · 2020-08-21 · in PHP 8.0.0 beta 2 -
…but is a major issue when you’re trying to prettify and overwrite the original source file. [1] https://github.com/Microsoft/TypeScript/wiki/Using-the-Compi... [2] https://github.com/microsoft/TypeScript/issues/39620
comment by wolfgang42 · 2020-08-09 · in Rome: A Linter for JavaScript and TypeScript -
…It's a bit complicated, what I just wrote about is reflected in the chart in step 4-6 here https://github.com/microsoft/TypeScript/issues/18442#issueco...
comment by desmap · 2020-08-07 · in Node Modules at War: Why CommonJS and ES Modules Can’t Get Along -
Not exactly sure what you mean but you can check this: https://github.com/microsoft/TypeScript/issues/2719
comment by fireattack · 2020-08-07 · in Node Modules at War: Why CommonJS and ES Modules Can’t Get Along -
fwiw, TypeScript and ES Modules are just not compatible and never will be: https://github.com/microsoft/TypeScript/issues/18442#issueco...
comment by desmap · 2020-08-06 · in Node Modules at War: Why CommonJS and ES Modules Can’t Get Along -
…can be done either via a library or by hand rolling it: - https://github.com/gcanti/newtype-ts - https://github.com/Microsoft/TypeScript/issues/4895#issuecom... but it isn't as nice as say Python's `typing.NewType` or Haskell's `newtype`
comment by emptysea · 2020-07-25 · in Understanding null safety in Dart -
…or even incorrect values for declared types. I understand 'incorrect values' (this is true, see https://github.com/Microsoft/TypeScript/issues/15480 ) . But TypeScript definitely doesn't like adding additional fields. Right now I'm working…
comment by nailer · 2020-07-09 · in Moving from TypeScript to Rust / WebAssembly -
…tps://medium.com/better-programming/nominal-typescript-eee... for example) and there is an open issue https://github.com/Microsoft/Typescript/issues/202 but it’s still not being considered for implementation as far as I remember.
comment by tigershark · 2020-07-09 · in Moving from TypeScript to Rust / WebAssembly -
…other long standing and heavily upvoded feature requests that maybe we'll get them one day :) [1] https://github.com/microsoft/TypeScript/issues/5453
comment by mpawelski · 2020-06-26 · in TypeScript 4.0 Beta -
…of the release notes made it sound pretty innocuous: "Getters/Setters are No Longer Enumerable". https://github.com/microsoft/TypeScript/issues/38568 https://github.com/microsoft/TypeScript/pull/32264
comment by nammi · 2020-06-26 · in TypeScript 4.0 Beta -
…I wouldn't disagree, but it'd be so useful! ¹ https://github.com/kentcdodds/babel-plugin-macros ² https://github.com/Microsoft/TypeScript/issues/16607
comment by lioeters · 2020-05-26 · in Show HN: PgTyped – Typesafe SQL in TypeScript and Postgres -
Worst case (MS moves to bad-acting), re: Deno—TypeScript can at least be forked for now https://github.com/Microsoft/TypeScript I'd love to see Mozilla hop on board with it
comment by 52-6F-62 · 2020-05-20 · in Embrace, Extend, and Extinguish -
…of answer my own question, there is one more "leak" I forgot about - array bounds are unchecked https://github.com/Microsoft/TypeScript/issues/11122 , which can give you `undefined` (though not `null`) without it being reflected in the…
comment by realharo · 2020-05-13 · in React Native for Windows and Mac -
…[1] http://loredanacirstea.github.io/es6-design-patterns/ [2] https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi... [3] http://learnyouahaskell.com/ (a bit dated though) [4] https://www.typescriptlang.org/docs/
comment by aastronaut · 2020-04-27 · in Eloquent JavaScript 3rd Edition (2018) -
…code everyday and most of it is functional. Things like fp-ts[1] make it even more enjoyable. [0] https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi... [1] https://github.com/gcanti/fp-ts
comment by iaml · 2020-03-20 · in RFC: Adopt a modern JavaScript framework for use with MediaWiki -
> https://github.com/microsoft/TypeScript/issues > Please count the number of open bugs You do realise the large number of open issues almost certainly relates to Typescript's compiler and language implementation? When a project is written…
comment by miffy900 · 2020-03-19 · in RFC: Adopt a modern JavaScript framework for use with MediaWiki -
> How does removing typescript help you? https://github.com/microsoft/TypeScript/issues Please count the number of open bugs JS tooling is already an enormous jenga tower as it is, with tooling breakages eating a double digit of developer…
comment by baybal2 · 2020-03-19 · in RFC: Adopt a modern JavaScript framework for use with MediaWiki -
…This approach (build runtime behavior that produces static types) is the intended one. [1] https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi...
comment by eyelidlessness · 2020-03-13 · in Designing the perfect TypeScript schema validation library -
…the type system. Instead, encourage programming patterns that do not require run-time metadata. [1] https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi...
comment by eyelidlessness · 2020-03-12 · in Designing the perfect TypeScript schema validation library -
…[1] https://github.com/prestodb/presto/blob/master/presto-parser... [2] https://github.com/microsoft/TypeScript/blob/master/src/comp...
comment by rajnathani · 2020-03-05 · in Why not to use (f)lex, yacc or bison -
…I ever found useful about TypeScript, while remaining completely unobtrusive otherwise[4]. 1. https://github.com/microsoft/TypeScript/issues/20774 2. https://ternjs.net/ 3. https://medium.com/@trukrs/type-safe-javascript-with-jsdoc-7... 4.…
comment by drderidder · 2020-02-03 · in TypeScript’s quirks: How inconsistencies make the language more complex -
…author could create suggestion on github to improve it and allow discriminator to be nested? [0] https://github.com/Microsoft/TypeScript/issues/12936#issueco... [1] https://github.com/Microsoft/TypeScript/issues/12936
comment by mpawelski · 2020-02-02 · in TypeScript’s quirks: How inconsistencies make the language more complex -
#private is coming soon, so that won't really be true any more. https://github.com/microsoft/TypeScript/pull/30829 You'll have class members with accessibility in their declaration, and real run-time encapsulation.
comment by recursive · 2020-02-01 · in TypeScript’s quirks: How inconsistencies make the language more complex -
…than type equivalence completeness If you would, please post it in issues, that'll be great https://github.com/microsoft/TypeScript/issues
comment by valand · 2020-01-25 · in Ask HN: TS: Why isn't union type in object field extracted to out of the object? -
…3 } if (props.type === 'b') { return 4 } } This second case is a bug in TSC, and is tracked in https://github.com/microsoft/TypeScript/issues/18319 . [0] https://www.typescriptlang.org/play/#code/AQ4FwTwBwU2AFATgey... [1]…
comment by bcherny · 2019-12-23 · in Simpler UI Logic With Finite State Machines -
…of other globally acknowledged standards such as https://blog.golang.org/go-fmt-your-code , https://github.com/microsoft/TypeScript/wiki/Coding-guidelin... , https://twitter.com/dan_abramov , etc, or self-made standards. You go follow…
comment by valand · 2019-12-10 · in Ask HN: How to improve code quality while maintaining decent velocity? -
…and library instances, can't say in what proportion), although it is still worth the expense. [0] https://github.com/microsoft/TypeScript/blob/master/scripts/...
comment by mtone · 2019-11-16 · in AMD Ryzen 9 3950X Review -
…args[0]; } (not tested) You'd have to spread the arguments or use call/bind/apply, though. [1]: https://github.com/microsoft/TypeScript/pull/24897
comment by nikeee · 2019-11-08 · in Parse, Don’t Validate -
…until JS has it or is close to having it. TypeScript is typed JavaScript, end of story. [1] https://github.com/Microsoft/TypeScript/issues/17718
comment by paulddraper · 2019-11-06 · in TypeScript 3.7 -
…(A | B) [] >. This issue is being tracked here and a fix seems to be already in the making: https://github.com/microsoft/TypeScript/issues/33752 https://github.com/microsoft/TypeScript/pull/33707
comment by graup · 2019-11-06 · in TypeScript 3.7 -
…Otherwise, you're left to creating a wrapper function and a custom ESlint rule. Edit: found it https://github.com/microsoft/TypeScript/issues/13778#issueco... The suggestion is to maintain your own copy of `index.d.ts` with the array…
comment by emptysea · 2019-11-05 · in TypeScript 3.7 -
Not really https://github.com/microsoft/TypeScript/issues/9235 Though with tuples, etc. being defined, maybe it's worth re-examining.
comment by Eyas · 2019-11-05 · in TypeScript 3.7