Hacker GitHub

← All repos

tc39/proposal-type-annotations

View on GitHub ↗ ★ 4,388 JavaScript

ECMAScript proposal for type syntax that is erased - Stage 1

82 mentions on Hacker News by 66 people: 5 stories, 77 comments · first 2022-03-09 · latest 2026-05-22

Mentions per year 82 mentions · busiest year 2022 (24)
20082026
  1. …projects), but I don't think it went anywhere... or if it is it's getting there at a snail's pace: https://github.com/tc39/proposal-type-annotations
    comment by IshKebab · 2026-05-22 · in Deno 2.8
  2. Because standardization is a political process that takes time and consensus to achieve? https://github.com/tc39/proposal-type-annotations
    comment by WorldMaker · 2026-05-22 · in Deno 2.8
  3. …want the whole type zoo. For your Javascript f/end context, I like the proposed TC39 approach ( https://github.com/tc39/proposal-type-annotations?tab=readme... ). The typing is optional, does not break existing syntax and can still be used…
    comment by lelanthran · 2026-01-24 · in Some C habits I employ for the modern day
  4. Sorry, I should have been clearer about which proposal I was talking about: https://github.com/tc39/proposal-type-annotations
    comment by lelanthran · 2025-12-23 · in Test, don't just verify
  5. Not really, at best it's a verbose and limited subset. https://github.com/tc39/proposal-type-annotations?tab=readme...
    comment by epolanski · 2025-12-14 · in JSDoc is TypeScript
  6. The sooner we get https://github.com/tc39/proposal-type-annotations , the better. Once we get it, there is still a solid decade before runtimes support it, and optimistically, still more 10 years minimum having to deal with an interpreted…
    comment by gaigalas · 2025-12-14 · in JSDoc is TypeScript
  7. …is a serious proposal that gained some traction for quite a while but seems to have fallen off https://github.com/tc39/proposal-type-annotations
  8. It's not a stupid question, but here is the TC39 proposal to add type declarations to JS: https://github.com/tc39/proposal-type-annotations
    comment by benbayard · 2025-12-02 · in Progress on TypeScript 7 – December 2025
  9. …still won't do anything with that extra info though, it'll get stripped just like comments. https://github.com/tc39/proposal-type-annotations
    comment by notnullorvoid · 2025-09-18 · in WASM 3.0 Completed
  10. It's been stuck at stage 1 since early 2022 unfortunately. https://github.com/tc39/proposal-type-annotations
    comment by TheBicPen · 2025-09-18 · in WASM 3.0 Completed
  11. …is actually dipping their toes in the water of adding typing to the spec, and it's at Stage 1: https://github.com/tc39/proposal-type-annotations . Now of course, this would only add type syntax to the language, not true processing: there's…
  12. Someday! https://github.com/tc39/proposal-type-annotations
  13. Direct link to the Stage 1 proposal: https://github.com/tc39/proposal-type-annotations
  14. For now. https://github.com/tc39/proposal-type-annotations
    comment by 90s_dev · 2025-07-14 · in A job queue in two lines of JavaScript
  15. …[3]: https://www.typescriptlang.org/docs/handbook/jsdoc-supported... [4]: https://github.com/tc39/proposal-type-annotations
  16. …decisions for my current code based on something that probably will never happen in the future. https://github.com/tc39/proposal-type-annotations/commits/ma...
  17. …be achieved without enums. See https://www.typescriptlang.org/play/?#code/PTAEFEA8EMFsAcA2B... [1] https://github.com/tc39/proposal-type-annotations
  18. …ever got accepted, but alas TC39 moves slowly... [1] https://servicestack.net/posts/javascript [2] https://github.com/tc39/proposal-type-annotations
    comment by mythz · 2024-12-10 · in Just Say No to JavaScript
  19. …is NPM and node_modules. Vite and the wider ecosystem that it pulls together is pretty amazing. [0] https://github.com/tc39/proposal-type-annotations
  20. There is a proposal for that: https://github.com/tc39/proposal-type-annotations
  21. Yes. That is noted in the PR: > There is a TC39 proposal for type annotations Which links to https://github.com/tc39/proposal-type-annotations It is a long ways off though.
  22. …for the purposes of type stripping (not type checking), is attempting to be somewhat standardized: https://github.com/tc39/proposal-type-annotations
  23. Imho standardizing the syntax is enough and this is what https://github.com/tc39/proposal-type-annotations does. The type checker is immensely complex and should be left out so that other type checkers can be developed, e.g. similar to how…
  24. https://github.com/tc39/proposal-type-annotations?tab=readme... You’re welcome.
  25. Stage 1 https://github.com/tc39/proposal-type-annotations So maybe we'll have support in another five years ... Or maybe we'll have "Support in another five years" in five years, who knows
  26. There is an EcmaScript proposal to go in that direction: https://github.com/tc39/proposal-type-annotations I think this should be part of the language spec.
    comment by phartenfeller · 2024-07-25 · in Node.js adds experimental support for TypeScript
  27. This has been proposed for several years now, but there's been very little progress on it: https://github.com/tc39/proposal-type-annotations
  28. IMO the game changer in your scenario is when type annotations are added as a standard JS feature: https://github.com/tc39/proposal-type-annotations At that point (and with ES modules) you'd be able to run your TS code directly without any…
  29. That proposal is not fully compatible with Typescript: https://github.com/tc39/proposal-type-annotations?tab=readme...
    comment by MrResearcher · 2024-04-02 · in Bun 1.1
  30. Totally agree. There is a TC39 proposal for that: https://github.com/tc39/proposal-type-annotations
    comment by whstl · 2024-04-02 · in Bun 1.1
  31. …than Typescript even! Nothing will be locked at the current level. It's a frikkin magical proposal. https://github.com/tc39/proposal-type-annotations
  32. The proposal: https://github.com/tc39/proposal-type-annotations
  33. …the FAQ at the bottom of that Type Annotations proposal is well written and quite detailed. [0] https://github.com/tc39/proposal-type-annotations
    comment by WorldMaker · 2024-03-01 · in JSR: The JavaScript Registry
  34. There is only one major JS feature that is missing from modern browsers IMO: type annotations (like https://github.com/tc39/proposal-type-annotations/ or similar) since most people don't want to use JSDoc-based ones. Some people will want…
  35. They held a meeting a few months ago so it's alive but probably still years away. https://github.com/tc39/proposal-type-annotations/issues/184
    comment by frankjr · 2024-02-07 · in Go 1.22
  36. …like Type Annotations that provide no type soundness or runtime checks of any kind[0] [0] https://github.com/tc39/proposal-type-annotations
    comment by Vt71fcAqt7 · 2023-12-19 · in TC39: Add Object.groupBy and Map.groupBy
  37. …which would allow ("a reasonably large subset") of TypeScript to run directly in the browser. Yay! https://github.com/tc39/proposal-type-annotations
    comment by andai · 2023-11-13 · in HTML First
  38. …and have significant performance penalties, but would give more guarantees of type safety. [1] https://github.com/tc39/proposal-type-annotations
    comment by claytongulick · 2023-11-08 · in Gleam: a type safe language on the Erlang VM
  39. …1. I'm hoping it doesn't make it in its current form. Some good discussion in the issues, though: https://github.com/tc39/proposal-type-annotations/issues
    comment by benatkin · 2023-08-25 · in Why Htmx Does Not Have a Build Step
  40. JSDoc can get you pretty far, but it can be clumsy sometimes. There’s a [TC39 proposal]( https://github.com/tc39/proposal-type-annotations ) to allow types to live in JS code and be treated as comments (similar with Python types today)
    comment by a-ungurianu · 2023-08-11 · in TypeScript Without Transpilation (2021)
  41. …over until we get native types. ECMAScript proposals take a long time, but it will eventually come. https://github.com/tc39/proposal-type-annotations
    comment by neotrope · 2023-07-18 · in Inconvenient Truths about TypeScript
  42. …build tool to use TypeScript. Fingers crossed the “Type annotations as comments” proposal happens: https://github.com/tc39/proposal-type-annotations
    comment by afavour · 2023-06-14 · in ES Modules Are Terrible
  43. …javascript (well, unless Javascript officially supports types which isn't happening anytime soon ( https://github.com/tc39/proposal-type-annotations )). deno does not have any inherent advantages over node if they continue to support node…
    comment by endisneigh · 2023-05-26 · in Node.js built-ins on Deno Deploy
  44. And this kind of type syntax is under consideration in TC39 https://github.com/tc39/proposal-type-annotations
  45. …modules, we don't need to bundle anymore as the browser will load the relevant files as needed [1] https://github.com/tc39/proposal-type-annotations [2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid...
  46. …I will probably use those. At least in Node, where I have more control of the runtime version. [1] https://github.com/tc39/proposal-type-annotations
  47. …step before running. For such codebases, TypeScript's build hurdle has already been overcome. [0] https://github.com/tc39/proposal-type-annotations
    comment by 18al · 2023-05-11 · in TS to JSDoc Conversion
  48. …and let interesting dialects emerge from the consensus ? I like jsdoc but the syntax is urgh. [1] https://github.com/tc39/proposal-type-annotations
    comment by makapuf · 2023-05-10 · in TS to JSDoc Conversion
  49. …bundling step for production. https://devblogs.microsoft.com/typescript/a-proposal-for-typ... https://github.com/tc39/proposal-type-annotations
  50. …with a JS interpreter If this proposal will ever be accepted, TS will be (in large parts) valid JS: https://github.com/tc39/proposal-type-annotations