From 45e402179c9918f560ea6573097b895c1e62c79b Mon Sep 17 00:00:00 2001 From: Dominik Moritz Date: Fri, 19 Apr 2024 21:43:17 -0400 Subject: [PATCH] Fix build --- src/NodeParser/MappedTypeNodeParser.ts | 2 +- src/Utils/typeKeys.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NodeParser/MappedTypeNodeParser.ts b/src/NodeParser/MappedTypeNodeParser.ts index cba966942..62561819b 100644 --- a/src/NodeParser/MappedTypeNodeParser.ts +++ b/src/NodeParser/MappedTypeNodeParser.ts @@ -164,7 +164,7 @@ export class MappedTypeNodeParser implements SubNodeParser { protected createSubContext( node: ts.MappedTypeNode, - key: LiteralType | StringType, + key: LiteralType | StringType | NumberType, parentContext: Context, ): Context { const subContext = new Context(node); diff --git a/src/Utils/typeKeys.ts b/src/Utils/typeKeys.ts index 1053f1ede..d73b2a5bb 100644 --- a/src/Utils/typeKeys.ts +++ b/src/Utils/typeKeys.ts @@ -47,7 +47,7 @@ export function getTypeKeys(type: BaseType): LiteralType[] { return []; } -export function getTypeByKey(type: BaseType, index: LiteralType | StringType): BaseType | undefined { +export function getTypeByKey(type: BaseType, index: LiteralType | StringType | NumberType): BaseType | undefined { type = derefType(type); if (type instanceof IntersectionType || type instanceof UnionType) {