-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ideas for AST changes #9161
Comments
Use Function everywhereconst obj = {
x() {}, // Function ✅
set a(v) {}, // should use Function
get b() {}, // should use Function
}
function foo() {} // Function ✅
const a = () => {} // should use Function
const b = () => expr; // We should use another form of representation, but it can be conveniently converted into a Function.
class clazz {
x() {} // Function ✅
set a(v) {} // Function ✅
get b() {} // Function ✅
} Use 👍 or 👎 to express your opinion. |
Merge ForInStmt/ForOfStmt into forXStmtUse 👍 or 👎 to express your opinion. |
Try using an arena allocator (eg bumpalo) for heap allocated values like Vec and Box. Would require passing lifetimes around unfortunately but apparently this is where oxc gets some of its performance wins. Could be worth testing to see how much impact it has. |
Class The attribute |
|
Rename: |
Rename variants in TypeScript enums. Current:#[ast_node]
#[derive(Eq, Hash, Is, EqIgnoreSpan)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub enum TsTypeElement {
#[tag("TsCallSignatureDeclaration")]
TsCallSignatureDecl(TsCallSignatureDecl),
#[tag("TsConstructSignatureDeclaration")]
TsConstructSignatureDecl(TsConstructSignatureDecl),
#[tag("TsPropertySignature")]
TsPropertySignature(TsPropertySignature),
#[tag("TsGetterSignature")]
TsGetterSignature(TsGetterSignature),
#[tag("TsSetterSignature")]
TsSetterSignature(TsSetterSignature),
#[tag("TsMethodSignature")]
TsMethodSignature(TsMethodSignature),
#[tag("TsIndexSignature")]
TsIndexSignature(TsIndexSignature),
} New:#[ast_node]
#[derive(Eq, Hash, Is, EqIgnoreSpan)]
#[cfg_attr(feature = "arbitrary", derive(arbitrary::Arbitrary))]
pub enum TsTypeElement {
#[tag("TsCallSignatureDeclaration")]
CallSignature(TsCallSignatureDecl),
#[tag("TsConstructSignatureDeclaration")]
Construct(TsConstructSignatureDecl),
#[tag("TsPropertySignature")]
Property(TsPropertySignature),
#[tag("TsGetterSignature")]
Getter(TsGetterSignature),
#[tag("TsSetterSignature")]
Setter(TsSetterSignature),
#[tag("TsMethodSignature")]
Method(TsMethodSignature),
#[tag("TsIndexSignature")]
Index(TsIndexSignature),
} |
Fix TypeScript namespace vs module |
Remove |
or
|
Take trait => Default trait |
We want to collect ideas about AST changes.
The text was updated successfully, but these errors were encountered: