Skip to content

Commit

Permalink
Merge pull request #123 from TeselaGen/master
Browse files Browse the repository at this point in the history
Added a more helpful error message when a type isn't found
  • Loading branch information
tnrich committed Jun 17, 2020
2 parents 3a47f3c + 529e8b5 commit ab66e5b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/metadata/resolveType.ts
Expand Up @@ -596,6 +596,7 @@ function getInheritedProperties(modelTypeDeclaration: UsableDeclaration, generic
if (!type) {
type = MetadataGenerator.current.getInterfaceDeclaration(t.expression.getText());
}
if (!type) throw new Error(`No type found for ${t.expression.getText()}`)
const baseEntityName = t.expression as ts.EntityName;
const parentGenerictypes = resolveTypeArguments(modelTypeDeclaration as ts.ClassDeclaration, genericTypes);
const genericTypeMap = resolveTypeArguments(type, t.typeArguments, parentGenerictypes);
Expand Down

0 comments on commit ab66e5b

Please sign in to comment.