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
-
There's a big discussion about this: https://github.com/microsoft/TypeScript/issues/1897 . The benefit seems extremely limited to me. Valid JSON is obviously a subset of `any`, but I can't think of a situation where that particular…
comment by kristiandupont · 2023-06-24 · in Why doesn't TypeScript properly type Object.keys? -
Runtime type information is against the goals of TypeScript. https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi... Edit: Non-goals: … 5. Add or rely on run-time type information in programs, or emit different code based on the…
comment by __ryan__ · 2023-06-24 · in Why doesn't TypeScript properly type Object.keys? -
I agree that it would be nice if it flagged this kind of thing. But TypeScript disagrees. https://github.com/microsoft/TypeScript/wiki/FAQ#why-are-fun...
comment by jjnoakes · 2023-06-23 · in Why [“1”,“2”,“3”].map(parseInt) yields [1, NaN, NaN] in JavaScript (2011) -
…output. .js file extensions have always worked in Typescript (going back to 0.x days). It was not. https://github.com/microsoft/TypeScript/issues/16577 There was proposal and PR, but It was rejected. When writing ESM in typescript, you…
comment by Chyzwar · 2023-06-20 · in ES Modules Are Terrible -
Unless you were using the (yet unimplemented) exact types in TS. https://github.com/Microsoft/TypeScript/issues/12936
comment by littlecranky67 · 2023-06-19 · in TypeScript 5.2's new keyword: 'Using' -
…about that type checker. The Typescript type checker is (or at least was) already Turing-complete ( https://github.com/microsoft/TypeScript/issues/14833 ) without fully supporting dependent types.
comment by Smaug123 · 2023-06-09 · in Free-types: Higher kinded types in TypeScript -
…https://blog.reverberate.org/2013/08/parsing-c-is-literally-... ), as is TypeScript's type system ( https://github.com/microsoft/TypeScript/issues/14833 ).
comment by armchairhacker · 2023-06-05 · in DreamBerd is a perfect programming language -
…[jest ESM support] https://github.com/jestjs/jest/issues/9430 [typescript extensions] https://github.com/microsoft/TypeScript/issues/16577 [typescript exports] https://github.com/microsoft/TypeScript/issues/33079 [node.js issues]…
comment by Chyzwar · 2023-05-31 · in ES modules: A cartoon deep-dive (2018) -
Maybe comment or check out https://github.com/microsoft/TypeScript/issues/54276 that proposes transformer plugins?
comment by re-thc · 2023-05-19 · in Ts-morph – programmatically manipulate TypeScript source code with TypeScript -
…[2] https://twitter.com/buildsghost/status/1301976526603206657 [3] https://github.com/microsoft/TypeScript/issues/14833
comment by Vaguely2178 · 2023-05-15 · in How to sell Elixir again -
…https://stackoverflow.com/questions/64495793/typescript-name... https://github.com/microsoft/TypeScript/issues/30994#issueco... (link to a specific comment) > Namespaces are probably never going away and, simultaneously, y
comment by nosianu · 2023-05-13 · in TypeScript team released an explorer for performance tuning -
How do you type class properties? https://github.com/microsoft/TypeScript/issues/26811
comment by brainzap · 2023-05-11 · in TS to JSDoc Conversion -
…> The spec is now an "archived" artifact and we won't be tracking defects against it anymore. - https://github.com/Microsoft/TypeScript/issues/15711
comment by capableweb · 2023-05-07 · in Ditching TypeScript for JavaScript -
This is an issue open for discussion since 2017 https://github.com/microsoft/TypeScript/issues/13347
comment by sakesun · 2023-04-16 · in Functional Programming with TypeScript's Type System -
…for that has a justification, but in contexts like this, I think it is a WAT-worthy interaction. https://github.com/microsoft/TypeScript/wiki/FAQ#why-are-fun...
comment by jjnoakes · 2023-03-30 · in Wat [video] (2012) -
…they're going to start introducing runtime constructs, which is an interesting plot twist [2]. [1] https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi... [2] https://medium.com/flow-type/clarity-on-flows-direction-and-...
comment by lewisl9029 · 2023-03-16 · in TypeScript 5.0 -
…code but... step by step. This seems like a big step for my personal TypeScript projects. :-D [1]: https://github.com/microsoft/TypeScript/pull/51669#issuecomm...
comment by veidr · 2023-03-16 · in TypeScript 5.0 -
Does Number.isInteger() still not serve as a Type Guard? https://github.com/microsoft/TypeScript/issues/21199#issueco...
comment by benatkin · 2023-03-16 · in TypeScript 5.0 -
From the PR ( https://github.com/microsoft/TypeScript/pull/51669 ): > New compiler options > - allowImportingTsExtensions: Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or…
comment by brundolf · 2023-03-16 · in TypeScript 5.0 -
…"strictest" mode, really). The "who should use this mode" section here I believe is still accurate: https://github.com/microsoft/TypeScript/pull/51669
comment by jakebailey · 2023-03-16 · in TypeScript 5.0 -
There's a full page of API breaks: https://github.com/microsoft/TypeScript/wiki/API-Breaking-Ch... Then, a new error about the deprecations of ancient options to be removed in 5.5: https://github.com/microsoft/TypeScript/issues/51909
comment by jakebailey · 2023-03-16 · in TypeScript 5.0 -
…the type system since template literal types landed, but I found this one particularly amusing. 0: https://github.com/microsoft/TypeScript/issues/14833 1: https://github.com/microsoft/TypeScript/issues/14833#issueco...
comment by eyelidlessness · 2023-03-12 · in TypeScripting the technical interview -
…more widely known, and which I once heard described as having "accidentally Turing-complete" types: https://github.com/microsoft/TypeScript/issues/14833
comment by cjbprime · 2023-03-12 · in TypeScripting the technical interview -
…you can imagine. This project[1] is one I actually return to frequently for practical ideas. 0: https://github.com/microsoft/TypeScript/issues/14833 1: https://github.com/sindresorhus/type-fest
comment by eyelidlessness · 2023-03-10 · in JavaScript and TypeScript features of the last 3 years -
I just learned that there’s an open issue [0], apparently for introducing a similar feature. [0]: https://github.com/microsoft/TypeScript/issues/43505
comment by Hackbraten · 2023-03-07 · in Parse, don't validate (2019) -
The Boolean one at least is pretty longstanding: https://github.com/microsoft/TypeScript/issues/16655 I imagine there are a lot of edge cases to wade through before mainlining.
comment by lelandfe · 2023-03-03 · in A 'CSS reset' for TypeScript, improving types for common JavaScript API's -
…but it looks it didn't went too far [2] [1]: https://flow.org/en/docs/types/comments/ [2]: https://github.com/microsoft/TypeScript/issues/9694
comment by augusto-moura · 2023-02-05 · in Jsdoc Cheatsheet -
…doable with mapped types in TS, to make it work without a compilation step though is pending on https://github.com/microsoft/TypeScript/issues/32063 Although in practice the mapped types to do this do slow down the typing service non…
comment by meandmycode · 2023-01-31 · in Ask HN: Do you use JSON Schema? Help us shape its future stability guarantees -
…where you have to import a file with the .js extension, despite the actual file being .ts: https://github.com/microsoft/TypeScript/issues/42151 , https://github.com/microsoft/TypeScript/issues/49083 , https://github.com/microsoft/TypeScript…
comment by noahtallen · 2023-01-30 · in Ask HN: Why does every package+module system become a Rube Goldberg machine? -
…specify what you are importing before what you import this from. It can help, and was addressed in https://github.com/microsoft/TypeScript/issues/31658 quite a while ago. Typescript already maps all the exports that are available and what…
comment by jayflux · 2023-01-09 · in Ideas for a JavaScript Stricter Mode -
Counter point - https://github.com/microsoft/TypeScript/blob/main/src/compil... - your task is to just make it a little bit faster. Where do you begin with a 2.65mb source file? It’s easy to miss the point of what the OP is saying here and…
comment by CraigJPerry · 2023-01-03 · in Modules, not microservices -
…checking [1]. The best you can do is run using --skipLibCheck to skip checking node_modules. [1] https://github.com/microsoft/TypeScript/issues/29651
comment by trinovantes · 2022-12-27 · in All I want for Christmas is these seven TypeScript improvements -
…types to be supported. There is an issue[1] about this which has been pending for 8 years. 1. https://github.com/microsoft/TypeScript/issues/1213
comment by prmph · 2022-12-26 · in All I want for Christmas is these seven TypeScript improvements -
Are we doing wishlists? All I want is the possibility of doing nominal typing. Hrmph: https://github.com/microsoft/TypeScript/issues/364 - https://github.com/microsoft/TypeScript/issues/4895
comment by scrollaway · 2022-12-26 · in All I want for Christmas is these seven TypeScript improvements -
If you were looking for an issue to subscribe to for the move to file feature, it’s here: https://github.com/microsoft/TypeScript/issues/29988 It’s a TypeScript language server issue
comment by jayflux · 2022-12-24 · in Ask HN: How do you usually handle refactoring in VS Code? -
…declares as a design goal that they don't use the type system to generate different code: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi... Meanwhile in Dart, you can write: double d = 1; In Dart, doubles and integers are…
comment by munificent · 2022-11-29 · in Dynamic types have the potential to be more than "no static types" -
…} Caveat is it takes a bit to convince TS this is sound, and you have to manually sync the names. ( https://github.com/microsoft/TypeScript/issues/32098 would help)
comment by jakear · 2022-11-17 · in Sparse array destructuring in JavaScript -
TypeScript has the same; the whole type checker is in one massive file with 46,393 lines: https://github.com/microsoft/TypeScript/blob/main/src/compil... IIRC they cited performance reasons when compiling the compiler for the decision not…
comment by 130e13a · 2022-11-08 · in CS quotes found while browsing Notepad++'s code -
Little mini example in terms of LSP behaviour is fixing this bug: https://github.com/microsoft/TypeScript/issues/37816 I edit the results of gotoDefinition on the way through so I always jump to the one I want.
comment by aidos · 2022-11-06 · in The type system is a programmer's best friend -
…They also talk of this in a design meeting [3] and a member of TS team seems committed to it. [1] https://github.com/microsoft/TypeScript/issues/50457 [2] https://github.com/microsoft/TypeScript/issues/51362 [3]…
comment by conaclos · 2022-11-03 · in PR that converts the TypeScript repo from namespaces to modules -
These days, it's tracked at https://github.com/microsoft/TypeScript/issues/27891 . I have a gameplan to drop this by another 7 MB (by turning our executables into ESM), probably for 5.0 as well if we decide that Node versions older than 12…
comment by jakebailey · 2022-11-03 · in PR that converts the TypeScript repo from namespaces to modules -
…install size issue back in 2018 and changing to modules seemed to have the biggest impact here! https://github.com/microsoft/TypeScript/issues/23339 For anyone curious, TS 1.0 was 7MB and today it’s 65MB.…
comment by styfle · 2022-11-03 · in PR that converts the TypeScript repo from namespaces to modules -
…the PR for it. There are many many issues opened related to this in github, but to give an example https://github.com/microsoft/TypeScript/issues/16577
comment by redox99 · 2022-11-02 · in PR that converts the TypeScript repo from namespaces to modules -
This could change with an ongoing work to allow ts extension [1]. [1] https://github.com/microsoft/TypeScript/issues/37582
comment by conaclos · 2022-11-02 · in PR that converts the TypeScript repo from namespaces to modules -
…It also makes interop between Node and Deno more painful. But there is hope on the horizon. :) See https://github.com/microsoft/TypeScript/issues/37582 which is referenced in the 4.9 Iteration Plan as "Support .ts as a Module Specifier for…
comment by lewisl9029 · 2022-11-02 · in PR that converts the TypeScript repo from namespaces to modules -
…Here's an example of the performance improvement that switching to ES modules alone can bring: https://github.com/microsoft/TypeScript/issues/39247 . [1] This is almost always true. A random exception to this is that some buggy compilers…
comment by constexpr · 2022-11-02 · in PR that converts the TypeScript repo from namespaces to modules -
…things like `Range<80, 120>` to clamp to a range. If something like "Negated types" ever happens ( https://github.com/Microsoft/TypeScript/pull/29317 ) it'll make even more options available. Also, if you haven't checked it out,…
comment by dimitropoulos · 2022-10-31 · in Protobuf-ES: Protocol Buffers TypeScript/JavaScript runtime -
…variance like Kotlin is still an open question and requires further investigation. [1]: https://github.com/microsoft/TypeScript/issues/14833 [2]: https://io.livecode.ch/learn/namin/unsound [3]: https://arxiv.org/abs/1605.05274 [4]:…
comment by bmc7505 · 2022-10-25 · in From zero to 10M lines of Kotlin -
…ergonomic, less time, etc) than 3rd party libs. TS devs really should reconsider this feature. https://github.com/microsoft/TypeScript/issues/15265
comment by yazaddaruvala · 2022-10-13 · in Hegel – An advanced static type checker for JavaScript