Skip to content

Cannot read property 'flags' of undefined in JS class #25387

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 Jul 3, 2018 · 0 comments
Closed

Cannot read property 'flags' of undefined in JS class #25387

mjbvz opened this issue Jul 3, 2018 · 0 comments
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jul 3, 2018

From microsoft/vscode#53250

TypeScript Version: 3.0.0-dev.20180630

Search Terms:

Code
In a js file:

class Child extends Namespace.Parent {

}

Request completions inside the class

Bug

[Error  - 18:12:36] 'completions' request failed with error.
Error processing request. Cannot read property 'flags' of undefined
TypeError: Cannot read property 'flags' of undefined
    at getApparentType (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:35388:25)
    at Object.getPropertiesOfType (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:35133:20)
    at /Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:91759:44
    at Object.flatMap (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:471:25)
    at tryGetClassLikeCompletionSymbols (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:91757:42)
    at tryGetGlobalSymbols (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:91302:24)
    at getCompletionData (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:91191:22)
    at Object.getCompletionsAtPosition (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:90410:34)
    at Object.getCompletionsAtPosition (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:110196:35)
    at IOSession.Session.getCompletions (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:117787:64)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:116820:61)
    at /Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:118299:88
    at IOSession.Session.executeWithRequestId (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:118290:28)
    at IOSession.Session.executeCommand (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:118299:33)
    at IOSession.Session.onMessage (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:118319:35)
    at Interface.<anonymous> (/Users/matb/projects/san/node_modules/typescript/lib/tsserver.js:119574:27)
    at emitOne (events.js:96:13)
    at Interface.emit (events.js:191:7)
    at Interface._onLine (readline.js:241:10)
    at Interface._normalWrite (readline.js:384:12)
    at Socket.ondata (readline.js:101:10)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at readableAddChunk (_stream_readable.js:178:18)
    at Socket.Readable.push (_stream_readable.js:136:10)
    at Pipe.onread (net.js:560:20)

Playground Link:

Related Issues:

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

4 participants