How can I get autocompletion on the object keys if the keys should be one of the possible strings only?
In the following code, I am getting the required property error. "must" is missing in type '{ must_not: any; }' but required in type 'Operator'.(2741)
type Operator = Record<"must" | "must_not", any>
const x : Operator = {
must: ...
}
const y : Operator = {
must_not: ...
}
Where I can have only one of the key names at once either "must" or "must_not".