You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>)
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: