Skip to content

TS Server errors for javascript containing invalid jsdoc type #24913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mjbvz opened this issue Jun 12, 2018 · 1 comment
Closed

TS Server errors for javascript containing invalid jsdoc type #24913

mjbvz opened this issue Jun 12, 2018 · 1 comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jun 12, 2018

From microsoft/vscode#51626 (comment)

TypeScript Version: 3.0.0-dev.20180609

Search Terms:

  • jsdoc

Code
For the js:

/**
 * @param {<Array<number>} arr
 */
function foo(arr) {} 

Bug
Notice a lot of TS Server request start failing now:

[Error  - 2:45:30 PM] 'getCodeFixes' request failed with error.
Error processing request. Debug Failure. False expression.
Error: Debug Failure. False expression.
    at tryDeleteIdentifier (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:86017:34)
    at tryDeleteDeclaration (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:85971:21)
    at /Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:85864:97
    at Function.ChangeTracker.with (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:83381:17)
    at Object.getCodeActions (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:85864:65)
    at /Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:84065:121
    at Object.flatMap (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:1820:25)
    at Object.getFixes (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:84065:23)
    at /Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:91271:35
    at Object.flatMap (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:1820:25)
    at Object.getCodeFixesAtPosition (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:91269:23)
    at IOSession.Session.getCodeFixes (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:97969:64)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:96793:61)
    at /Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:98126:88
    at IOSession.Session.executeWithRequestId (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:98117:28)
    at IOSession.Session.executeCommand (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:98126:33)
    at IOSession.Session.onMessage (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:98146:35)
    at Interface.<anonymous> (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:99377:27)
    at emitOne (events.js:116:13)
    at Interface.emit (events.js:211:7)
    at Interface._onLine (readline.js:282:10)
    at Interface._normalWrite (readline.js:424:12)
    at Socket.ondata (readline.js:141:10)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)
    at readableAddChunk (_stream_readable.js:250:11)
    at Socket.Readable.push (_stream_readable.js:208:10)
    at Pipe.onread (net.js:594:20)
@ghost
Copy link

ghost commented Jun 14, 2018

I've reproduced this:

/// <reference path='fourslash.ts' />

// @allowJs: true

// @Filename: /a.js
/////**
//// * @param {<Array<number>} arr
//// */
////function foo(arr) {}

verify.codeFix({
    index: 1,
    description: "Remove declaration for: 'arr'",
    newFileContent:
`???`,
});

This only reproduces this way in recent builds, so I can't fix this now due to #24697.

@ghost ghost added the Fixed A PR has been merged for this issue label Jun 16, 2018
@ghost ghost closed this as completed in #25014 Jun 19, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants