acacode / acacode/swagger-typescript-api
anyOf produces redundant type
Đang mở
- Ngôn ngữ chính
- TypeScript
- Star
- 4.1k
- Fork
- 436
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I'm confused as to the purpose of this line of code: https://github.com/acacode/swagger-typescript-api/blob/5817a95706be4299b4afa76801e940bd62020742/src/schema.js#L210
It produces a type like:
```typescript
type Thing = A | B | C | (A & B & C);
```
But this is the same as
```typescript
type Thing = A | B | C;
```
Anything that is `A & B & C` must also be one of `A`, `B`, or `C`.
It seems like this just makes the type harder to read?
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.