acacode / acacode/swagger-typescript-api
Option to generate types instead of interfaces
- Dominant language
- TypeScript
- Stars
- 4.1k
- Forks
- 436
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
Is it possible to add an option to generate
```
export type User = {
username?: string;
uuid?: string;
}
```
instead of
```
export interface User {
username?: string;
uuid?: string;
}
```
Sometimes it is necessary to prevent possible expansion of the type. Use case [here](https://www.typescriptlang.org/play?#code/CYUwxgNghgTiAEAzArgOzAFwJYHtVNQEFUBPAeQCMArcDABVigFsAKRHHALngCVwcYwADwBnDDCyoA5gBp4aANaocAd1QA+AJTcAbjizAA3AChjGEgAcEAVREgY8ALzwA3sfjy7MVMxAB+bjEJaRMPZGQDAPggySkTAF9TSQx7RCgwBABJW3tXd097HyZ-QPFY0PkI4CiYkONE4wgQDHgoUm42khNEIlJKGkwGGGYWTtaReByYTUN4AHo5+HMreABaeBwFYx7icmpaIZGxqAnsrxn5xeTU9IR1tKwIbd69gfpGVhd4ADpf49OpvB4hcFvBrjA0hk1mCmBZhpgsGAoBB4CoBApYDg0MBjEA)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.