Skip to content

Document highlights on 'in' in mapped type causes debug failure #48851

Closed
@DanielRosenwasser

Description

@DanielRosenwasser
export type Foo<T> = {
    [K /**/in keyof T]: any
}

Request document highlights at /**/.

<semantic> Response received: documentHighlights (7298). Request took 3 ms. Success: false . Message: Error processing request. Debug Failure. Invalid container kind. SyntaxKind: MappedType
Error: Debug Failure. Invalid container kind. SyntaxKind: MappedType
    at getNodesToSearchForModifier (node_modules/typescript/lib/tsserver.js:134611:30)
    at getModifierOccurrences (node_modules/typescript/lib/tsserver.js:134568:34)
    at getHighlightSpans (node_modules/typescript/lib/tsserver.js:134478:42)
    at getSyntacticDocumentHighlights (node_modules/typescript/lib/tsserver.js:134432:34)
    at Object.getDocumentHighlights (node_modules/typescript/lib/tsserver.js:134400:118)
    at Object.getDocumentHighlights (node_modules/typescript/lib/tsserver.js:164109:42)
    at IpcIOSession.Session.getDocumentHighlights (node_modules/typescript/lib/tsserver.js:175213:71)
    at Session.handlers.ts.Map.ts.getEntries._a.<computed> (node_modules/typescript/lib/tsserver.js:174507:61)
    at node_modules/typescript/lib/tsserver.js:176311:88
    at IpcIOSession.Session.executeWithRequestId (node_modules/typescript/lib/tsserver.js:176302:28)
    at IpcIOSession.Session.executeCommand (node_modules/typescript/lib/tsserver.js:176311:33)
    at IpcIOSession.Session.onMessage (node_modules/typescript/lib/tsserver.js:176337:35)
    at process.<anonymous> (node_modules/typescript/lib/tsserver.js:178972:31)
    at process.emit (node:events:390:28)
    at emit (node:internal/child_process:917:12)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputEffort: 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