-
Notifications
You must be signed in to change notification settings - Fork 13k
Open
Labels
Domain: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorExperience EnhancementNoncontroversial enhancementsNoncontroversial enhancementsSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
TypeScript Version: 3.3.0-dev.20181122
Search Terms:
- autocomplete
- autocomplete generic
- generic extends
- autocomplete keyof extends
- autocomplete keyof generic
Code
type Except<T, K extends keyof T> = Pick<T, { [P in keyof T]: P extends K ? never : P }[keyof T]>;
interface I1 {
foo: string;
}
function F1<T extends I1>(): Except<T, ''> { // error is shown but autocomplete is not provided
//code
return null;
}
Expected behavior:
Having autocomplete showing when extending a generic
Actual behavior:
Even if error is correctly displayed, no autocomplete is shown for a T extends
with a known type on the right hand.
Related Issues:
#16740 - but this one is quite different because it's a keyof issue
waynevanson, felixbillon, billfeng, lucasbento, lsagetlethias and 26 moreYelmuftheoephraim
Metadata
Metadata
Assignees
Labels
Domain: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorExperience EnhancementNoncontroversial enhancementsNoncontroversial enhancementsSuggestionAn idea for TypeScriptAn idea for TypeScript