我用的是“猫鼬”和“蓝鸟”的打字稿。猫鼬是设置返回蓝鸟承诺,但我不知道如何“告诉”TypeScript关于它。例如,我有一个Message猫鼬模型,如果我尝试这样做的话: .save() .catch(next);
TypeScript抱怨Property 'catch' does not exist on type 'Promise<void>'.是因为它认为
作为我的GraphQL解析器之一,我有一个函数,它将一个艺术家ID添加到用户喜欢的艺术家对象ID数组中。Type 'ObjectId' is not assignable to type 'never' 这是用户的架构 import mongoose from "mongoose";
image: String, posts: Array,