Hacker GitHub

← All repos

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

Mentions per year 617 mentions · busiest year 2022 (79)
20082026
  1. 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?
  2. 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…
  3. 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...
  4. …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
  5. 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'
  6. …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.
  7. …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
  8. …[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)
  9. Maybe comment or check out https://github.com/microsoft/TypeScript/issues/54276 that proposes transformer plugins?
  10. …[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
  11. …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
  12. How do you type class properties? https://github.com/microsoft/TypeScript/issues/26811
    comment by brainzap · 2023-05-11 · in TS to JSDoc Conversion
  13. …> 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
  14. This is an issue open for discussion since 2017 https://github.com/microsoft/TypeScript/issues/13347
  15. …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)
  16. …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
  17. …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
  18. 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
  19. 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
  20. …"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
  21. 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
  22. …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
  23. …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
  24. …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
  25. 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)
  26. 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.
  27. …included in TypeScript 5.0 planned for release on March 14th. TypeScript 5.0 Iteration Plan - https://github.com/microsoft/TypeScript/issues/51362
    comment by lioeters · 2023-02-13 · in <3 Deno
  28. …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
  29. …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…
  30. …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…
  31. …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
  32. 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
  33. …checking [1]. The best you can do is run using --skipLibCheck to skip checking node_modules. [1] https://github.com/microsoft/TypeScript/issues/29651
  34. …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
  35. 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
  36. 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
  37. …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…
  38. …} 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)
  39. 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…
  40. 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.
  41. …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]…
  42. 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…
  43. …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.…
  44. …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
  45. This could change with an ongoing work to allow ts extension [1]. [1] https://github.com/microsoft/TypeScript/issues/37582
  46. …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…
  47. …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…
  48. …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,…
  49. …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
  50. …ergonomic, less time, etc) than 3rd party libs. TS devs really should reconsider this feature. https://github.com/microsoft/TypeScript/issues/15265