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
-
…is a superset[1] of javascript, so typescript-only syntactic sugar is entirely to be expected. [1]: https://github.com/microsoft/TypeScript (repo description)
comment by maronato · 2022-01-20 · in TypeScript Features to Avoid -
A discussion on checked exceptions in TypeScript: https://github.com/microsoft/TypeScript/issues/13219
comment by WolfOliver · 2022-01-13 · in Does any other language than Java has the throws keyword to declare exceptions? -
…is U): U[]; Additionally, getting TS better at inferring type guards is an open issue (literally): https://github.com/microsoft/TypeScript/issues/38390
comment by amitport · 2022-01-06 · in Flatten Arrays in Vanilla JavaScript with Flat() and FlatMap() -
…but the ergonomics of `flatMap` type-wise are so much nicer! Just some interesting trivia. [0]: https://github.com/microsoft/TypeScript/issues/16069#issueco...
comment by jasonkillian · 2022-01-05 · in Flatten Arrays in Vanilla JavaScript with Flat() and FlatMap() -
https://github.com/microsoft/TypeScript/blob/main/src/compil...
comment by ameliaquining · 2022-01-01 · in Do we need a link step? -
Unfortunately the typescript definitions for these two methods haven't been written yet [1]. [1] https://github.com/microsoft/TypeScript/issues/47171
comment by ksbrooksjr · 2021-12-29 · in Using GroupBy on an array of objects in JavaScript -
> but it's not true of generics in most languages not sure how true that is. * TypeScript: https://github.com/microsoft/TypeScript/issues/14833 * Rust: https://sdleffler.github.io/RustTypeSystemTuringComplete/ * Haskell (GHC):…
comment by wk_end · 2021-12-27 · in A Review of the Zig Programming Language (Using Advent of Code 2021) -
…holder on this fork, but left the MIT license in place. How does this harm anyone? Here you go: https://github.com/microsoft/TypeScript Just fork TypeScript, change the copyright holder to yourself, and do what you want with it. I sure…
comment by thesuperbigfrog · 2021-12-25 · in Microsoft forked MIT licensed repo and changed the copyright [fixed] -
…JS++ cannot read TypeScript, it's a completely new/different language. [0] https://github.com/microsoft/TypeScript/issues/29651
comment by eatonphil · 2021-12-21 · in Speedy Web Compiler – a fast TypeScript/JavaScript compiler -
…and then you get both a TS type AND a JS parser/validator (which works as a TS typeguard). [1] https://github.com/microsoft/TypeScript/wiki/TypeScript-Desi... [2] https://github.com/colinhacks/zod
comment by kipple · 2021-12-13 · in Deno Joins TC39 -
…sure there's room to complain, unless you disagree with the direction they're taking the project: https://github.com/microsoft/TypeScript/blob/main/LICENSE.tx...
comment by TimTheTinker · 2021-12-13 · in Deno Joins TC39 -
…fan of TS, however, it's not likely ever going to be the thing that it's really close to being. [1] https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi...
comment by jollybean · 2021-12-13 · in Deno Joins TC39 -
…about it!). Looks like it's on the community's radar at least, so hopefully they fix it some day: https://github.com/Microsoft/TypeScript/issues/13347 Arrays are treated correctly though, at least: https://www.typescriptlang.org/play?#code/…
comment by brundolf · 2021-11-25 · in How JavaScript engines achieve great performance -
…if my code is ANY more robust than if I had written it in JavaScript. Record<> is broken/unsound: https://github.com/microsoft/TypeScript/issues/45335 Generics are wonky and sometimes wrong: https://github.com/microsoft/TypeScript/issues/31…
comment by ragnese · 2021-11-24 · in How JavaScript engines achieve great performance -
…structure with all the corresponding drawbacks. [0] https://stackoverflow.com/q/56034226/247441 [1] https://github.com/microsoft/TypeScript/issues/26223
comment by strogonoff · 2021-11-17 · in The perfect configuration format? Try TypeScript -
Yep, that is exactly what it is, just a simple GH webhook to azure develops / GitHub Actions trigger. https://github.com/microsoft/TypeScript/issues/46177#issueco...
comment by orta · 2021-11-04 · in TypeScript: Control flow analysis for destructured discriminated unions -
The PR is the article submitted in this thread, https://github.com/microsoft/TypeScript/pull/46266
comment by nextaccountic · 2021-11-04 · in TypeScript: Control flow analysis for destructured discriminated unions -
…2, // typo } x(y) The above is caught in Flow when exact types are enabled but not in TS. TS issue https://github.com/microsoft/TypeScript/issues/12936 TS has a concept of "freshness" which catches some of these mistakes when you construct…
comment by inbx0 · 2021-11-03 · in TypeScript: Control flow analysis for destructured discriminated unions -
Also: https://github.com/microsoft/TypeScript/pull/46429 . Anders is on a roll!
comment by sizediterable · 2021-11-03 · in TypeScript: Control flow analysis for destructured discriminated unions -
…this pull request, you can do the above. This can be convenient with patterns like reducers (see https://github.com/microsoft/TypeScript/issues/46143 for an example).
comment by arxanas · 2021-11-03 · in TypeScript: Control flow analysis for destructured discriminated unions -
…in Minor updates [1]) [0]: https://devblogs.microsoft.com/typescript/announcing-typescr... [1]: https://github.com/microsoft/TypeScript/issues/14116#issueco...
comment by j1elo · 2021-10-13 · in Tricks I wish I knew when I learned TypeScript -
…its history in [2]. [0] https://github.com/arcanis/typanion [1] https://github.com/jquense/yup [2] https://github.com/microsoft/TypeScript/issues/3628
comment by Etheryte · 2021-10-12 · in Tricks I wish I knew when I learned TypeScript -
…, and ponder applications to just-slightly-too-powerful type theories. Or https://github.com/Microsoft/TypeScript/issues/14833 .
comment by jerf · 2021-10-01 · in Where do type systems come from? (2017) -
…because it splits the TS community to those who write Deno and those who write regular TS. [1]: https://github.com/microsoft/TypeScript/issues/27481
comment by Ciantic · 2021-09-01 · in Deno Deploy Beta 2 -
…so it's consistent with not affecting code generation. (More Turing completeness discussion at https://github.com/Microsoft/TypeScript/issues/14833 ) Then there are other features that have no equivalent in JS. For example enums. And the…
comment by fulafel · 2021-08-24 · in Deno on MDN -
…but currently only via the tooling. It integrates with TS as a language service plugin ( https://github.com/Microsoft/TypeScript/wiki/Writing-a-Langu... ) so you get great warnings/errors, type inference and much more. To define standalone…
comment by somebee · 2021-08-17 · in Show HN: Imba – I have spent 7 years creating a programming language for the web -
…etc. can. They are upfront about this though and it's stated here in the design goals as a non-goal https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi...
comment by jamil7 · 2021-08-04 · in Are dynamic languages going to replace static languages? (2003) -
…for typescript or also implementing a second protocol that is sort of but not quite LSP. See https://github.com/microsoft/TypeScript/issues/39459
comment by thayne · 2021-07-19 · in Diffsitter: A tree-sitter based AST difftool to get meaningful semantic diffs -
…), Haskell, Rust ( https://sdleffler.github.io/RustTypeSystemTuringComplete/ ), Typescript ( https://github.com/Microsoft/TypeScript/issues/14833 ) ... Having a type system with generics and not being turing-complete as a result is the…
comment by jcelerier · 2021-07-08 · in Compiling Rust is NP-hard -
…wraps tsserver, but there is hope that microsoft could implement lsp protocol directly for tsserver https://github.com/microsoft/TypeScript/issues/39459#issueco... at which point the experience should be more comparable to coc.nvim. On a…
comment by mjlbach · 2021-07-03 · in Neovim v0.5 -
…of resolution, because the proposed fix (from a member of the TS team) has terrible performance: https://github.com/microsoft/TypeScript/issues/21699 But since React is a such a minor part of the JS/TS landscape, who can really blame the…
comment by stupidcar · 2021-06-28 · in Four approaches to implicit state in compound components, ranked -
…no more, and "inexact" types where such subtyping is allowed. TypeScript doesn't have this check ( https://github.com/Microsoft/TypeScript/issues/12936 ) and I've found it can be really error prone when you're wanting to return a copy of…
comment by seanwilson · 2021-06-26 · in Parse, Don't Validate (2019) -
Just adding a link for myself: https://github.com/Microsoft/TypeScript
comment by jcuenod · 2021-06-10 · in Ask HN: What's a good TS codebase to learn from? -
…This might be working well for M1, which has 4 high performance cores and 4 efficiency cores. [1]: https://github.com/microsoft/TypeScript/issues/30235
comment by jeswin · 2021-05-17 · in How M1 Macs feel faster than Intel models: it’s about QoS -
…that requires your input be below some threshold eg: `type Limit = 0..100;` See discussion here: https://github.com/Microsoft/TypeScript/issues/15480
comment by mbildner · 2021-05-15 · in Parsix: Parse Don't Validate -
This was kinda explored at the start of April this year: https://github.com/microsoft/TypeScript/pull/43480
comment by orta · 2021-05-07 · in JavaScript for Shell Scripting -
Do you know if that somehow fixes https://github.com/microsoft/TypeScript/issues/8677 ? That's still the most annoying thing about typescript for me.
comment by razze · 2021-04-20 · in Why we chose Elm for Humio’s web UI -
> Valid JavaScript is also valid Typescript. Unfortunately, no: https://github.com/microsoft/TypeScript/issues/1863
comment by Tade0 · 2021-03-10 · in Why Become a TypeScript Fan? -
…[1] https://v8.dev/blog [2] https://benchmarksgame-team.pages.debian.net/benchmarksgame/... [3] https://github.com/microsoft/TypeScript/pull/43035#issuecomm...
comment by Chyzwar · 2021-03-05 · in It Can Happen to You -
…and then it wouldn't lie to you, but that would probably break a lot of people's code. EDIT: https://github.com/microsoft/TypeScript/issues/26188
comment by presentation · 2021-03-03 · in How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan -
Not doing runtime checks is a deliberate decision: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi... So Zod it is. I like it.
comment by gherkinnn · 2021-03-02 · in How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan -
…(I still think this is actually due to bug in TypeScript, see https://github.com/microsoft/TypeScript/issues/31990 .)
comment by evmar · 2021-03-02 · in How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan -
…protect us from our own code, but not external definitions/libraries. Relevant GitHub issue here — https://github.com/microsoft/TypeScript/issues/26188
comment by kipple · 2021-03-02 · in How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan -
Nominal types are on Typescript's roadmap: https://github.com/Microsoft/TypeScript/wiki/Roadmap Side note: An Introduction to Nominal TypeScript: What are nominal types and why should I use them? : https://medium.com/better-programming/nomi…
comment by eevilspock · 2021-02-17 · in Typing Is Hard -
This is being looked at https://github.com/microsoft/TypeScript/issues/31658
comment by jayflux · 2021-02-10 · in Using ES Modules in Node.js: A Practical Guide (Part 1) -
…"pedantic" option for index access [1]) option that would check against that potential errors. [1] https://github.com/microsoft/TypeScript/pull/39560
comment by mpawelski · 2021-02-06 · in Don't use functions as callbacks unless they're designed for it -
According to https://github.com/microsoft/TypeScript/wiki/Performance#pre... using union types in your example vs interfaces like #6 is bad for compilation performance.
comment by bengalister · 2021-02-02 · in Bad TypeScript Habits -
I hope Typescript will support Export Maps soon: https://github.com/microsoft/TypeScript/issues/33079
comment by wildpeaks · 2021-01-13 · in Get Ready for ESM -
…it is open-source.[0] It's sort of funny this pylance thing seems to suffer the same problem. [0]: https://github.com/microsoft/TypeScript/issues/39459
comment by prussian · 2021-01-10 · in Microsoft Refuses to Open Source VSCode Python Language Server