小编Mar*_*ard的帖子

我是否需要 Go 语言运行时来运行已编译的 Go 应用程序?

使用 Go 编程语言在 Windows 上构建可执行文件时,是否需要安装 Go 运行时才能在另一台机器上运行应用程序?

windows go

8
推荐指数
1
解决办法
5329
查看次数

TS2345续集创建函数

我正在创建一个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)

node.js sequelize.js typescript

7
推荐指数
2
解决办法
1393
查看次数

标签 统计

go ×1

node.js ×1

sequelize.js ×1

typescript ×1

windows ×1