Below is the code snippet:
type SearchSchemaValue =
| 'tagName'
| 'textContent'
| 'attributes'
| 'attributes.id'
| 'attributes.class'
| 'attributes.style';
export type SearchSchema = (SearchSchemaValue | string)[];
When I define const schema: SearchSchema = ['
, my IDE should ideally suggest values from SearchSchemaValue
. However, it considers SearchSchema
as string[]
.
How can you modify this type to be an array of strings with possible values from SearchSchemaValue
?