Darius Zivertas profile photo
Darius Zivertas
May 16, 2025

Typescript autocomplete

autocomplete.ts
TypeScript

type MyStrings =
  | 'One'
  | 'Two'
  | (string & {});
  
const mystring: MyStrings = "this will not error and autocomplete will still work";

View this gist on GitHub

HomeBlogProjectsSnippetsSearchContact