Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

array-callback-return TypeError #400

Closed
pat841 opened this issue Oct 24, 2017 · 1 comment
Closed

array-callback-return TypeError #400

pat841 opened this issue Oct 24, 2017 · 1 comment

Comments

@pat841
Copy link

pat841 commented Oct 24, 2017

What version of TypeScript are you using?
2.5.3

What version of typescript-eslint-parser are you using?
8.0.1

What code were you trying to parse?

export abstract class TestAbstract {

  onCreated?(): Promise<void> | any;

}

What did you expect to happen?
ESLint shouldnt fail when parsing the file.

What happened?
TypeError: Cannot read property 'type' of null
node_modules/eslint/lib/rules/array-callback-return.js:194:34

If I add a function body, it works:

  onCreated(): Promise<void> | any {

  }
@JamesHenry
Copy link
Member

Thanks @pat841, this is the same issue around TS function constructs not having a body interfering with expectations in ESLint rules. We are discussing the best way to address this right now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants