-
Notifications
You must be signed in to change notification settings - Fork 659
📎 TypeScript 5.0 #4227
Comments
We should support decorators ? Typescript announcement |
Updated. |
Personally, I would move decorators to their issue. Why? Because it's not a TypeScript thing but a JavaScript thing. Having decorators here would send the wrong message: it could signal that we aim to support legacy decorators, which is not our intention. |
I think Typescript has one small difference in TS with decorators compared to the spec in TC39 though, they allow decorators before @component('my-foo')
export class Foo {}
@component('my-bar')
export default class Bar {} Officially in JS this has to be written as: export @component('my-foo') class Foo {}
export default @component('my-bar') class Bar {} So I think there may at least be a small difference in syntax parsing/AST between JS/TS. |
@csvn they recently changed the grammar: https://babeljs.io/blog/2023/02/20/7.21.0#decorators-updates |
@csvn The TypeScript team talks about this change on the spec after discussion between them and the spec team in their TS 5.0 announcement. |
I opened a new issue #4252 for the support of dcorators. |
@ematipico Oh, cool! I did not find that myself when I looked. Glad it's consistent, since it's (IMO) way more ergonomic to have it before |
I'll take const modifier support. |
Description
Add parsing and formatter support for the syntax introduced by TypeScript 5.0
export type *
feat(rome_js_parser): TS 5.0export type *
#4228const
type parametersThe text was updated successfully, but these errors were encountered: