This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
Parsing multiple call signatures throws exception #92
Closed
Description
For fun I decided to test VSCode using this parser (seemed like a good large project to test) and my first error was this:
If you guys are open to it I would be happy to actually fork VSCode and setup Travis to smoke test the parser against it. That way I can easily open new issues as fixes are released.
What version of TypeScript are you using?
1.8.10
What version of typescript-eslint-parser
are you using?
0.3.0
What code were you trying to parse?
export class Test {
constructor() {
}
public test(param1: Number): Test;
public test(param1: Test): Test;
public test(param1: any): Test {
return new Test();
}
}
What did you expect to happen?
Should parse out the multiple function definitions
What happened?
Cannot read property 'type' of null
TypeError: Cannot read property 'type' of null
at Referencer.visitFunction (/usr/local/lib/node_modules/eslint/node_modules/escope/lib/referencer.js:258:26)
at Referencer.FunctionExpression (/usr/local/lib/node_modules/eslint/node_modules/escope/lib/referencer.js:569:18)
at Referencer.Visitor.visit (/usr/local/lib/node_modules/eslint/node_modules/esrecurse/esrecurse.js:122:34)
at Referencer.visitProperty (/usr/local/lib/node_modules/eslint/node_modules/escope/lib/referencer.js:297:18)
at Referencer.MethodDefinition (/usr/local/lib/node_modules/eslint/node_modules/escope/lib/referencer.js:452:18)
at Referencer.Visitor.visit (/usr/local/lib/node_modules/eslint/node_modules/esrecurse/esrecurse.js:122:34)
at Referencer.Visitor.visitChildren (/usr/local/lib/node_modules/eslint/node_modules/esrecurse/esrecurse.js:101:38)
at Referencer.Visitor.visit (/usr/local/lib/node_modules/eslint/node_modules/esrecurse/esrecurse.js:125:14)
at Referencer.visitClass (/usr/local/lib/node_modules/eslint/node_modules/escope/lib/referencer.js:281:18)
at Referencer.ClassDeclaration (/usr/local/lib/node_modules/eslint/node_modules/escope/lib/referencer.js:488:18)