Skip to content

Commit

Permalink
fix: Fix TArgs type
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed Apr 17, 2024
1 parent d2cbd3e commit 6953f65
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/types.ts
Expand Up @@ -50,9 +50,9 @@ export interface IWorkletContext {
* const second = await func("christian")
* ```
*/
createRunAsync: <TArgs, TReturn>(
worklet: (...args: TArgs[]) => TReturn
) => (...args: TArgs[]) => Promise<TReturn>;
createRunAsync: <TArgs extends unknown[], TReturn>(
worklet: (...args: TArgs) => TReturn
) => (...args: TArgs) => Promise<TReturn>;
/**
* Runs the given Function asynchronously on this Worklet context.
* @worklet
Expand Down Expand Up @@ -116,9 +116,9 @@ export interface IWorkletNativeApi {
* })
* ```
*/
createRunOnJS: <TArgs, TReturn>(
func: (...args: TArgs[]) => TReturn
) => (...args: TArgs[]) => Promise<TReturn>;
createRunOnJS: <TArgs extends unknown[], TReturn>(
func: (...args: TArgs) => TReturn
) => (...args: TArgs) => Promise<TReturn>;
/**
* Runs the given Function asynchronously on the default React-JS context.
* @param func The function to run on the default React-JS context.
Expand Down

0 comments on commit 6953f65

Please sign in to comment.