Skip to content

Commit 997f9ae

Browse files
fix: custom functions args type (not destructed)
Signed-off-by: David Dal Busco <david.dalbusco@outlook.com>
1 parent 7d78822 commit 997f9ae

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

blog/2026-03-16-custom-functions-in-typescript/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const Schema = j.discriminatedUnion("type", [
111111

112112
export const registerPet = defineUpdate({
113113
args: Schema,
114-
handler: ({ args }) => {
114+
handler: (args) => {
115115
if (args.type === "cat") {
116116
// handle cat
117117
} else {

docs/build/functions/development/components/query.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn my_function() -> String {
2424
export const myFunction = defineQuery({
2525
args: Schema,
2626
result: Schema,
27-
handler: ({ args }) => {
27+
handler: (args) => {
2828
// Your logic here
2929
return args;
3030
}

docs/build/functions/development/components/update.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn my_function() -> String {
2424
export const myFunction = defineUpdate({
2525
args: Schema,
2626
result: Schema,
27-
handler: async ({ args }) => {
27+
handler: async (args) => {
2828
// Your logic here
2929
return args;
3030
}

docs/guides/typescript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const Schema = j.strictObject({
161161
export const helloWorld = defineUpdate({
162162
args: Schema,
163163
result: Schema,
164-
handler: async ({ args }) => {
164+
handler: async (args) => {
165165
// Your logic here
166166
return args;
167167
}

0 commit comments

Comments
 (0)