proposal-type-annotations
d2-playground
proposal-type-annotations | d2-playground | |
---|---|---|
110 | 27 | |
4,311 | 90 | |
0.5% | - | |
3.0 | 6.7 | |
about 1 month ago | 8 days ago | |
JavaScript | JavaScript | |
- | Mozilla Public License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
proposal-type-annotations
-
TypeScript enums: use cases and alternatives
After almost a decade of TypeScript my recommendation is to not use TypeScript enums.
Enums is going to make your TypeScript code not work in a future where TypeScript code can be run with Node.js or in browser when typings are added to JavaScript[1]
Enums results in runtime code and in most cases you really want type enums. Use `type State = "Active" | "Inactive"` and so on instead. And if you really want an closed-ended object use `const State = { Active: 1, Inactive: 0 } as const`
[1] https://github.com/tc39/proposal-type-annotations
-
PyScript: An open source platform for Python in the browser
Maybe as part of the Flutter/Dart sales story?
Here is the current status of the standard proposal.
https://tc39.es/proposal-type-annotations/
-
Node Will Finally suport Typescript???
So read the Github of TC39: https://github.com/tc39/proposal-type-annotations
-
Node.js adds experimental support for TypeScript
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.
-
5 years in, JavaScript Modules are still painful
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 you'd be able to run your TS code directly without any transpiration necessary. I'd love to remove all the build process junk from my projects and have them run quicker.
-
Bun 1.1
That proposal is not fully compatible with Typescript: https://github.com/tc39/proposal-type-annotations?tab=readme...
-
Go 1.22 Release Notes
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
-
[AskJS] Kicking a dead horse - TS vs JS
I particularly like this thread in the TC39 types proposal. TypeScript IS a development trojan horse and locks you into the Microsoft Way of being a JS developer.
- Strong static typing, a hill I'm willing to die on...
-
HTML First – Six principles for building simple, maintainable, web software
Edit: There is a proposal to extend JavaScript with type annotations, which would allow ("a reasonably large subset") of TypeScript to run directly in the browser. Yay!
https://github.com/tc39/proposal-type-annotations
d2-playground
-
Ask HN: What do you use to create diagrams?
https://mermaid.live/ ! Mostly because it lets me generate my diagrams in code rather than drawing them out by hand, which means I can version control them, as well as generate said code from human-language descriptions given to ChatGPT. Sequence diagrams are an especially favorite of mine.
There are a few good options in the code to SVG (PNG, JPG, whatever) space besides Mermaid. The venerable graphviz has been around since the 90s, I think, and uses the DOT language. The newer D2 language probably has the nicest overall aesthetics as well: https://play.d2lang.com/
- Show HN: GUI for Editing Mermaid Class Diagrams
-
(Occasionally) Useful Web Tools For Android Developers
Link: D2 Playground
- Vizdom: Diagrams as Code
- D2 Playground
- How to draw beautiful software architecture diagrams
-
The Unreasonable Effectiveness of Sequence Diagrams in MermaidJS
https://play.d2lang.com/?script=qlDQtVOo5AIEAAD__w%3D%3D&ske...
I was going to ask why you don't have a web version but you already do. I'm going to play with this more today.
Have you thought about an "auto compile"/live mode where it changes as you edit the text? I think this adds a level of intuitiveness that would help new users explore.
- D2 Declarative Diagramming playground: Turn diagram scripting language to images
- I wrote a tool in Go to write Sequence Diagrams in Go
-
Animated diagrams with D2, a text-to-diagram language written in Go
Wow that's a very detailed catch, thanks for reporting! Made an issue: https://github.com/terrastruct/d2-playground/issues/33
What are some alternatives?
captureSystemAudio - Capture system audio ("What-U-Hear")
d2-vscode - VSCode extension for D2 files.
rescript - ReScript is a robustly typed language that compiles to efficient and human-readable JavaScript.
text-to-diagram-site - Compare syntax, layouts, outputs between languages for generating diagrams with text.
proposal-record-tuple - ECMAScript proposal for the Record and Tuple value types. | Stage 2: it will change!
d2-docs - Language documentation and blog for D2.