Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. charlypoly created this gist Nov 29, 2021.
    4 changes: 4 additions & 0 deletions retool-typescript-control-flow-analysis-14.ts
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    let myPrices: number[] = [1, 2.4, 2.0]

    const defaultPrice = myPrices[40]
    // `defaultPrice` is of type `number`