YousefED / typescript-json-schema

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

Remove suppressImplicitAnyIndexErrors from tsconfig #593

Closed raineorshine closed 6 months ago

raineorshine commented 6 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 6 months ago

Thank you