Skip to content

Cannot read property 'escapedName' of undefined#46529

Description

@mjbvz

Bug Report

馃攷 Search Terms

  • jsdoc
  • javascript

馃晽 Version & Regression Information

4.5.0-dev.20211025

馃捇 Repro

  1. Starting with the code:
/**
 * @typedef {{
 *  (a) => string
 * }} Callback2
 */
function foo() { }
  1. After the a inside the typedef, type :x

Bug

 ERR <semantic> TypeScript Server Error (4.5.0-dev.20211025)
Cannot read property 'escapedName' of undefined
TypeError: Cannot read property 'escapedName' of undefined
    at getSignatureFromDeclaration (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:57785:48)
    at getThisTypeOfDeclaration (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:54849:43)
    at tryGetThisTypeAt (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:69726:32)
    at Object.tryGetThisTypeAt (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:47036:32)
    at getGlobalCompletions (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:129361:48)
    at tryGetGlobalSymbols (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:129277:25)
    at getCompletionData (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:129030:22)
    at Object.getCompletionsAtPosition (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:128020:34)
    at Proxy.getCompletionsAtPosition (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:159572:35)
    at IOSession.Session.getCompletions (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:171037:64)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:169882:61)
    at /Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:171686:88
    at IOSession.Session.executeWithRequestId (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:171677:28)
    at IOSession.Session.executeCommand (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:171686:33)
    at IOSession.Session.onMessage (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:171712:35)
    at Interface.<anonymous> (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:174317:31)
    at Interface.emit (events.js:315:20)
    at Interface._onLine (readline.js:337:10)
    at Interface._normalWrite (readline.js:482:12)
    at Socket.ondata (readline.js:194:10)
    at Socket.emit (events.js:315:20)
    at addChunk (internal/streams/readable.js:309:12)
    at readableAddChunk (internal/streams/readable.js:284:9)
    at Socket.Readable.push (internal/streams/readable.js:223:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:188:23): Error: <semantic> TypeScript Server Error (4.5.0-dev.20211025)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputDomain: JSDocRelates to JSDoc parsing and type generationDomain: JavaScriptThe issue relates to JavaScript specificallyEffort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".Help WantedYou can do this

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions