Skip to content

Commit

Permalink
fix: fix type error issue
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Nov 15, 2022
1 parent 7e92e22 commit e064477
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions chapi-ast-typescript/src/main/antlr/TypeScriptParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ type_
| constructorType
| typeGeneric
| '|'? propertyName ('|' (propertyName))*
| Unknown
;

unionOrIntersectionOrPrimaryType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,10 @@ export class DemoComponent implements OnInit, ControlValueAccessor {

TypeScriptAnalyser().analysis(code, "index.tsx")
}

@Test
fun type_definition() {
val code = """export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };"""
TypeScriptAnalyser().analysis(code, "index.tsx")
}
}

0 comments on commit e064477

Please sign in to comment.