google / tern-closure

A Tern plugin adding Closure support.
Apache License 2.0
32 stars 18 forks source link

Support casting #12

Open jgiles opened 10 years ago

jgiles commented 10 years ago

We should add support for casting:

/** @type {Object} */
var genericObject;
var castObject = /** @type {CastClass} */ (genericObject);
castObject; //: CastClass

Right now, castObject has type {}.

This will be tricky, since it will definitely involve changing the way we attach JSDoc comments to AST nodes.