Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ function innerVisitor(node: ts.Node, kind: ts.SyntaxKind): VisitResult {
case SK.SetAccessor: return visitFunctionLikeDeclaration(node as ts.FunctionLikeDeclaration, kind);
case SK.EnumDeclaration: return visitEnum(node as ts.EnumDeclaration);
case SK.ModuleDeclaration: return visitModule(node as ts.ModuleDeclaration);
case SK.IndexSignature: blankExact(node); return VISIT_BLANKED;
case SK.IndexSignature: blankStatement(node); return VISIT_BLANKED;
case SK.TaggedTemplateExpression: return visitTaggedTemplate(node as ts.TaggedTemplateExpression);
case SK.TypeAssertionExpression: return visitLegacyTypeAssertion(node as ts.TypeAssertion);
}
Expand Down
12 changes: 12 additions & 0 deletions tests/fixture/cases/asi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ class ASI {
n = 9/*missing ; */
protected instanceof() {}
// ;^^^^^^^^^
o = 10/*missing ; */
static [key: string]: any
// ;^^^^^^^^^^^^^^^^^^^^^^^^
["computed-field-2"] = 1
p = 11/*missing ; */
readonly [key: number]: any
// ;^^^^^^^^^^^^^^^^^^^^^^^^^^
*generator2() {}
}

abstract class AbstractASI {
Expand All @@ -122,6 +130,10 @@ class NoASI {
h = 3;
public ["computed-method"]() {}
// ^^^^^^
i = 4;
static [key: string]: any
// ^^^^^^^^^^^^^^^^^^^^^^^^^
["computed-field-2"] = 1
}

// Fields named like a modifier must not become a modifier of the next member
Expand Down
2 changes: 1 addition & 1 deletion tests/fixture/output/a.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions tests/fixture/output/asi.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.