SaraS
Convex Community2y ago
2 replies
Sara

Type check help - Passing an Object of type Doc<"table_name"> but has partial values

I'm basically wondering if there's another way of Doing this type here? where the body is supposed to be of type Doc<"settings"> but partially has that type?
export const update = mutation({
  args:{settingsId: v.id("settings"), body:v.any()},
  handler:async(ctx, args_0) => {
    await ctx.db.patch(args_0.settingsId, args_0.body as Partial<Doc<"settings">>)
  },
})
Was this page helpful?