Skip to content

Commit

Permalink
Add JSDoc (TS Flavour) to mjs stub file (#5390)
Browse files Browse the repository at this point in the history
  • Loading branch information
Naddiseo committed Nov 23, 2022
1 parent 72bd1f7 commit ab45314
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/migrations/migrate/stub/mjs.stub
@@ -1,4 +1,8 @@

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
export const up = async (knex) => {
<% if (d.tableName) { %>
await knex.schema.createTable("<%= d.tableName %>", function(t) {
Expand All @@ -8,6 +12,10 @@ export const up = async (knex) => {
<% } %>
};

/**
* @param { import("knex").Knex } knex
* @returns { Promise<void> }
*/
export const down = async (knex) => {
<% if (d.tableName) { %>
await knex.schema.dropTable("<%= d.tableName %>");
Expand Down

0 comments on commit ab45314

Please sign in to comment.