7 lines
142 B
TypeScript
7 lines
142 B
TypeScript
|
// Test for #26758
|
||
|
|
||
|
function foo<T extends "a" | "b">(t: T) {
|
||
|
t === "a"; // Should be allowed
|
||
|
t === "x"; // Should be error
|
||
|
}
|