mysql-table-types
v1.0.2
Published
Export mysql table schema to TypeScript declaration.
Downloads
14
Maintainers
Readme
mysql-table-types
Export mysql tables schema to TypeScript declaration.
Why
- I'm using nodejs
- I'm using mysqljs
- I'm in love with TypeScript or the *.d.ts
- I'm looking for some MAGIC writing TypeScript declaration of my HUNDREDS-of-mysql-tables for me
How
Cli
npm i -g mysql-table-types
mysql-table-types -i db.json
or
npx mysql-table-types -i db.json
or
npx mysql-table-types -i db.json -o db.d.ts
Manual
const mtt = require('mysql-table-types');
const listOfTableSchemaStrings = mtt(yourMysqlConnSomewhere.config);