Skip to content

Commit

Permalink
Stop checking invalid properties
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Jan 31, 2023
1 parent 20e8915 commit de94071
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 0 additions & 4 deletions src/language-js/print/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,6 @@ function printTypescript(path, options, print) {

case "TSParameterProperty":
parts.push(printTypeScriptAccessibilityToken(node));
if (node.export) {
parts.push("export ");
}
if (node.static) {
parts.push("static ");
}
Expand Down Expand Up @@ -222,7 +219,6 @@ function printTypescript(path, options, print) {
]);

return [
node.export ? "export " : "",
printTypeScriptAccessibilityToken(node),
node.static ? "static " : "",
node.readonly ? "readonly " : "",
Expand Down
3 changes: 3 additions & 0 deletions src/language-js/traverse/visitor-keys.evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const additionalVisitorKeys = {
};

const excludeKeys = {
// From `tsVisitorKeys`
MethodDefinition: ["typeParameters"],

// From `flowVisitorKeys`
ArrowFunctionExpression: ["id"],
DeclareOpaqueType: ["impltype"],
Expand Down
1 change: 0 additions & 1 deletion tests/unit/__snapshots__/visitor-keys.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@ exports[`visitor keys estree 1`] = `
"decorators",
"key",
"value",
"typeParameters",
],
"MixedTypeAnnotation": [],
"ModuleExpression": [
Expand Down

0 comments on commit de94071

Please sign in to comment.