From 272cff92292043c4b76bd61bc4abe3c9a63509c9 Mon Sep 17 00:00:00 2001 From: "Marc J. Schmidt" Date: Tue, 23 Jan 2024 03:25:21 +0100 Subject: [PATCH] fix(type): correct type guard --- packages/type/src/reflection/type.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/type/src/reflection/type.ts b/packages/type/src/reflection/type.ts index f94e406c9..b66d4d677 100644 --- a/packages/type/src/reflection/type.ts +++ b/packages/type/src/reflection/type.ts @@ -2279,8 +2279,8 @@ export function isGlobalTypeClass(type: Type): type is TypeClass { /** * Returns true if the given type is TypeClass and references a custom (non-global) class. */ -export function isCustomTypeClass(type: Type) { - return !isGlobalTypeClass(type); +export function isCustomTypeClass(type: Type): type is TypeClass { + return type.kind === ReflectionKind.class && !isGlobalTypeClass(type); } /**