Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add type parameter of return #44

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/client/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ declare interface EventMpPool {
* @param procName The name of the procedure name you wish to call
* @param args The arguments
*/
callRemoteProc(procName: string, ...args: any[]): Promise<any>;
callRemoteProc<T = any>(procName: string, ...args: any[]): Promise<T>;

callRemoteUnreliable(eventName: string, ...args: any[]): void;
cancelPendingRpc(procName?: string): void;
Expand Down
2 changes: 1 addition & 1 deletion packages/server/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ declare class PlayerMp extends EntityMp {
* @param eventProcName Procedure Name
* @param args Args
*/
public callProc(eventName: string, args?: any[]): Promise<any>;
public callProc<T = any>(eventName: string, args?: any[]): Promise<T>;

/**
* Triggers a client-side event for the selected player unreliably, which means it will be affected by potential packet loss, but it will be triggered way more faster, useful for when you need frequent triggers.
Expand Down