How can I add a any string option to a typescript literal string enum?
12:47 24 Jan 2020

I am trying to allow any arbitrary string value on a literal string type and allow for intellisense. Consider the following type:

type possibleValues = 'value0' | 'value1' | 'value2'

This in vscode will show

enter image description here

But if i change my code to:

type possibleValues = 'value0' | 'value1' | 'value2' | string

I no longer get intellisense, but the code will work as expected.

My question is, is there a way to set this type so that it will allow for an arbitrary string value while offering intellisense?

typescript