Skip to content

Commit

Permalink
feature(type): print reflection kind instead of number when Reflectio…
Browse files Browse the repository at this point in the history
…nClass mismatch
  • Loading branch information
marcj committed Oct 1, 2023
1 parent b85f2e0 commit c21009a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/type/src/reflection/reflection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,7 @@ export class ReflectionClass<T> {
if (jit.reflectionClass) return jit.reflectionClass;
return jit.reflectionClass = new ReflectionClass<T>(classTypeIn);
}
if (classTypeIn.kind !== ReflectionKind.class) throw new Error(`TypeClass or TypeObjectLiteral expected, not ${classTypeIn.kind}`);
if (classTypeIn.kind !== ReflectionKind.class) throw new Error(`TypeClass or TypeObjectLiteral expected, not ${ReflectionKind[classTypeIn.kind]}`);
}

const classType = isType(classTypeIn) ? (classTypeIn as TypeClass).classType : (classTypeIn as any)['prototype'] ? classTypeIn as ClassType<T> : classTypeIn.constructor as ClassType<T>;
Expand Down

0 comments on commit c21009a

Please sign in to comment.