You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
What version of TypeScript are you using?
TypeScript 2.2
What version of typescript-eslint-parser are you using? typescript-eslint-parser 2.1
What code were you trying to parse?
classWorld{batman(...args);batman(num: number){}}// This also failed to parsefunctionbatman(...args);functionbatman(num: number){}
What happened?
TypeError: Cannot read property 'type' of null
at Referencer.visitFunction (U:\Documents\batman\node_modules\escope\lib\referencer.js:258:26)
at Referencer.FunctionExpression (U:\Documents\batman\node_modules\escope\lib\referencer.js:569:18)
at Referencer.Visitor.visit (U:\Documents\batman\node_modules\esrecurse\esrecurse.js:122:34)
at Referencer.visitProperty (U:\Documents\batman\node_modules\escope\lib\referencer.js:297:18)
at Referencer.MethodDefinition (U:\Documents\batman\node_modules\escope\lib\referencer.js:452:18)
at Referencer.Visitor.visit (U:\Documents\batman\node_modules\esrecurse\esrecurse.js:122:34)
at Referencer.Visitor.visitChildren (U:\Documents\batman\node_modules\esrecurse\esrecurse.js:101:38)
at Referencer.Visitor.visit (U:\Documents\batman\node_modules\esrecurse\esrecurse.js:125:14)
at Referencer.visitClass (U:\Documents\batman\node_modules\escope\lib\referencer.js:281:18)
at Referencer.ClassDeclaration (U:\Documents\batman\node_modules\escope\lib\referencer.js:488:18)
This is a known issue. Unfortunately the scope anaylsis tool that eslint uses does not support empty body functions that can be found in typescript. This includes abstract methods, declared classes, and function overloads. This has since been fixed in ESLint v4 but there are still eslint rules that do not work with this syntax. We are working on getting this fixed as well.
What version of TypeScript are you using?
TypeScript 2.2
What version of
typescript-eslint-parser
are you using?typescript-eslint-parser
2.1What code were you trying to parse?
What happened?
Working code
The following code works:
Appearantly, only
batman(...args);
(rest parameter without type annotation) cause thenull
error.The text was updated successfully, but these errors were encountered: