Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Commit 5323a16

Browse files
committed
fix: invoke resp type
1 parent 0f9f5b1 commit 5323a16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class FunctionsClient {
4040
async invoke<T = any>(
4141
functionName: string,
4242
invokeOptions?: FunctionInvokeOptions
43-
): Promise<{ data: T | null; error: Error | null }> {
43+
): Promise<{ data: T; error: null } | { data: null; error: Error }> {
4444
try {
4545
const { headers, body } = invokeOptions ?? {}
4646
const response = await this.fetch(`${this.url}/${functionName}`, {

0 commit comments

Comments
 (0)