我在当前项目中使用 Next.js 和 Prisma,但在我的 IDE(当前为 WebStorm)中,我在 Prisma 中的大多数 CRUD 查询中不断收到相同的警告。
这仅在 JetBrains WebStorm 中存在,但是,如果我在 VSCode 中打开项目,警告就会消失...
警告如下所示:
bookingInput这是传递给 create 函数的完整内容:
bookingInput {
start_date: '2023-11-10T15:05:52.541Z',
end_date: '2023-11-10T19:05:52.541Z',
number_of_guests: 2,
price: 240,
venue: { connect: { id: 'venue-0' } },
customer: { connect: { id: 'user-41' } }
}
Run Code Online (Sandbox Code Playgroud)
这是它的BookingCreateInput类型:
export type BookingCreateInput = {
id?: string
booking_date?: Date | string
start_date: Date | string
end_date: Date | string
number_of_guests: number
host_notes?: string | null
price?: Decimal | DecimalJsLike …Run Code Online (Sandbox Code Playgroud)