mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 11:57:33 +08:00
edit SourceModel interface to add optional rest parameters to remote and
local methods
This commit is contained in:
4
alt/alt.d.ts
vendored
4
alt/alt.d.ts
vendored
@@ -53,8 +53,8 @@ declare namespace AltJS {
|
||||
export type Source = {[name:string]: () => SourceModel<any>};
|
||||
|
||||
export interface SourceModel<S> {
|
||||
local(state:any):any;
|
||||
remote(state:any):Promise<S>;
|
||||
local(state:any, ...args: any[]):any;
|
||||
remote(state:any, ...args: any[]):Promise<S>;
|
||||
shouldFetch?(fetchFn:(...args:Array<any>) => boolean):void;
|
||||
loading?:(args:any) => void;
|
||||
success?:(state:S) => void;
|
||||
|
||||
Reference in New Issue
Block a user