Skip to content
This repository was archived by the owner on Jan 14, 2019. It is now read-only.

Commit 2712649

Browse files
committed
fix: add missing static modifier
1 parent 14143e9 commit 2712649

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/convert.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2405,7 +2405,7 @@ export default function convert(config: ConvertConfig): ESTreeNode | null {
24052405
);
24062406
}
24072407

2408-
// accessibility and export is not allowed in MethodSignature
2408+
// accessibility, export and static is not allowed in MethodSignature TS1070
24092409
const accessibility = nodeUtils.getTSNodeAccessibility(node);
24102410
if (accessibility) {
24112411
result.accessibility = accessibility;
@@ -2414,6 +2414,10 @@ export default function convert(config: ConvertConfig): ESTreeNode | null {
24142414
if (nodeUtils.hasModifier(SyntaxKind.ExportKeyword, node)) {
24152415
result.export = true;
24162416
}
2417+
2418+
if (nodeUtils.hasModifier(SyntaxKind.StaticKeyword, node)) {
2419+
result.static = true;
2420+
}
24172421
break;
24182422
}
24192423

tests/lib/__snapshots__/typescript.ts.snap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76419,6 +76419,7 @@ Object {
7641976419
"type": "TSVoidKeyword",
7642076420
},
7642176421
},
76422+
"static": true,
7642276423
"type": "TSMethodSignature",
7642376424
},
7642476425
Object {

0 commit comments

Comments
 (0)