Skip to content
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

TypeError: Cannot read property 'flags' of undefined #15456

Closed
mhegazy opened this issue Apr 28, 2017 · 1 comment · Fixed by #16066
Closed

TypeError: Cannot read property 'flags' of undefined #15456

mhegazy opened this issue Apr 28, 2017 · 1 comment · Fixed by #16066
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@mhegazy
Copy link
Contributor

mhegazy commented Apr 28, 2017

import {Component } from "react";

interface MapProps {
    prop1: string;
}

export class MyMap<P = MapProps, E = number> extends Component<P, E> { }


let x = <Map prop1="hi" />

Put your cursor on Map

TypeError: Cannot read property 'flags' of undefined
    at Object.resolveAlias [as getAliasedSymbol] (C:\ls\tsserver.js:26702:36)
    at Object.getCodeActions (C:\ls\tsserver.js:85017:42)
    at C:\ls\tsserver.js:84359:33
    at Object.forEach (C:\ls\tsserver.js:1428:30)
    at Object.getFixes (C:\ls\tsserver.js:84358:16)
    at C:\ls\tsserver.js:87080:40
    at Object.forEach (C:\ls\tsserver.js:1428:30)
    at Object.getCodeFixesAtPosition (C:\ls\tsserver.js:87068:16)
    at IOSession.Session.getCodeFixes (C:\ls\tsserver.js:93345:64)
    at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (C:\ls\tsserver.js:92338:61)
@mhegazy mhegazy added the Bug A bug in TypeScript label Apr 28, 2017
@mhegazy mhegazy self-assigned this Apr 28, 2017
@mhegazy mhegazy added this to the TypeScript 2.4 milestone Apr 28, 2017
@mhegazy mhegazy assigned ghost and unassigned mhegazy May 24, 2017
@ghost
Copy link

ghost commented May 24, 2017

I'm seeing a related error:

{
  "seq": 0,
  "type": "response",
  "command": "getCodeFixes",
  "request_seq": 7,
  "success": false,
  "message": "Error processing request. Debug Failure. False expression: Should only get Alias here.\nError: Debug Failure. False expression: Should only get Alias here.\n    at Object.assert (/home/andy/.nvm/versions/node/v7.10.0/lib/node_modules/typescript/lib/tsserver.js:2959:23)\n    at Object.resolveAlias [as getAliasedSymbol] (/home/andy/.nvm/versions/node/v7.10.0/lib/node_modules/typescript/lib/tsserver.js:23331:22)\n    at Object.getImportCodeActions [as getCodeActions] (/home/andy/.nvm/versions/node/v7.10.0/lib/node_modules/typescript/lib/tsserver.js:71302:38)\n    at /home/andy/.nvm/versions/node/v7.10.0/lib/node_modules/typescript/lib/tsserver.js:70603:33\n    at Object.forEach (/home/andy/.nvm/versions/node/v7.10.0/lib/node_modules/typescript/lib/tsserver.js:1286:30)\n    at Object.getFixes (/home/andy/.nvm/versions/node/v7.10.0/lib/node_modules/typescript/lib/tsserver.js:70602:16)\n    at /home/andy/.nvm/versions/node/v7.10.0/lib/node_modules/typescript/lib/tsserver.js:73252:40\n    at Object.forEach (/home/andy/.nvm/versions/node/v7.10.0/lib/node_modules/typescript/lib/tsserver.js:1286:30)\n    at Object.getCodeFixesAtPosition (/home/andy/.nvm/versions/node/v7.10.0/lib/node_modules/typescript/lib/tsserver.js:73240:16)\n    at IOSession.Session.getCodeFixes (/home/andy/.nvm/versions/node/v7.10.0/lib/node_modules/typescript/lib/tsserver.js:78933:64)"
}

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label May 25, 2017
@ghost ghost closed this as completed in #16066 Jun 5, 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

Successfully merging a pull request may close this issue.

1 participant