Skip to content

Instantly share code, notes, and snippets.

@anztrax
Created December 1, 2025 04:12
Show Gist options
  • Select an option

  • Save anztrax/84700f60d06b5360feb2a9ba7f83ff8e to your computer and use it in GitHub Desktop.

Select an option

Save anztrax/84700f60d06b5360feb2a9ba7f83ff8e to your computer and use it in GitHub Desktop.
Simple implementation of Last type in Typescript
type Last<T extends any[]> = T extends [...any, infer B] ? B: never;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment