facebook / facebook/flow

Reuse flow class declaration for class definition

Đang mở
#3,193 8 bình luận 2 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
22.3k
Fork
1.9k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi
how can I reuse my class declaration in this case without to copy paste all members in the class definition?

```
declare type A {
a: string;
}

class A extends EventEmitter {

foo() {
this.a // error property not found
}
}
```

I thought flow would recognize that `class` A is an instance of `type` A but it doesn't.

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

Mở hướng dẫn đóng góp

Đá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.