isograph
isograph | proposal-class-method-parameter-deco | |
---|---|---|
1 | 1 | |
187 | - | |
18.2% | - | |
9.9 | - | |
4 days ago | - | |
Rust | ||
MIT License | - |
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.
isograph
-
TypeScript 5.2's New Keyword: 'using'
Yes, the requirement that static constructors are used makes this substantially less ergonomic than it would otherwise be for the reasons you point out.
Some of the React hooks in Isograph use this pattern, and as a result the constructor returns an instance in an invalid state: https://github.com/isographlabs/isograph/blob/1a8182355ac9d1...
I'm of the opinion that this is a paper cut worth stomaching in favor of the addition of an idiom that provides genuine safety. The type for the class and the static conductor (ie a free function) could be exposed, but the class itself could be hidden.
proposal-class-method-parameter-deco
-
TypeScript 5.2's New Keyword: 'using'
> I wonder if they will put forth a new proposal for dependency injection next, at this rate.
Yes, there is a new-ish proposal [1] which is motivated in large part by DI.
(Full disclosure: I'm on the committee and don't really like DI or this proposal. But we'll see how it goes.)
[1] https://github.com/tc39/proposal-class-method-parameter-deco...
What are some alternatives?
proposal-class-method-parameter-decorators - Decorators for ECMAScript class method and constructor parameters
proposal-async-explicit-resource-man
proposal-async-explicit-resource-management - ECMAScript Async Explicit Resource Management
SharpLab - .NET language playground
proposal-explicit-resource-management - ECMAScript Explicit Resource Management
caniuse - Raw browser/feature support data from caniuse.com