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
I'm upgrading from 0.97.0 to 1.3.0 and now ts-json-schema-generator crashes. I have a schema.ts with exported types plus a helper function for validating the types using the generated schema.
😀 mb@bia:test$ npx ts-json-schema-generator --path schema.ts
/Users/mb/.npm/_npx/dec19a6f9609cbed/node_modules/ts-json-schema-generator/dist/ts-json-schema-generator.js:95
throw error;
^
TypeError: Cannot read properties of undefined (reading 'getId')
at /Users/mb/.npm/_npx/dec19a6f9609cbed/node_modules/ts-json-schema-generator/dist/src/NodeParser/IndexedAccessTypeNodeParser.js:54:76
at Array.map (<anonymous>)
at IndexedAccessTypeNodeParser.createType (/Users/mb/.npm/_npx/dec19a6f9609cbed/node_modules/ts-json-schema-generator/dist/src/NodeParser/IndexedAccessTypeNodeParser.js:52:42)
at ChainNodeParser.createType (/Users/mb/.npm/_npx/dec19a6f9609cbed/node_modules/ts-json-schema-generator/dist/src/ChainNodeParser.js:28:54)
at ParameterParser.createType (/Users/mb/.npm/_npx/dec19a6f9609cbed/node_modules/ts-json-schema-generator/dist/src/NodeParser/ParameterParser.js:16:37)
at AnnotatedNodeParser.createType (/Users/mb/.npm/_npx/dec19a6f9609cbed/node_modules/ts-json-schema-generator/dist/src/NodeParser/AnnotatedNodeParser.js:30:47)
at ChainNodeParser.createType (/Users/mb/.npm/_npx/dec19a6f9609cbed/node_modules/ts-json-schema-generator/dist/src/ChainNodeParser.js:28:54)
at /Users/mb/.npm/_npx/dec19a6f9609cbed/node_modules/ts-json-schema-generator/dist/src/NodeParser/FunctionParser.js:24:41
at Array.map (<anonymous>)
at FunctionParser.createType (/Users/mb/.npm/_npx/dec19a6f9609cbed/node_modules/ts-json-schema-generator/dist/src/NodeParser/FunctionParser.js:23:48)
👿 mb@bia:test$
schema.ts contains:
exportinterfaceA{aProp: string;}exportinterfaceB{bProp: number;}interfaceObjects{'A': A,'B': B,}exportfunctionvalidate<KextendskeyofObjects>(type: K,object: Objects[K]): Objects[K]{// Actual validation using generated schema and AJV herereturnobject;}
It looks like it broke in between 1.0.0 and 1.1.0.
The text was updated successfully, but these errors were encountered:
I'm upgrading from 0.97.0 to 1.3.0 and now
ts-json-schema-generator
crashes. I have aschema.ts
with exported types plus a helper function for validating the types using the generated schema.schema.ts
contains:It looks like it broke in between 1.0.0 and 1.1.0.
The text was updated successfully, but these errors were encountered: