Skip to content

Commit 961608d

Browse files
reeceyangConvex, Inc.
authored andcommitted
Add FunctionHandle_future type (#59898)
GitOrigin-RevId: 9488afac6deaa65d36ed3541903d839fc7491602
1 parent 9395b4f commit 961608d

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎src/server/components/index.ts‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ export type FunctionHandle<
4949
ReturnType = any,
5050
> = string & FunctionReference<Type, "internal", Args, ReturnType>;
5151

52+
/**
53+
* A {@link FunctionHandle} with the type semantics of {@link FunctionReference_future}.
54+
*
55+
* @public
56+
*/
57+
export type FunctionHandle_future<
58+
Type extends FunctionType,
59+
Args extends DefaultFunctionArgs = any,
60+
ReturnType = any,
61+
> = string & FunctionReference_future<Type, "internal", Args, ReturnType>;
62+
5263
/**
5364
* Create a serializable reference to a Convex function.
5465
* Passing a this reference to another component allows that component to call this

‎src/server/index.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ export type {
209209
ComponentDefinition,
210210
AnyComponents,
211211
FunctionHandle,
212+
FunctionHandle_future,
212213
} from "./components/index.js";
213214

214215
/**

0 commit comments

Comments
 (0)