|
|
|
|
|
by gvergnaud
1373 days ago
|
|
It's actually not in the standard library, but you can write it yourself: type Expect<T extends true> = T; `T extends true` puts a type constraint on the parameter, which then needs to be assignable to the literal type `true` to type-check. |
|