facebook / facebook/flow

Callable Object Intersection with Function

Open
#5,497 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
22.3k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

In https://github.com/flowtype/flow-typed/pull/1635 I have tried to implement the flow types for https://github.com/albburtsev/bem-cn.

I have tried to implement the type of the main API through a [callable object](https://github.com/flowtype/flow-typed/pull/1635/files#diff-8341f3517c79fc1b0db67f7e281dfdd6R22) and another [simple function](https://github.com/flowtype/flow-typed/pull/1635/files#diff-8341f3517c79fc1b0db67f7e281dfdd6R34) as the function called without any parameters returns a string otherwise it returns a copy of itself with some configuration set.

As soon as I add the [intersection](https://github.com/flowtype/flow-typed/pull/1635/files#diff-8341f3517c79fc1b0db67f7e281dfdd6R18) between the callable object and the string-function all checks on the additional properties of the callable object are ignored. Did I do something wrong, is this intended or a bug?

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.