glideapps / glideapps/quicktype
Splitting Interfaces if types overlap
- Dominant language
- TypeScript
- Stars
- 13.9k
- Forks
- 1.2k
- Avg merge
- 8h 53m
- Merged PRs (30d)
- 369
Description
Is there a setting for quicktyp to force splitting interfaces if types overlap with each other? I tried all settings on the [app.quicktype.io](https://app.quicktype.io/) sandbox, but couldn't find a solution for this problem.
Source Data:
```json
{
"mercedes": {
"wheel": "front"
},
"hunday": {
"wheel": "front"
}
}
```
Generated Typescript:
```typescript
export interface Manufacturer {
mercedes: Hyundai;
hyundai: Hyundai;
}
export interface Hyundai {
wheel: string;
}
```
The solution i would desire:
```typescript
export interface Temperatures {
mercedes: Mercedes;
hyundai: Hyundai;
}
export interface Mercedes {
wheel: string;
}
export interface Hyundai {
wheel: string;
}
```
Contributor guide
Assessment
This issue has not been assessed yet.