【发布时间】:2020-09-14 20:08:49
【问题描述】:
我试过了:
@Post()
async create(@Body() body: CreateStreamDto): Promise<typeof Stream> {
return { id: '12', connectionUrl: 'stuff' }
}
但它说:
ype '{ id: string; connectionUrl: string; }' is not assignable to type 'typeof Stream'.
Object literal may only specify known properties, and 'id' does not exist in type 'typeof Stream'.
【问题讨论】:
-
什么是
Stream?你想在这里返回什么? -
这是一个
sequelize-typescript定义的模型:``` @Table export class Stream extends Model{ ```
标签: typescript sequelize.js nestjs sequelize-typescript