Skip to content

Commit 7e4371f

Browse files
authored
fix: Provide more type saftey for vega-lite fixme (#1947)
1 parent e83bb90 commit 7e4371f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NodeParser/CallExpressionParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class CallExpressionParser implements SubNodeParser {
2020
const type = this.typeChecker.getTypeAtLocation(node);
2121

2222
// FIXME: remove special case
23-
if ((type as any)?.typeArguments) {
23+
if (Array.isArray((type as any)?.typeArguments?.[0]?.types)) {
2424
return new TupleType([
2525
new UnionType((type as any).typeArguments[0].types.map((t: any) => new LiteralType(t.value))),
2626
]);

0 commit comments

Comments
 (0)