Seems that it doesn't correctly infer email type (it has no clue what parameter type is expected and may resolve it by name to some existing function in your app). Try ctrl+clicking on email - what definition are you taken to?
When I tried ctrl + clicking it to find the parameter definition it does nothing. I installed the type library for passport, as well as passport local, so I'm unsure why it thinks that. Email is defined as a string in the User Schema (which is in the Model folder, as it should be). Is there a way I can get it to infer that it's a string?
Does it work if you write
Also, did you try invalidating caches?
Elena,
I tried invalidating the cache and restarting, didn't change it.
I tried console.log('HELLO'.toLowerCase()); And it does work, so it must not like that I'm applying it to a variable?
Seems that it doesn't correctly infer email type (it has no clue what parameter type is expected and may resolve it by name to some existing function in your app). Try ctrl+clicking on email - what definition are you taken to?
When I tried ctrl + clicking it to find the parameter definition it does nothing. I installed the type library for passport, as well as passport local, so I'm unsure why it thinks that. Email is defined as a string in the User Schema (which is in the Model folder, as it should be). Is there a way I can get it to infer that it's a string?
You can try using inline JsDoc annotations, like
(/*string*/emailNo such luck
you need ading the annotation to your callback declaration
That worked! Thank you! Never used jsDoc annotations before, thanks!