TypeScript Version: 3.4.0-dev.20190307
Search Terms:
Code
function foo<K extends 'a' | 'b'>(k: K) {
if (k === 'a') {
const x: 'a' = k; // Type 'K' is not assignable to type '"a"
}
}
Expected behavior:
Actual behavior:
Playground Link:
Related Issues: