Fix type declaration for MethodApplyOptions

This commit is contained in:
Evan Broder
2023-08-18 12:03:30 -07:00
parent b75ec5aa8c
commit 4efdbf99ed

View File

@@ -159,7 +159,13 @@ export namespace Meteor {
*/
function callAsync(name: string, ...args: any[]): Promise<any>;
interface MethodApplyOptions {
interface MethodApplyOptions<
Result extends
| EJSONable
| EJSONable[]
| EJSONableProperty
| EJSONableProperty[]
> {
/**
* (Client only) If true, don't send this method until all previous method calls have completed, and don't send any subsequent method calls until this one is completed.
*/
@@ -203,7 +209,7 @@ export namespace Meteor {
>(
name: string,
args: ReadonlyArray<EJSONable | EJSONableProperty>,
options?: MethodApplyOptions,
options?: MethodApplyOptions<Result>,
asyncCallback?: (
error: global_Error | Meteor.Error | undefined,
result?: Result