You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows TypeScript to protects us better from unchecked indexed access.
I could use the noUncheckedIndexedAccess but it doesn't play nice with the @typescript-eslint/no-unnecessary-condition eslint rule, as according to the type checker myRecord[someKey] will always return a T.
The text was updated successfully, but these errors were encountered:
Currently
Record<K,V>
is defined as follows:I suggest changing it to this:
This allows TypeScript to protects us better from unchecked indexed access.
I could use the
noUncheckedIndexedAccess
but it doesn't play nice with the@typescript-eslint/no-unnecessary-condition
eslint rule, as according to the type checkermyRecord[someKey]
will always return aT
.The text was updated successfully, but these errors were encountered: