`context.result` 类型太宽
作者: AshotN创建于 2025年10月20日更新于 2025年10月20日
// 主数据模型方案
export const companySchema = Type.Object(
{
id: Type.Number()
},
{ $id: 'Company', additionalProperties: false }
)
// 创建新条目的方案
export const companyDataSchema = Type.Object(
{
id: Type.Number()
},
{
$id: 'CompanyData',
additionalProperties: false
}
)create: [
async (context, next) => {
const beforeResult = context.result
await next()
const afterResult = context.result
}
]beforeResult 和 afterResult 的类型都返回了
内容来源: feathersjs/feathers