fix(ts-parser): handle comma separator in index signature type
MODIFY
internal/js-parser/parser/typescript.ts
internal/js-parser/parser/typescript.ts
@@ -787,7 +787,7 @@ export function tryTSParseIndexSignature(
const typeAnnotation = tryTSParseTypeAnnotation(parser);
- semicolon(parser);
+ parseTSTypeMemberSemicolon(parser);
return parser.finishNode(
start,
{

ADD
internal/js-parser/test-fixtures/typescript/type-alias/index-signature/input.ts
+type T = {
+ [index: string]: number,
+}

fix(ts-parser): handle comma separator in index signature type (#1342)