Created
November 29, 2021 11:28
-
-
Save charlypoly/49e083e4861d39fd569a27cc778d29c2 to your computer and use it in GitHub Desktop.
TypeScript Force checking index accesses (1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let myPrices: number[] = [1, 2.4, 2.0] | |
const defaultPrice = myPrices[40] | |
// `defaultPrice` is of type `number` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment