facebook / facebook/flow

Allow return this in interface

Open
#5,250 4 comments 2 reactions 0 assignees View on GitHub
feature request Typing: interfaces
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Currently one can do:

```javascript
declare class Foo {
method(): this;
}
```

However, one is not able to repeat this in an interface.

Ability to define an interface that mandates that the implementer returns it self for fluent interfaces is desired.

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.