vega / ts-json-schema-generator

Generate JSON schema from your Typescript sources
MIT License
1.38k stars 190 forks source link

fix: Unknown type "undefined" when using generics without base type #1978

Closed arthurfiorette closed 1 month ago

arthurfiorette commented 1 month ago

closes #1977

πŸ“¦ Published PR as canary version: 2.2.1--canary.1978.156da78.0
:sparkles: Test out this PR locally via: ```bash npm install ts-json-schema-generator@2.2.1--canary.1978.156da78.0 # or yarn add ts-json-schema-generator@2.2.1--canary.1978.156da78.0 ```

Version

Published prerelease version: v2.3.0-next.4

Changelog #### πŸš€ Enhancement - feat: get version from package.json [#1979](https://github.com/vega/ts-json-schema-generator/pull/1979) ([@domoritz](https://github.com/domoritz)) - fix: revert back to commons js [#1975](https://github.com/vega/ts-json-schema-generator/pull/1975) ([@arthurfiorette](https://github.com/arthurfiorette)) - fix: remove ts-expose-types temporarily [#1968](https://github.com/vega/ts-json-schema-generator/pull/1968) ([@arthurfiorette](https://github.com/arthurfiorette)) - Added diagnostics to all errors [#1963](https://github.com/vega/ts-json-schema-generator/pull/1963) ([@arthurfiorette](https://github.com/arthurfiorette)) #### πŸ› Bug Fix - fix: Unknown type "undefined" when using generics without base type [#1978](https://github.com/vega/ts-json-schema-generator/pull/1978) ([@arthurfiorette](https://github.com/arthurfiorette)) #### πŸ”© Dependency Updates - chore(deps-dev): bump eslint from 9.2.0 to 9.3.0 [#1970](https://github.com/vega/ts-json-schema-generator/pull/1970) ([@dependabot[bot]](https://github.com/dependabot[bot])) - chore(deps-dev): bump ajv from 8.13.0 to 8.14.0 [#1971](https://github.com/vega/ts-json-schema-generator/pull/1971) ([@dependabot[bot]](https://github.com/dependabot[bot])) - chore(deps-dev): bump typescript-eslint from 7.8.0 to 7.10.0 [#1972](https://github.com/vega/ts-json-schema-generator/pull/1972) ([@dependabot[bot]](https://github.com/dependabot[bot])) #### Authors: 3 - [@dependabot[bot]](https://github.com/dependabot[bot]) - Arthur Fiorette ([@arthurfiorette](https://github.com/arthurfiorette)) - Dominik Moritz ([@domoritz](https://github.com/domoritz))
arthurfiorette commented 1 month ago

The problem is surely deeper than that, since its returning undefined to a type that should always be defined, but this is a temp fix until I have time to deeper investigate this issue.

github-actions[bot] commented 1 month ago

:rocket: PR was released in v2.3.0 :rocket: