美好的一天。我是Type Script的新手,使用VSCode的sequelize。自从我迁移到打字稿
以来,我一直有这个问题import * as bodyParser from 'body-parser';
import * as express from 'express';
import * as sql from 'mssql';
import * as Sequelize from 'sequelize';
const sequelize: any = new Sequelize('my_reputation_db', 'sa', 'password', {
host: 'localhost',
dialect: 'mssql',
pool: {
max: 5,
min: 0,
acquire: 30000,
idle: 10000
},
options: {
encrypt: true,
instanceName: 'SQLEXPRESS'
}
});
这是我遇到的错误
类型的参数' {host:string;方言:字符串; pool:{max:number; min:number;获得:数量;闲置:数字; ......'不能分配给'选项|的参数未定义&#39 ;. 对象文字只能指定已知属性,并且'选项'类型'选项|中不存在未定义'