gajus / gajus/flow-runtime

error with type declaration with generics

Open
#182 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
797
Forks
49
PR merge metrics
No merged PRs in 30d

Description

This is a: Bug Report

Which concerns: flow-runtime

---

``` js
type Many = T | T[];
const test: Many = ["Hello World", 0];
```

---

### What is the current behaviour?

```
Value must be one of: T | Array

Expected: T | Array

Actual Value: [
"Hello World",
0
]

Actual Type: Array
```

---

### What is the expected behaviour?

No error should be thrown

---

### Which package versions are you using?

flow-runtime 0.16.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.