Skip to content

Instantly share code, notes, and snippets.

@snewell92
Created June 5, 2017 21:22
Show Gist options
  • Save snewell92/c1c2e96592a3ad0139b8f726ee394f3b to your computer and use it in GitHub Desktop.
Save snewell92/c1c2e96592a3ad0139b8f726ee394f3b to your computer and use it in GitHub Desktop.
Type error with sync
import { Sequelize, ISequelizeConfig } from 'sequelize-typescript';
let configOpts: ISequelizeConfig = {
name: 'hawtdb',
dialect: 'mysql',
username: 'hawtuser',
password: 'hawrtpassl3377',
host: 'localhost',
port: 3306,
pool: {
max: 1000,
min: 0,
idle: 5000
},
modelPaths: [__dirname + '/models/entities/']
};
const sequelize = new Sequelize(configOpts);
// establish singleton instance for application
app.set('sequelizeClient', sequelize);
// type error here
sequelize.sync({alter: true});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment