-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
Domain: LS: 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.1.3 and 3.2.0-dev.20181110
Search Terms:
Intellisense suggestions generic type
Code
interface Options {
someFunction?: () => string
anotherFunction?: () => string
}
export class Clazz<T extends Options> {
constructor(public a: T) {
}
}
new Clazz({
// ctrl + space on above line does not provide any suggestion
// it does when:
// - making some/anotherFunction required instead of optional (in Options)
// OR
// - giving constructor's first param a type of `T | Options`
})Expected behavior:
suggest someFunction and anotherFunction.
Actual behavior:
no suggestions
Related Issues:
cspotcode, teevik, mirkancal, aleclarson, ssalbdivad and 3 moressalbdivad
Metadata
Metadata
Assignees
Labels
Domain: LS: 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