Skip to content

Commit ab66e5b

Browse files
authored
Merge pull request #123 from TeselaGen/master
Added a more helpful error message when a type isn't found
2 parents 3a47f3c + 529e8b5 commit ab66e5b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/metadata/resolveType.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ function getInheritedProperties(modelTypeDeclaration: UsableDeclaration, generic
596596
if (!type) {
597597
type = MetadataGenerator.current.getInterfaceDeclaration(t.expression.getText());
598598
}
599+
if (!type) throw new Error(`No type found for ${t.expression.getText()}`)
599600
const baseEntityName = t.expression as ts.EntityName;
600601
const parentGenerictypes = resolveTypeArguments(modelTypeDeclaration as ts.ClassDeclaration, genericTypes);
601602
const genericTypeMap = resolveTypeArguments(type, t.typeArguments, parentGenerictypes);

0 commit comments

Comments
 (0)