w3tecch / typeorm-seeding

🌱 A delightful way to seed test data into your database.
https://www.npmjs.com/package/typeorm-seeding
MIT License
887 stars 132 forks source link

Adapt seeder to an abstract class #185

Closed jorgebodega closed 2 years ago

jorgebodega commented 2 years ago

To fix #119 we need to find a way to avoid the problem of export multiple elements but not checking if those are seeder.

A possible approach is to define Seeders as an abstract class instead of an interface. That will allow us to use instanceof to infer what could be used as a seeder. Similarly to new seeder of MikroORM.

Or we can discuss about allowing only default exports

micalevisk commented 2 years ago

+1 to class MySeeder extends Seeder { ... } approach.

jorgebodega commented 2 years ago

Closed by #191