-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Is your feature request related to a problem? Please describe.
When an interface being passed to isType contains a function, we get a stack trace with little indication of what the true error is.
Describe the solution you'd like
Either strip the functions (somehow notifying the user), or give a useful console error.
Error: Unknown type "function"
at ChainTypeFormatter.getTypeFormatter (/Users/jgardner/ts-audit/node_modules/ts-json-schema-generator/dist/src/ChainTypeFormatter.js:27:15)
at ChainTypeFormatter.getChildren (/Users/jgardner/ts-audit/node_modules/ts-json-schema-generator/dist/src/ChainTypeFormatter.js:19:21)
at CircularReferenceTypeFormatter.getChildren (/Users/jgardner/ts-audit/node_modules/ts-json-schema-generator/dist/src/CircularReferenceTypeFormatter.js:28:76)
at type.getTypes.reduce (/Users/jgardner/ts-audit/node_modules/ts-json-schema-generator/dist/src/TypeFormatter/UnionTypeFormatter.js:38:78)
at Array.reduce (<anonymous>)
at UnionTypeFormatter.getChildren (/Users/jgardner/ts-audit/node_modules/ts-json-schema-generator/dist/src/TypeFormatter/UnionTypeFormatter.js:38:14)
at ChainTypeFormatter.getChildren (/Users/jgardner/ts-audit/node_modules/ts-json-schema-generator/dist/src/ChainTypeFormatter.js:19:44)
at CircularReferenceTypeFormatter.getChildren (/Users/jgardner/ts-audit/node_modules/ts-json-schema-generator/dist/src/CircularReferenceTypeFormatter.js:28:76)
at properties.reduce (/Users/jgardner/ts-audit/node_modules/ts-json-schema-generator/dist/src/TypeFormatter/ObjectTypeFormatter.js:39:44)
at Array.reduce (<anonymous>)