I'm trying to extends Union type. But, it show me an error message.
In other project, there is no problem.
Are there anyone who know about this error?
type Foobar = 'foo' | 'bar';
interface OptionProps<T extends Foobar> {
~~~~~~~ // Parsing error: Unexpected token, expected ","
1 | type Fb = 'foo' | 'bar';
2 |
> 3 | interface OptionProps<T extends Fb> {
| ^
4 | value: T;
5 | setValue: (value: T) => void;
6 | }eslint
value: T;
setValue: (value: T) => void;
}