Re:TypeScript 3.7
by emptysea on Tuesday November 05, 2019 @06:42PM
(#21458131)
I can't seem the find the GitHub issue for it off hand, but I believe you can override the default indexing signature for arrays to return possibly undefined.
Otherwise, you're left to creating a wrapper function and a custom ESlint rule.
Otherwise, you're left to creating a wrapper function and a custom ESlint rule.
Edit: found it https://github.com/microsoft/TypeScript/issues/13778#issueco...
The suggestion is to maintain your own copy of `index.d.ts` with the array indexing interface modified. Yikes!