Closed
Description
// @filename: foo.js
var /*definition*/Foo = module.exports = function () {
}
Foo.prototype.blah = function() {
}
new Foo/*use*/()
Go to definition on /*use*/
.
Expected: cursor navigates to /*definition*/
Actual:
Debug Failure. Expected declaration to have at least one class-like declaration
Error: Debug Failure. Expected declaration to have at least one class-like declaration
at getConstructSignatureDefinition (...\TypeScript\lib\tsserver.js:115538:89)
at getDefinitionFromSymbol (...\TypeScript\lib\tsserver.js:115533:20)
at getDefinitionAtPosition (...\TypeScript\lib\tsserver.js:115340:32)
at Object.getDefinitionAndBoundSpan (...\TypeScript\lib\tsserver.js:115457:31)
at Proxy.getDefinitionAndBoundSpan (...\TypeScript\lib\tsserver.js:135385:38)
at IOSession.Session.getDefinitionAndBoundSpan (...\TypeScript\lib\tsserver.js:144925:83)
at Session.handlers.ts.createMapFromTemplate._a.<computed> (...\TypeScript\lib\tsserver.js:144251:61)
at ...\TypeScript\lib\tsserver.js:145957:88
at IOSession.Session.executeWithRequestId (...\TypeScript\lib\tsserver.js:145948:28)
at IOSession.Session.executeCommand (...\TypeScript\lib\tsserver.js:145957:33)
at IOSession.Session.onMessage (...\TypeScript\lib\tsserver.js:145981:35)
at Interface.<anonymous> (...\TypeScript\lib\tsserver.js:147296:27)
at Interface.emit (events.js:200:13)
at Interface._onLine (readline.js:314:10)
at Interface._normalWrite (readline.js:459:12)
at Socket.ondata (readline.js:170:10)
at Socket.emit (events.js:200:13)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
at Socket.Readable.push (_stream_readable.js:210:10)
at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)```