Allows you to have autocomplete on a string while still accepting any string value.
type Fruits = LooseAutocomplete<'apple' | 'orange' | 'pear'>;// you will still get autocomplete herelet fruit: Fruits = 'apple'; // validfruit = 'banana'; // valid Copy
type Fruits = LooseAutocomplete<'apple' | 'orange' | 'pear'>;// you will still get autocomplete herelet fruit: Fruits = 'apple'; // validfruit = 'banana'; // valid
Allows you to have autocomplete on a string while still accepting any string value.
Usage