typescript-tips

stackblitz StackBlitz (@stackblitz) - November 9, 2020 at 11:12 PM

💡 TypeScript tip:

TypeScript infers array’s type as an Array of the union of included types… which may not be precise enough.

If you want this value to be inferred as a Tuple instead, add as const pic.twitter.com/mLbG6yXuKX

Tweet link