notes
proposal-decorators
notes | proposal-decorators | |
---|---|---|
9 | 64 | |
583 | 2,649 | |
1.0% | 0.6% | |
7.8 | 4.2 | |
22 days ago | 2 months ago | |
JavaScript | ||
- | - |
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.
notes
-
Union, intersection, difference, and more are coming to JavaScript Sets
Has anything changed recently? The proposal has been in stage 3 since November 2022 [1]
[1] https://github.com/tc39/notes/blob/HEAD/meetings/2022-11/nov...
-
The TC-39 just introduced a new stage: stage 2.7
If you're curious about the naming scheme (it now goes 0 -> 1 -> 2 -> 2.7 -> 3 -> 4), then you can read the discussion surrounding the name from the last meeting notes [1].
Also, for a quicker digest, Rob Palmer (from the committee) tweeted about it [2]
[1] https://github.com/tc39/notes/blob/main/meetings/2023-11/nov...
-
JavaScript Type Annotations Proposal Update
Dialog for this update is at https://github.com/tc39/notes/blob/main/meetings/2023-03/mar...
What I would like is a "use: 'typechecked'" at the top of the file indicating that the code has already been checked. This would be accompanied by a new proprosal that defines a standard for what is considered checked (for example checking nullablity in the types) and would allow for browsers to make some optimizations. This could also perhaps reduce the amount of necessary runtime checks such that it would be possible to make it a fully sound typesystem with most of the checks done beforehand.
-
ES Modules Are Terrible
All the meeting notes are recorded here: https://github.com/tc39/notes/tree/main/meetings. You’ll have to do a bit of spelunking in the corresponding agendas and proposal repo to narrow down the exact meetings you’re interested in.
- Proposal withdrawn for JavaScript Function.pipe / flow
- Proposal withdrawn for Function.pipe / flow
-
Deno joins TC39
Here's a list of delegates for TC39, but it doesn't list people by their ECMA member organization.
-
Class fields and private class members are now stage 4, ready for ES2022
This is a good question. I'm not sure I saw the notes of the meeting when this happened, but all the notes are public here: https://github.com/tc39/notes/tree/master/meetings
-
History of JavaScript - How it came into the existence
TC-39 is a group of people who are responsible for the standards. They have meetings every two months with member-appointed delegates and invited experts. You can check the minutes of those meetings here GitHub repository
proposal-decorators
-
Making Web Component properties behave closer to the platform
Because many rules are common to many attributes (the coerceType operation is defined by WebIDL, or using similar rules, and the HTML specification defines a handful of microsyntaxes for the parseValue and stringifyValue operations), those could be packaged up in a helper library. And with decorators coming to ECMAScript (and already available in TypeScript), those could be greatly simplified:
-
The case for using decorators in your codebase
Decorators are currently not a part of the standard JavaScript language. They are still being discussed in tc39 and have reached proposal stage 3. This means the spec has more or less stabilized and we can use them but they would be transplied before being run in the browser. This would be done via babel or tsc for most users
-
JavaScript Naming Conventions are Important
JavaScript was created a long time ago, and at the time of its inception, the authors decided not to use affirmative prefixes for boolean names. Now, they do their best by continuing to follow their convention, even if it goes against the community's opinion. Even if the authors wanted to introduce new naming conventions in the specification, they could not do it, at least not coherently. Old code cannot be renamed because JavaScript must remain backward-compatible. And starting to write new code using new approaches is not a great idea either, as there would be two ways to do the same thing, which is also undesirable.
-
ECMAScript Decorators. The Ones That are Real
2016-07 – Stage 2. After the decorators proposal reached stage 2, its API began to undergo significant changes. Furthermore, at one point the proposal was referred to as "ESnext class features for JavaScript." During its development, there were numerous ideas about how decorators could be structured. To get a comprehensive view of the entire history of changes, I recommend reviewing the commits in the proposal's repository. Here is an example of what the decorators API used to look like:
-
Strawberry - Zero-Dependency, Build-Free JavaScript Framework
The example you've given isn't valid JavaScript, JS doesn't have decorators. (Although there is a stage 3 tc39 for it, afaik no browser has implemented it)
-
Updates from the 96th TC39 meeting
There was a decorators issue brought up in the meeting (issue 508) and decorators metadata, as noted in the article, is now at stage 3. So there's still active work being done on decorators. If I had to guess, I'd say they'd be a likely candidate for ES2024.
-
The Lightweight Alternative to GraphQL, Resolvers Instead of Endpoints
As per the proposal, decorators can be used with Classes and their elements such as fields, methods, and accessors. To leverage this feature, we need to ensure that our resolvers provider is an instance of a Class. Therefore, we will modify the code in src/api/users/users-resolvers.js to the following:
-
Using modern decorators in TypeScript
The modern version of decorators, which will be officially rolled out in TypeScript 5.0, no longer requires a compiler flag and follows the official ECMAScript Stage-3 proposal. Alongside a stable implementation that follows ECMAScript standards, decorators now work seamlessly with the TypeScript type system, enabling more enhanced functionality than the original version.
-
What should I do after react js
100% this. Going in depth of libraries will make you so much better developer than learning newest and coolest frameworks in JS ecosystem. Learn to create your own React, Promises, or anything you like in JS. It will give you immense perspective about these libraries. Once you start understanding them you will feel like they are not that complex and you can do it too. Go read TC39 proposals and issues people point out in them. You will see how JS is borrowing features from other languages.
-
Announcing TypeScript 5.0
The actual proposal gives the "@reactive" decorator as the first example, which just so happens is the only decorator that I use in my library with TypeScript's legacy decorator option. Was so happy to see they recognize this use case! https://github.com/tc39/proposal-decorators
What are some alternatives?
proposal-class-fields - Orthogonally-informed combination of public and private fields proposals
openapi-typescript - Generate TypeScript types from OpenAPI 3 specs
proposals - Tracking ECMAScript Proposals
proposal-pipeline-operator - A proposal for adding a useful pipe operator to JavaScript.
TypeORM - ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
proposal-function-pipe-flow - A proposal to standardize helper functions for serial function application and function composition.
remult - Full-stack CRUD, simplified, with SSOT TypeScript entities
Svelte - Cybernetically enhanced web apps
arktype - TypeScript's 1:1 validator, optimized from editor to runtime
esm.sh - A fast, smart, & global CDN for modern(es2015+) web development.
proposal-decorator-metadata