sequelize-auto icon indicating copy to clipboard operation
sequelize-auto copied to clipboard

Add options to use separate TypeScript typings file(s) that are not embedded inside of the Model class file

Open scottpageindysoft opened this issue 3 years ago • 2 comments

Having TypeScript interfaces/types in the same file as the Model prevents library authors from creating a boundary between definition and implementation. It at least requires time to copy/move those types from the Model file and into other reusable files.

This is especially troublesome in fullstack applications, where we need to share TS typings between client and server. This kind of requirement has been happening since TypeScripts inception, and the lack of it has only made them resentful for using libraries that won't cope.

Please, add a few options. One to generate the TypeScript typings in one file, and another to generate them in one-type-per-file.

scottpageindysoft avatar Apr 06 '22 07:04 scottpageindysoft

I should leave this on a positive note.

What you've built has already saved me days of time, so I can't thank you enough for your efforts.

You're in a position to save everyone even more time by adding at least the two previously mentioned options.

scottpageindysoft avatar Apr 06 '22 07:04 scottpageindysoft

Sounds like a great idea. Wish I had time to work on it now, but my day job has me swamped at the moment.

steveschmitt avatar Apr 28 '22 20:04 steveschmitt