Closed
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: