facebook / facebook/flow

Reuse flow class declaration for class definition

Open
#3,193 8 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.