|
|
@ -56,13 +56,14 @@ const visitors = {
|
|
|
|
if (node.exportKind === 'type') return b.empty;
|
|
|
|
if (node.exportKind === 'type') return b.empty;
|
|
|
|
return node;
|
|
|
|
return node;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
PropertyDefinition(node) {
|
|
|
|
PropertyDefinition(node, { next }) {
|
|
|
|
if (node.accessor) {
|
|
|
|
if (node.accessor) {
|
|
|
|
e.typescript_invalid_feature(
|
|
|
|
e.typescript_invalid_feature(
|
|
|
|
node,
|
|
|
|
node,
|
|
|
|
'accessor fields (related TSC proposal is not stage 4 yet)'
|
|
|
|
'accessor fields (related TSC proposal is not stage 4 yet)'
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return next();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
TSAsExpression(node, context) {
|
|
|
|
TSAsExpression(node, context) {
|
|
|
|
return context.visit(node.expression);
|
|
|
|
return context.visit(node.expression);
|
|
|
@ -97,7 +98,7 @@ const visitors = {
|
|
|
|
if ((node.readonly || node.accessibility) && context.path.at(-2)?.kind === 'constructor') {
|
|
|
|
if ((node.readonly || node.accessibility) && context.path.at(-2)?.kind === 'constructor') {
|
|
|
|
e.typescript_invalid_feature(node, 'accessibility modifiers on constructor parameters');
|
|
|
|
e.typescript_invalid_feature(node, 'accessibility modifiers on constructor parameters');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return node.parameter;
|
|
|
|
return context.visit(node.parameter);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
FunctionExpression: remove_this_param,
|
|
|
|
FunctionExpression: remove_this_param,
|
|
|
|
FunctionDeclaration: remove_this_param,
|
|
|
|
FunctionDeclaration: remove_this_param,
|
|
|
|