proposal-decorators icon indicating copy to clipboard operation
proposal-decorators copied to clipboard

Decorators for ES6 classes

Results 30 proposal-decorators issues
Sort by recently updated
recently updated
newest added

Non-field initializers added with `context.addInitializer()` run *before* field initializers [according to the README](https://github.com/tc39/proposal-decorators?tab=readme-ov-file#adding-initialization-logic-with-addinitializer), making it too easy to have problems with private fields. The README says: > Class element initializers...

Is there a way to access the target class (not the instance) in the context (method, field, etc)? I've been implementing the new decorators in my library and I found...

add a colon immediately following to the `value#set` property prior to this change, this type would be considered invalid typescript syntax > ':' expected.(1005) TS Playground showing the errors surfaced...

If a decorator throws, we don't set `decorationState.[[Finished]] = true`. This means that if `addInitializerClosure` is used later, it can still be called without throwing which might be a bit...

The spec defines strict mode for classes as follow: > https://tc39.github.io/ecma262/#sec-strict-mode-code > [...] > All parts of a ClassDeclaration or a ClassExpression are strict mode code. This means that decorators...

Decorators have mostly stabilized, and the end result is different than previous iterations. We should add an upgrade guide (or link to an existing one) for users of the old...

help wanted
documentation needed

I checked some of the engine/tool issue trackers and couldn't find any clear signal on what the status of the proposal is when it comes to stage 3 implementations. What...

status

I was trying to upgrade my [bound-decorator](https://github.com/mbrowne/bound-decorator) library (which was based on the Sept. 2018 version of this proposal) to the current proposal, but I ran into an issue with...

The current proposal exposes a single `addInitializer` function on the context passed to a decorator. The callback provided is then invoked either as a _staticExtraInitializer_ or an _instanceExtraInitializer_ depending on...

Given how many discussions we've had around ordering, I want to be clear up front that this issue is _NOT_ a intended re-litigation of _any_ of the previous discussions. This...