YousefED / typescript-json-schema

Generate json-schema from your Typescript sources
BSD 3-Clause "New" or "Revised" License
3.17k stars 323 forks source link

Remove suppressImplicitAnyIndexErrors from tsconfig #593

Closed raineorshine closed 8 months ago

raineorshine commented 8 months ago

Please:

This PR is a continuation of the Typescript v5 upgrade (#564) that factors out the implicit use of index signatures, allowing suppressImplicitAnyIndexErrors and ignoreDeprecations to be removed from the tsconfig.

Due to the extensive use of indexing into interfaces (namely Definition), I have created a DefinitionIndex type that is a looser version of Definition allowing indexing. In other cases I needed to cast a type as a Record or cast a key as keyof Definition in order to allow the desired indexing.

Let me know if you know of a more elegant approach, or have any additional feedback.

domoritz commented 8 months ago

Thank you