You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The placement of fields on our objects is sensitive to their positions. We always expect specific fields to come before others so that we can correctly do source-maps, syntax tree printing, etc.
So can't mix export and default into the same bag as abstract when they're split up by decorators preceding them.
Idea
Split between leadingModifiers and trailingModifiers
API needs to provide modifiers as [...leadingModifiers, ...trailingModifiers]
Still creates a lot of breaking changes.
The changes here are cumbersome, and changes whatever API users might expect.
Would it make sense to have leading/trailing decorators instead?
No, still need to split the modifiers.
TC39 seems pretty resistant to take any feedback from us on this. 😕
Seems unfortunate since this affects, Prettier, ESLint, etc. too.
The text was updated successfully, but these errors were encountered:
Resolution mode assertions for
import type
#48644
(notes in this section from @RyanCavanaugh with some edits from me)
import
-style, orrequire
-styleimport type
is "our" syntax - doesn't work elsewhereimport.require
andimport.import
(nonstarter)assert
syntax.assert
, other tools don't need new syntactic handling{ x: y }
, etc)import type
to JS?as
import
assertions exist?Stage 3 Decorator Placement
export
keyword.ECMA-262 direction is that the syntax would be
export
anddefault
into the same bag asabstract
when they're split up by decorators preceding them.leadingModifiers
andtrailingModifiers
modifiers
as[...leadingModifiers, ...trailingModifiers]
The text was updated successfully, but these errors were encountered: