amilajack / amilajack/eslint-plugin-flowtype-errors

Report error which Flow does not report

未关闭
#71 8 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
question waiting-for-response
主要语言
JavaScript
星标
402
派生
23
PR 合并指标
30 天内没有已合并 PR

描述

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
```

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。