Skip to content

Commit 8fc3761

Browse files
committed
Tuples are also arrays
1 parent e4b718b commit 8fc3761

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/TSHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class TSHelper {
4747

4848
public static isArrayType(type: ts.Type, checker: ts.TypeChecker): boolean {
4949
const typeNode = checker.typeToTypeNode(type);
50-
return typeNode && typeNode.kind === ts.SyntaxKind.ArrayType;
50+
return typeNode && (typeNode.kind === ts.SyntaxKind.ArrayType || typeNode.kind === ts.SyntaxKind.TupleType);
5151
}
5252

5353
public static isTupleType(type: ts.Type, checker: ts.TypeChecker): boolean {

0 commit comments

Comments
 (0)