javascript - Unable to generate typescript models using sequelize-auto -
i dealing situation in need use sequelize existing mysql database, hence figured it'd better if generate models sequelize kind of generator,
found sequelize-auto , generated models code.
reading documentation provide many optional flags generator command, 1 of them -z or --typescript in order generate models typescript files, unfortunately, generated code still in js format , file .js suffix.
tried searching others experiencing same issues, found nothing :/
any idea missing?
my command:
sequelize-auto -h mydb -d database_name -u some_user -x some_password -p 3306 -e mysql -o src/models -c --typescript thank you
my guess version of sequelize-auto use isn't latest version. can instance check if .node_modules/sequelize-auto/lib/ts-helper.js present or not. in case isn't, means version of sequelize-auto doesn't match current version on repo.
a quick workaround solve yarn add https://github.com/sequelize/sequelize-auto use version present on repo node module (instead of latest stable release).
people merging prs concerning typescript in sequelize-auto write this, make sure switch stable release there 1 when changes looking for.
Comments
Post a Comment