JSDoc Polymorphism + type casting
Webstorm is throwing up a warning (correctly) when we are trying to assign/return polymorphic types. Here is an example:

In a compiled language (like C#), the above code wouldn't compile without a type cast, and in this case, we can safely cast. How can I achieve the same in JSDoc land? (P.S., if derivedSet returns a BaseModel, everything is happy, but derivedSet should be returning DerivedModel).
Thanks!
Please sign in to leave a comment.
should do the thing
see https://github.com/google/closure-compiler/wiki/Using-JSDoc-Annotations-with-Closure-compiler#type-cast