Closed barakplasma closed 1 year ago
In the create migration template, we have the opportunity to add JSDoc for type hints in VSCode. So this template: https://github.com/db-migrate/node-db-migrate/blob/50b34a8dd2224e21c5f28843d49511a08d1dbe1b/lib/template.js#L60-L66 Could contain this JSDoc
/** * * @param {import('db-migrate/lib/interface/migratorInterface')} db * @returns */ exports.up = function(db) { db return null; };
to provide these type hints:
or
/** * * @param {import('@types/db-migrate-base')} db * @returns */ exports.up = function(db) { db.runSql() return null; };
from https://www.npmjs.com/package/@types/db-migrate-base to provide these type hints like these:
relates to https://github.com/db-migrate/node-db-migrate/issues/717 which would be much better, but a bit harder to implement
not that critical
In the create migration template, we have the opportunity to add JSDoc for type hints in VSCode. So this template: https://github.com/db-migrate/node-db-migrate/blob/50b34a8dd2224e21c5f28843d49511a08d1dbe1b/lib/template.js#L60-L66 Could contain this JSDoc
to provide these type hints:![image](https://github.com/db-migrate/node-db-migrate/assets/62937/af90ca00-4716-4678-a55c-22ed78e4cec1)
or
from https://www.npmjs.com/package/@types/db-migrate-base to provide these type hints like these:![image](https://github.com/db-migrate/node-db-migrate/assets/62937/b7bf194e-01b8-45de-a7c7-cc1c00100858)