-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code
Description
TypeScript Version: 3.4.4
Search Terms:
Code
interface TestType {
a: number;
b: string;
[key:string]: any;
}
type NTestType1 = {
[P in keyof TestType]: any;
}
const test:NTestType1 = {} // error missing a and b. this is correct.
type NTestType2 = {
[P in Exclude<keyof TestType, 'a'>]: any;
}
const test::NTestType2 = {} // no error, we expect show missing b error here.Expected behavior:
show missing b error
Actual behavior:
no error
Playground Link:
Related Issues:
HosseinAgha, bradharms, felschr, seanblonien, tuxracer and 4 more
Metadata
Metadata
Assignees
Labels
QuestionAn issue which isn't directly actionable in codeAn issue which isn't directly actionable in code