-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
TypeScript Version: 2.7.0-dev.201xxxxx
Code
this._cachedTypeClasses[typeName] = /** @type function(new:Object) */ (object);Expected behavior:
object cast to function(new:Object)
Actual behavior:
front_end/Runtime.js(398,24): error TS1138: Parameter declaration expected.
(Parse error on function keyword)
We've seen this before (and crashed on it), but choose not to make it not an error because it seemed wrong; however a lot of code that validates under closure compiler (namely the chrome devtools) appears to be written like this.
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationFixedA PR has been merged for this issueA PR has been merged for this issue