Duplicate static `from*` helper methods are produced
Open
p2
- Dominant language
- TypeScript
- Stars
- 24
- Forks
- 14
- Avg merge
- 22m
- Merged PRs (30d)
- 4
Description
Given the following snippet from a JSON Schema:
```json
{
"shell": {
"anyOf": [
{
"type": "string"
},
{
"type": "string",
"enum": ["bash", "pwsh", "python", "sh", "cmd", "powershell"]
}
]
}
}
```
Will produce invalid code, where `fromString` is duplicated:
```ts
export class Shell {
public static fromString(value: string): Shell {
return new Shell(value);
}
public static fromString(value: string): Shell {
return new Shell(value);
}
private constructor(public readonly value: string | string) {
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.