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
-
…a few of both - there were instances where some work could be done more lazily/minimally ( https://github.com/microsoft/TypeScript/pull/64476 ), and there were instances where we changed our allocation patterns and played around with some…
comment by DanRosenwasser · 2026-10-20 · in Tsrs: A Port of TypeScript to Rust -
…may be of interest: TypeScript’s language-service implementation of the “Move to file” refactor: https://github.com/microsoft/TypeScript/blob/main/src/servic... Documentation for how `typescript-language-server` exposes that refactor as an…
comment by henrymerrilees · 2026-07-29 · in Interview with Boris Cherny [video] -
…collaborate with the TypeScript team or hire one of the active external TypeScript contributors https://github.com/microsoft/TypeScript/graphs/contributors?... to add another backend (make a fork of tsgo as an option), whether that's…
comment by _chall_ · 2026-07-28 · in Scriptc by Vercel: TypeScript-to-Native compiler, no JavaScript engine in binary -
…dist/) and is supposed to run in both browser and Node. https://github.com/nodejs/node/issues/46006 https://github.com/microsoft/TypeScript/issues/16577
comment by ivanjermakov · 2026-07-02 · in Vite+ Beta -
…linked TS issue [1]. But I'm more curious: why did operator overloading in ES6 itself [2] die? [1] https://github.com/microsoft/TypeScript/issues/42218 [2] https://github.com/tc39/proposal-operator-overloading
comment by glkindlmann · 2026-05-27 · in TypeScript's number type is a lie -
…very comment where you were trying to make that point is causing me to second-guess myself. [0]: https://github.com/microsoft/TypeScript/blob/v6.0.3/src/lib/... [1]: https://tsplay.dev/N7rvBw [2]: https://tsplay.dev/Ndep0m
comment by matt_kantor · 2026-05-03 · in A couple million lines of Haskell: Production engineering at Mercury -
…can be backed by buffers other than ArrayBuffer, which is where the types [0] come from. [0] https://github.com/microsoft/TypeScript/blob/924810c077dd410...
comment by 85392_school · 2026-02-27 · in A better streams API is possible for JavaScript -
Actually... https://github.com/microsoft/TypeScript/issues/52924
comment by yawaramin · 2026-02-24 · in Goodbye InnerHTML, Hello SetHTML: Stronger XSS Protection in Firefox 148 -
…because it is written in native language instead of javascript. So to test it out I've opened https://github.com/microsoft/TypeScript/blob/main/src/compil... file and zed after "ctrl + o" command frizzed. Also when scrolling this file in…
comment by artur-gawlik · 2026-01-06 · in I switched from VSCode to Zed -
…also a slight performance caveat when it comes to interfaces vs intersections (&) to keep in mind: https://github.com/microsoft/Typescript/wiki/Performance#pre...
comment by spoiler · 2025-12-15 · in JSDoc is TypeScript -
…refuses to fix long standing issues preventing JSDOC from operating properly in VSC, for example https://github.com/microsoft/TypeScript/issues/16665
comment by Lorin · 2025-12-15 · in JSDoc is TypeScript -
…JSDoc-typed node modules require special configuration in consumers to be useful https://github.com/microsoft/TypeScript/issues/19145
comment by jcbhmr · 2025-12-15 · in JSDoc is TypeScript -
…a file with @typedef, it is automatically exported and there is nothing you can do to control that: https://github.com/microsoft/TypeScript/issues/46011 I tried making a library this way and lacking control over the visibility of the…
comment by llimllib · 2025-12-14 · in JSDoc is TypeScript -
https://github.com/microsoft/TypeScript/blob/main/LICENSE.tx... The license is Apache 2.0. With the trademark, they can tell everyone not to call their thing TypeScript but at this point, given the license, they can't tell them not to copy…
comment by lcnPylGDnU4H9OF · 2025-12-04 · in It’s time to free JavaScript (2024) -
…Not very expressive or clear. I think I hallucinated something closer to what is in this proposal: https://github.com/microsoft/TypeScript/issues/43505 I still think that the general idea of communicating what acceptable input is via the…
comment by kennywinker · 2025-11-23 · in `satisfies` is my favorite TypeScript keyword (2024) -
…someArr2 = flatten(someArr); // const someArr2: [1, 2, "a", readonly ["b", readonly ["c"]]] [1]: https://github.com/microsoft/TypeScript/blob/main/src/lib/es...
comment by pcthrowaway · 2025-11-23 · in `satisfies` is my favorite TypeScript keyword (2024) -
…but occasionally it proves useful. When designing the feature they collected some use cases: https://github.com/microsoft/TypeScript/issues/47920
comment by ameliaquining · 2025-11-23 · in `satisfies` is my favorite TypeScript keyword (2024) -
…from using let and const natively! So they don't transpile to ES5, and that is the issue. 1: https://github.com/microsoft/TypeScript/issues/52924
comment by inbx0 · 2025-10-03 · in The Temporal Dead Zone, or why the TypeScript codebase is full of var statements -
…https://github.com/i18next/i18next https://github.com/babel/babel https://github.com/microsoft/TypeScript https://github.com/lezer-parser https://github.com/lucide-icons/lucide https://github.com/mathjax/MathJax https://gith
comment by CMay · 2025-09-20 · in Less is safer: Reducing the risk of supply chain attacks -
…than compiler code you don't. 1 - Demonstration of the Turing-completeness of Typescript's types: https://github.com/microsoft/TypeScript/issues/14833 2 - Zod https://zod.dev/ 3 - Friendly Functions https://simpatico.io/test/friendly
comment by simpaticoder · 2025-09-17 · in Algebraic Types are not Scary -
…- https://github.com/python/mypy/tree/master/mypy - TypeScript mostly uses switch/case functions - https://github.com/microsoft/TypeScript/blob/main/src/compil... I'd be interested in analysis of why that is, but I suspect it's mainly style
comment by chubot · 2025-09-07 · in Baby's first type checker -
> you won’t see anything like this that compiles to javascript https://github.com/microsoft/TypeScript/issues/47658
comment by primering · 2025-08-17 · in Node.js is able to execute TypeScript files without additional configuration -
…about this, https://web.archive.org/web/20230916074647/https://deepkit.i... is a fascinating read. https://github.com/microsoft/TypeScript/issues/47658#issueco... provides context on why some of TypeScript's design goals around erasure…
comment by btown · 2025-08-14 · in VC-backed company just killed my EU trademark for a small OSS project -
…is that you get to use a ts-ignore if you can link it back to an open issue on the TS repo :) [1]: https://github.com/microsoft/TypeScript/issues/33912
comment by johnfn · 2025-08-04 · in A parser for TypeScript types, written in TypeScript types -
FYI, TypeScript's type system is turing-complete. https://github.com/Microsoft/TypeScript/issues/14833
comment by maxloh · 2025-08-04 · in A parser for TypeScript types, written in TypeScript types -
…as a default for all languages in VSCode [2] [0] https://prettier.io/docs/options#tab-width [1] https://github.com/microsoft/TypeScript/wiki/Coding-guidelin... [2] https://github.com/Microsoft/vscode/issues/41200 Edit: found the TS style…
comment by dimava · 2025-07-25 · in The Tabs vs. Spaces war is over, and spaces have emerged victorious -
Related https://github.com/microsoft/TypeScript/issues/54925 My specific use case is pattern matching http status codes to an expected response type, and today I'm able to work around it with this kind of construct…
comment by mnahkies · 2025-07-24 · in Use Your Type System -
…playground that has a PoC implementation: https://nikeee.github.io/typescript-intervals/ [1]: https://github.com/microsoft/TypeScript/issues/43505
comment by nikeee · 2025-07-24 · in Use Your Type System -
…Prettier, and any other tool in your workflow that embeds their own version of TypeScript... [1] https://github.com/microsoft/TypeScript/blob/81c951894e93bdc...
comment by aragonite · 2025-05-20 · in The emoji problem (2022) -
…seen much activity lately, but it would be good to highlight this library as another use case. [1]: https://github.com/microsoft/TypeScript/issues/33304
comment by spankalee · 2025-04-14 · in Show HN: Zero-codegen, no-compile TypeScript type inference from Protobufs -
…not clear when this would be a benefit over straight-forward code gen. Cool POC hack though. [1]: https://github.com/microsoft/TypeScript/issues/42219
comment by recursive · 2025-04-14 · in Show HN: Zero-codegen, no-compile TypeScript type inference from Protobufs -
…class members to be public within a library, but private outside it. It's been proposed since 2015: https://github.com/microsoft/TypeScript/issues/5228 Currently, you can use `@internal` in jsdoc, which with the `stripInternal` option in…
comment by mubou · 2025-04-11 · in What about a "preferred" keyword in TypeScript? -
…you can’t use symbols [1]. Author gives a valiant effort, but is defending the indefensible. [1] https://github.com/microsoft/TypeScript/issues/18408
comment by paulddraper · 2025-04-01 · in In Defence of TypeScript Enums -
…abstractions. Do you know that it's not guaranteed that your system clock is monotonic? [1] [0]: https://github.com/microsoft/TypeScript/wiki/Breaking-Change... [1]: https://github.com/rust-lang/rust/blob/e2223c94bf433fc38234d...
comment by xlii · 2025-03-28 · in Coordinating the Superbowl's visual fidelity with Elixir -
…type system is technically undecidable because you can interpret Turing machines with it: https://github.com/microsoft/TypeScript/issues/14833 The flip side is that such systems can still be practically useful. You just have to manage your…
comment by bubblyworld · 2025-03-13 · in Definite clause grammars and symbolic differentiation -
…point of the whole thing. [1]: https://github.com/evanw/esbuild/blob/main/cmd/esbuild/stdio... [2]: https://github.com/microsoft/TypeScript/wiki/Standalone-Serv...
comment by jchw · 2025-03-12 · in A 10x Faster TypeScript -
…flag [2], which disables features like enums that do emit code with runtime semantics. [1] https://github.com/microsoft/TypeScript/wiki/TypeScript-Desi... [2] https://www.typescriptlang.org/docs/handbook/release-notes/t...
comment by jakelazaroff · 2025-03-11 · in A 10x Faster TypeScript -
…addresses in the original post: you can annotate in the namespace, or the symbol values. [0]: https://github.com/microsoft/TypeScript/pull/61011#issuecomm...
comment by demurgos · 2025-03-06 · in An ode to TypeScript enums -
…or interface. `typeof class` might help, but I think they don't want to allow nominal interfaces: https://github.com/microsoft/TypeScript/issues/41824
comment by spankalee · 2025-03-03 · in An ode to TypeScript enums -
…not fully supported, nesting[1] is the example found first, but I thought there were others. [1] https://github.com/microsoft/TypeScript/issues/18758
comment by davorak · 2025-03-03 · in An ode to TypeScript enums -
…[0] https://www.typescriptlang.org/docs/handbook/release-notes/t... [1] https://github.com/microsoft/TypeScript/pull/61011 [2] No idea why on-site search doesn't pick this up: https://www.typescriptlang.org/docs/handbook/compiler-
comment by lelandfe · 2025-03-02 · in An ode to TypeScript enums -
…`ReturnType` type which is somewhat related to this[1]. [0]: https://tsplay.dev/Wy0Ogm [1]: https://github.com/microsoft/TypeScript/issues/55667
comment by matt_kantor · 2025-02-27 · in TypeScript types can run DOOM [video] -
…is Turing Complete (at least it was for 2.2) [0]. Regexes fundamentally can't do that [1]. [0] https://github.com/Microsoft/TypeScript/issues/14833 [1] https://en.wikipedia.org/wiki/Turing_completeness
comment by sn9 · 2025-02-27 · in TypeScript types can run DOOM [video] -
And yet it's still not possible to type tagged template literals... https://github.com/microsoft/TypeScript/pull/49552#issuecomm... Insane achievement nonetheless!
comment by porsager · 2025-02-26 · in TypeScript types can run DOOM [video] -
…is Turing-complete was shown back in 2017 [0], and then of course you can run Doom on it. [0] https://github.com/microsoft/TypeScript/issues/14833
comment by layer8 · 2025-02-26 · in TypeScript types can run DOOM [video] -
…ts-blank-space, which literally just replaces type declarations with whitespace [2]. [1] https://github.com/microsoft/TypeScript/issues/59601 [2] https://bloomberg.github.io/ts-blank-space/
comment by throwitaway1123 · 2025-01-20 · in TypeScript enums: use cases and alternatives -
…= { A: 0, A: 1, } as enum; [0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe... [1] https://github.com/microsoft/TypeScript/issues/59658
comment by conaclos · 2025-01-20 · in TypeScript enums: use cases and alternatives -
…the effort for adding these isn't worth it. But maybe someone likes it or takes it further. [1]: https://github.com/microsoft/TypeScript/issues/43505
comment by nikeee · 2024-11-01 · in Sets, types and type checking -
…// Why var? It avoids TDZ checks in the runtime which can be costly. // See: https://github.com/microsoft/TypeScript/issues/52924 /* eslint-disable no-var */ var deferredDiagnosticsCallbacks: (() => void)[] = [];
comment by dunham · 2024-10-10 · in Proposal: JavaScript Structs -
Not really - https://github.com/Microsoft/TypeScript/issues/16607 . ts-morph provides an easy way to use the TypeScript Compiler API to view and edit the AST before compile. Once you get your head around the API, which has good examples…
comment by mhio · 2024-10-10 · in Zod: TypeScript-first schema validation with static type inference