laramie
laramie

Reputation: 77

Typescript: Types are removed for a generic interface/function

I seem to be an idiot, this is in VSCode using typescript.

When I define an interface, and then attempt to use that interface in a function the intellisense seems to be removed. Since it's a little hard to explain, I added a picture to describe it.
In the first picture, you can see that I am able to get intellisense for the send function.
In the second (when I actually attempt to use it), you can see that both intellisense and type information has been removed. How do I resolve this?

enter image description here

Upvotes: 0

Views: 221

Answers (1)

Matt Bierner
Matt Bierner

Reputation: 65593

I believe you are running into this known TypeScript issue: https://github.com/Microsoft/TypeScript/issues/14344

This is a bug as of TypeScript 2.5. The type checking should all work properly, we just don't provide the correct suggestions in this case

Upvotes: 1

Related Questions