Describe the bug
When running typescript-json-schema on a TypeScript type alias that is set to never, the tool throws an error:
TypeError: Unsupported type: never
at JsonSchemaGenerator.getDefinitionForRootType ...
To Reproduce
Steps to reproduce the behavior:
- Create a file with the following content:
export type Test = never;
- Run:
npx typescript-json-schema file.ts Test
Expected behavior
The tool should either:
- Generate a valid JSON schema for the
never type (e.g., a schema that matches no values), or
- Gracefully report that
never is not supported, without throwing an unhandled exception.
- When --ignoreErrors is passed, the tool should not crash and should continue processing.
Describe the bug
When running typescript-json-schema on a TypeScript type alias that is set to
never, the tool throws an error:To Reproduce
Steps to reproduce the behavior:
Expected behavior
The tool should either:
nevertype (e.g., a schema that matches no values), orneveris not supported, without throwing an unhandled exception.