amilajack / amilajack/eslint-plugin-flowtype-errors

Report error which Flow does not report

Đang mở
#71 8 bình luận 0 reaction 0 người được giao Xem trên GitHub
question waiting-for-response
Ngôn ngữ chính
JavaScript
Star
402
Fork
23
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.