Skip to content

Instantly share code, notes, and snippets.

@zzzarius
Created May 16, 2025 15:19
Show Gist options
  • Save zzzarius/39a87ec86f099f2ff5b3f7db47509332 to your computer and use it in GitHub Desktop.
Save zzzarius/39a87ec86f099f2ff5b3f7db47509332 to your computer and use it in GitHub Desktop.
Typescript autocomplete
type MyStrings =
| 'One'
| 'Two'
| (string & {});
const mystring: MyStrings = "this will not error and autocomplete will still work";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment