core
core copied to clipboard
Build failure with `exactOptionalPropertyTypes` enabled
Is your feature request related to a problem? Please describe.
Building the project using this library fails when exactOptionalPropertyTypes
is enabled in project's tsconfig.json
unless skipLibCheck
is also set to true
. skipLibCheck
bypasses type checking for third-party libraries, compromising type safety.
Describe the solution you'd like
- Add the
exactOptionalPropertyTypes
property tooclif/core
'stsconfig.json
. - Make any necessary code changes to ensure successful build with this option enabled.
Example rc/config/plugin.ts#L85:
From | To |
|
|
Additional context
- This change will improve type safety, leading to fewer potential runtime errors.
- It demonstrates adherence to best practices for TypeScript projects.
I would be happy to come up with a PR or collaborate on a potential solution.