Support TS 4.3 get/set type members (#13089)

Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
This commit is contained in:
Sosuke Suzuki
2021-04-13 06:10:21 +09:00
committed by Nicolò Ribaudo
parent 2521c666f7
commit 7484b51e56
41 changed files with 990 additions and 41 deletions

View File

@@ -1712,6 +1712,7 @@ export interface TSMethodSignature extends BaseNode {
parameters: Array<Identifier | RestElement>;
typeAnnotation?: TSTypeAnnotation | null;
computed?: boolean | null;
kind: "method" | "get" | "set";
optional?: boolean | null;
}

View File

@@ -118,6 +118,9 @@ defineType("TSMethodSignature", {
fields: {
...signatureDeclarationCommon,
...namedTypeElementCommon,
kind: {
validate: assertOneOf("method", "get", "set"),
},
},
});