amilajack / amilajack/eslint-plugin-flowtype-errors

Report error which Flow does not report

Open
#71 8 comments 0 reactions 0 assignees View on GitHub
question waiting-for-response
Dominant language
JavaScript
Stars
402
Forks
23
PR merge metrics
No merged PRs in 30d

Description

This use case is where, in C/C++, a forward declaration would be needed.

`A.js`:
```js
// @flow

import B from './B';

export default class A {
a() { return new B(this); }
}
```

`B.js`:
```js
// @flow

import type A from './A';

export default class B {
a: A;

constructor(a: A) {
this.a = a;
}
}
```

Flow says `No errors!` but `flowtype-errors/show-errors` reports the following in `A.js`:
```
6:23 A: This type is incompatible with the expected param type of A. See ./B.js:8
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.