使用 Go 编程语言在 Windows 上构建可执行文件时,是否需要安装 Go 运行时才能在另一台机器上运行应用程序?
我正在创建一个sequelize存储库,并且我有一个扩展sequelize模型的对象。
我能够执行以下操作将模型保存到数据库。
repository.create(myModel) // myModel being an instance of MyModel which extends sequelize model
Run Code Online (Sandbox Code Playgroud)
现在我在打字稿中收到以下错误:
Argument of type 'MyModel' is not assignable to parameter of type 'CreationAttributes<MyModel>'.
Type 'MyModel' is not assignable to type 'Omit<any, string>'.
Index signature for type 'number' is missing in type 'MyModel'.ts(2345)
Run Code Online (Sandbox Code Playgroud)
我正在做一些搜索,建议添加到 MyModel:
[key: number]: number;
Run Code Online (Sandbox Code Playgroud)
当我这样做时,错误更改为以下内容:
Argument of type 'MyModel' is not assignable to parameter of type 'CreationAttributes<MyModel>'.
Type 'MyModel' is not assignable to type 'Omit<any, string>'.
Index signature for type 'symbol' is missing …Run Code Online (Sandbox Code Playgroud)