rmp135 / sql-ts

Generate TypeScript interfaces from a SQL database.
MIT License
466 stars 64 forks source link

Add option to use `type` intstead of `interface` #136

Closed SuperKXT closed 6 months ago

SuperKXT commented 8 months ago

Some prefer type over interface to define object types. While I have no strong feelings about this, I maintain some projects with lint rules to prevent the use of interface.

It will be helpful to add an option to generate with type.

rmp135 commented 6 months ago

Interesting. I won't add it right now, as types are subtly different enough that they collide (e.g. the extends config option would need handling / ignoring). I'll say, for now, use a custom template if you prefer using types.