-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider adding noUncheckedIndexedAccess
to tsconfig
#6009
Comments
You shouldn't be pulling these files into your TS compilation pipeline. They are only there to provide accurate sourcemaps. Your |
Thanks for the reply @adidahiya. I see I am inadvertently importing some types from |
Environment
4.x
and5.x
4.1
)Feature request
The request is for
blueprint
to include"noUncheckedIndexedAccess": true
in itstsconfig
. The reasoning is as follows:By default, TypeScript will not correctly infer when an array element can be undefined
On ~recent release of TS (
4.1
) this behaviour can be changed via a configurationmicrosoft/TypeScript#39560
https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess
Unfortunately because
blueprint
shipstsx
files directly, any library which usesblueprint
as a dependency will be unable to set"noUncheckedIndexedAccess": true
in itstsconfig.ts
. Doing so will result in build time failures during the TypeScript compilation, for exampleThe text was updated successfully, but these errors were encountered: