Skip to content

Commit

Permalink
fix: Fix worklet<...> type
Browse files Browse the repository at this point in the history
  • Loading branch information
mrousavy committed May 3, 2024
1 parent a9c60a7 commit 12d3bbd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/worklet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ class NotAWorkletError<TFunc extends AnyFunc> extends Error {
* @param func The function that should be a Worklet.
* @returns The same function that was passed in.
*/
export function worklet<TFunc extends () => any>(
func: TFunc
): Workletize<TFunc> {
export function worklet<TFunc extends AnyFunc>(func: TFunc): Workletize<TFunc> {
if (!isWorklet(func)) {
throw new NotAWorkletError(func);
}
Expand Down

0 comments on commit 12d3bbd

Please sign in to comment.