From 06c7e19cc0100aad7cddb2604d757cfe4a993462 Mon Sep 17 00:00:00 2001 From: sinclair Date: Thu, 5 Dec 2024 14:21:25 +0900 Subject: [PATCH] Inline Ref on FromImport --- src/compiler/compiler.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/compiler.ts b/src/compiler/compiler.ts index 37726471..5edf8fd7 100644 --- a/src/compiler/compiler.ts +++ b/src/compiler/compiler.ts @@ -301,8 +301,7 @@ export namespace TypeCompiler { const members = globalThis.Object.getOwnPropertyNames(schema.$defs).reduce((result, key) => { return [...result, schema.$defs[key as never] as TSchema] }, [] as TSchema[]) - const ref = Ref(schema.$ref) - yield* Visit(ref, [...references, ...members], value) + yield* Visit(Ref(schema.$ref), [...references, ...members], value) } function* FromInteger(schema: TInteger, references: TSchema[], value: string): IterableIterator { yield `Number.isInteger(${value})`