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
Run typescript-json-schema "src/test.ts" UserBulkBetaInvite --uniqueNames and you receive the following:
PS D:\tsj-repro> npx typescript-json-schema "src/test.ts" UserBulkBetaInvite --uniqueNames
(node:6884) UnhandledPromiseRejectionWarning: Error: Symbol "__type" has no valueDeclaration and 0 declarations.
at getCanonicalDeclaration (D:\tsj-repro\node_modules\typescript-json-schema\dist\typescript-json-schema.js:258:11)
at getSourceFile (D:\tsj-repro\node_modules\typescript-json-schema\dist\typescript-json-schema.js:261:23)
at JsonSchemaGenerator.getTypeDefinition (D:\tsj-repro\node_modules\typescript-json-schema\dist\typescript-json-schema.js:931:34)
at JsonSchemaGenerator.getDefinitionForProperty (D:\tsj-repro\node_modules\typescript-json-schema\dist\typescript-json-schema.js:510:31)
at D:\tsj-repro\node_modules\typescript-json-schema\dist\typescript-json-schema.js:805:37
at Array.reduce (<anonymous>)
at JsonSchemaGenerator.getClassDefinition (D:\tsj-repro\node_modules\typescript-json-schema\dist\typescript-json-schema.js:803:45)
at JsonSchemaGenerator.getTypeDefinition (D:\tsj-repro\node_modules\typescript-json-schema\dist\typescript-json-schema.js:1025:26)
at JsonSchemaGenerator.getSchemaForSymbol (D:\tsj-repro\node_modules\typescript-json-schema\dist\typescript-json-schema.js:1056:24)
at generateSchema (D:\tsj-repro\node_modules\typescript-json-schema\dist\typescript-json-schema.js:1236:30)
(node:6884) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6884) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
However, if you leave off --uniqueNames then you get the following invalid output:
Seems like the AST parser may be making incorrect assumptions about the node on visit. Saw similar failure for a different type in our project as well.
With the 0.5x versions of this package, the following will fail to compile with the
--uniqueNames
option:Run
typescript-json-schema "src/test.ts" UserBulkBetaInvite --uniqueNames
and you receive the following:However, if you leave off
--uniqueNames
then you get the following invalid output:The text was updated successfully, but these errors were encountered: