observable
proposal-explicit-resource-management
observable | proposal-explicit-resource-management | |
---|---|---|
9 | 22 | |
516 | 703 | |
1.7% | 4.0% | |
8.2 | 6.5 | |
about 18 hours ago | 24 days ago | |
Bikeshed | JavaScript | |
GNU General Public License v3.0 or later | BSD 3-clause "New" or "Revised" 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.
observable
- Proposal: Signals as a Built-In Primitive of JavaScript
-
What We Need Instead of "Web Components"
> especially since Observables have been widely available and actively worked on for a long time, without seeing wide adoption
Take a look at "Userland libraries" section [0] of the proposal (almost certainly written by Ben). He argues that observables get reinvented in the userland in various libraries over and over again. It is a primitive, like a Promise, only better.
[0] - https://github.com/WICG/observable?tab=readme-ov-file#userla...
- Observable API Proposal
- Observable API proposal
-
You Don't Need to “Learn” Svelte: Embracing the Simplicity of JavaScript
Perhaps this falls into the repetitive boilerplate category you referred to, but if you want framework-agnostic domain objects that still work well with Svelte, create your own using the observer pattern.
Create an object with a subscribe method and whatever other methods make sense for updating its state. Svelte will treat it like one of its stores, and it will work with the $ syntax. It can be used with React via its `useSyncExternalStore` hook. It can be used with SolidJS via its `from` utility.
If you don't want to handle the set-up boilerplate, you could use another library like Effector or RxJS, but of course, that means another dependency. There is a gradual move to make something like this a part of the platform[1], but who knows when or if it will land.
[1] https://github.com/domfarolino/observable
proposal-explicit-resource-management
- Cooperation between Cloudflare Workers has become amazing thanks to RPC support
-
Proposal: Signals as a Built-In Primitive of JavaScript
The standard doesn't have anything to do with TypeScript, not sure where you got that from? https://github.com/tc39/proposal-explicit-resource-managemen...
-
How does TypeScript's explicit resource management work?
The explicit resource management proposal tries to make it a bit easier for us, by allowing the resource to declare how it should be managed, rather than expecting us to clean everything up when we use the resource. We get a new keyword using to define a variable (rather than const or let), which tells the runtime to clean up the resource at the end of the function.
-
Using using in TypeScript for resource management
Enter the explicit resource management proposal, which describes — among many other things — a new using operator that was introduced in TypeScript 5.2 and is making its way into JavaScript. From the top of the README file, here’s what this proposal aims to do:
-
OpenTelemetry in 2023
In addition to this, is the new (stage 3 even!)explicit resource management proposal[0], supported by TypeScript version >= 5.2[1]
Though I agree that async context is better fit for this generally, the RMP should be good for telemetry around objects that have defined lifetime semantics, which is a step in the right direction you can use today
[0]: https://github.com/tc39/proposal-explicit-resource-managemen...
[1]: https://www.totaltypescript.com/typescript-5-2-new-keyword-u...
- ECMAScript Explicit Resource Management Proposal
-
Why is JavaScript so hated?
It's too early for that, https://github.com/tc39/proposal-explicit-resource-management
-
TypeScript 5.2's New Keyword: 'using'
[3]: https://github.com/tc39/proposal-explicit-resource-managemen...
-
Douglas Crockford: “We should stop using JavaScript”
I'm not _entirely_ sure which RAII you mean, but if you mean something like C#'s `using` or Java's `try-with-resources` or Python's `with`, then https://github.com/tc39/proposal-explicit-resource-managemen... and https://github.com/tc39/proposal-async-explicit-resource-man... are in stage 3 (of 4 stages) in ECMAScript's language proposal lifecycle and will be coming to a JS engine near you behind a flag soon-ish.