Skip to content

Commit

Permalink
Fix onRpc typing
Browse files Browse the repository at this point in the history
  • Loading branch information
S0P4 authored Dec 16, 2023
1 parent ea1ea2c commit a0fb12b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2791,7 +2791,7 @@ declare module "alt-client" {
*
* @beta
*/
export function onRpc<K extends keyof shared.ICustomServerClientRpc>(rpcName: K, listener: (...args: Parameters<shared.ICustomServerClientRpc[K]>) => Promise<any> | ReturnType<any>): void;
export function onRpc<K extends keyof shared.ICustomServerClientRpc>(rpcName: K, listener: (...args: Parameters<shared.ICustomServerClientRpc[K]>) => Promise<ReturnType<shared.ICustomClientServerRpc[K]> | ReturnType<ReturnType<shared.ICustomClientServerRpc[K]>): void;
export function onRpc<K extends string>(rpcName: Exclude<K, keyof shared.ICustomServerClientRpc>, listener: (...args: any[]) => Promise<any> | any): void;

/**
Expand Down

0 comments on commit a0fb12b

Please sign in to comment.