facebook / facebook/flow

`Class` should be invariant

Open
#3,201 4 comments 0 reactions 0 assignees View on GitHub
Typing: object model
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Example:

```js
class A {}

class B extends A {
constructor(a: number) {
super();
a.toFixed();
}
}

const a: Class = B;
const b: Class = a;

const x = new b(); // no error
```

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.