Skip to content

Instantly share code, notes, and snippets.

@MariusBongarts
Created August 3, 2023 06:56
Show Gist options
  • Save MariusBongarts/88d2c0a03cf7f794dbdd2b3bfa1e8d54 to your computer and use it in GitHub Desktop.
Save MariusBongarts/88d2c0a03cf7f794dbdd2b3bfa1e8d54 to your computer and use it in GitHub Desktop.
// ❌ error before Typescript 5.2
type MixedTupleRest = [first: string, ...string[]];
// ✅ fixed with label
type MixedTupleRestFixed = [first: string, ...rest: string[]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment