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-eslint-parser are you using? [email protected]
What code were you trying to parse?
export class Book {
constructor(fields: Partial<Book>);
constructor(data: any = null) {
}
}
What did you expect to happen?
No errors
What happened?
Cannot read property 'type' of null
TypeError: Cannot read property 'type' of null
at Referencer.visitFunction (d:\Dev\koa-boilerplate\node_modules\escope\lib\referencer.js:258:26)
at Referencer.FunctionExpression (d:\Dev\koa-boilerplate\node_modules\escope\lib\referencer.js:569:18)
at Referencer.Visitor.visit (d:\Dev\koa-boilerplate\node_modules\esrecurse\esrecurse.js:122:34)
at Referencer.visitProperty (d:\Dev\koa-boilerplate\node_modules\escope\lib\referencer.js:297:18)
at Referencer.MethodDefinition (d:\Dev\koa-boilerplate\node_modules\escope\lib\referencer.js:452:18)
at Referencer.Visitor.visit (d:\Dev\koa-boilerplate\node_modules\esrecurse\esrecurse.js:122:34)
at Referencer.Visitor.visitChildren (d:\Dev\koa-boilerplate\node_modules\esrecurse\esrecurse.js:101:38)
at Referencer.Visitor.visit (d:\Dev\koa-boilerplate\node_modules\esrecurse\esrecurse.js:125:14)
at Referencer.visitClass (d:\Dev\koa-boilerplate\node_modules\escope\lib\referencer.js:281:18)
at Referencer.ClassDeclaration (d:\Dev\koa-boilerplate\node_modules\escope\lib\referencer.js:488:18)
The text was updated successfully, but these errors were encountered:
The problem was that escope did not know how to handle functions with empty bodies. We have since forked escope and will release it with eslint v4. There are still some rules that will crash when they see empty body functions but we are working to correct them.
What version of TypeScript are you using?
[email protected]
What version of
typescript-eslint-parser
are you using?[email protected]
What code were you trying to parse?
What did you expect to happen?
No errors
What happened?
The text was updated successfully, but these errors were encountered: