Skip to content

Instantly share code, notes, and snippets.

View NiyongaboEric's full-sized avatar

Agent NiyongaboEric

  • Rwanda
View GitHub Profile
@NiyongaboEric
NiyongaboEric / gist:d6a8423382e9f34e870d78da20b7da2c
Created November 2, 2021 08:59
Convert sequerize model generated in JavaScript (.js) into Typescript (ts)
const fs = require ('fs');
const path = require ('path');
const saveApiModelsPath = 'src/database/models'; // Path to your JS models folder
const saveDatabaseModelsPath = 'src/database/models_ts'; // Path to your TS models folder
const matchDataTypes = {
BOOLEAN: 'boolean',
BIGINT: 'number',
INTEGER: 'number',