Skip to content

Instantly share code, notes, and snippets.

@Misaka-0x447f
Created November 19, 2021 10:16
Show Gist options
  • Save Misaka-0x447f/3ae6e0beaec7e08be24a445dd136ac35 to your computer and use it in GitHub Desktop.
Save Misaka-0x447f/3ae6e0beaec7e08be24a445dd136ac35 to your computer and use it in GitHub Desktop.
Overriding arrow function
const m: {
(a: string): void;
(b: number): void
} = (c: string | number) => {}
// editor now knows first use name a, second use name b.
m('1')
m(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment