Skip to content

Commit

Permalink
fix(type): correct type guard
Browse files Browse the repository at this point in the history
  • Loading branch information
marcj committed Jan 23, 2024
1 parent fb99dbe commit 272cff9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/type/src/reflection/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 272cff9

Please sign in to comment.