Skip to content

QuickFix error: add missing import with already reexported variable #18272

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
GiedriusGrabauskas opened this issue Sep 6, 2017 · 0 comments
Closed
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@GiedriusGrabauskas
Copy link

GiedriusGrabauskas commented Sep 6, 2017

TypeScript Version: nightly (2.6.0-dev.20170904)

Code

./a.ts

export const A_VALUE: string = "ASTRING";

./b.ts

export { A_VALUE } from "./a";

A_VALUE // Using quick fix here

Actual behavior:

'getCodeFixes' request failed with error.
Error processing request. Cannot read property 'kind' of undefined
TypeError: Cannot read property 'kind' of undefined
    at getCodeActionsForExistingImport (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:74051:40)
    at getCodeActionForImport (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:74039:28)
    at Object.getImportCodeActions [as getCodeActions] (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:73995:60)
    at d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:73159:33
    at Object.forEach (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:1292:30)
    at Object.getFixes (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:73158:16)
    at d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:77017:35
    at Object.flatMap (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:1524:25)
    at Object.getCodeFixesAtPosition (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:77015:23)
    at IOSession.Session.getCodeFixes (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:83053:64)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:81971:61)
    at d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:83197:88
    at IOSession.Session.executeWithRequestId (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:83188:28)
    at IOSession.Session.executeCommand (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:83197:33)
    at IOSession.Session.onMessage (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:83217:35)
    at Interface.<anonymous> (d:\test\ts-error5\node_modules\typescript\lib\tsserver.js:84307:27)
    at emitOne (events.js:96:13)
    at Interface.emit (events.js:188:7)
    at Interface._onLine (readline.js:247:10)
    at Interface.<anonymous> (readline.js:384:12)
    at Array.forEach (native)
    at Interface._normalWrite (readline.js:383:11)
    at Socket.ondata (readline.js:107:10)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:551:20)
@mhegazy mhegazy assigned ghost Sep 6, 2017
@mhegazy mhegazy added the Bug A bug in TypeScript label Sep 6, 2017
@mhegazy mhegazy added this to the TypeScript 2.6 milestone Sep 6, 2017
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Sep 9, 2017
@ghost ghost closed this as completed in #18341 Sep 9, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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