1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-30 15:58:19 +09:00

Update define.ts

This commit is contained in:
syuilo 2019-04-28 19:56:41 +09:00 committed by GitHub
parent c05586b53a
commit 747a0b1791
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,8 @@ type Params<T extends IEndpointMeta> = {
export type Response = Record<string, any> | void;
type executor<T extends IEndpointMeta> =
(params: Params<T>, user: ILocalUser, app: App, file?: any, cleanup?: Function) => Promise<T['res'] extends undefined ? Response : SchemaType<NonNullable<T['res']>>>;
(params: Params<T>, user: ILocalUser, app: App, file?: any, cleanup?: Function) =>
Promise<T['res'] extends undefined ? Response : SchemaType<NonNullable<T['res']>>>;
export default function <T extends IEndpointMeta>(meta: T, cb: executor<T>)
: (params: any, user: ILocalUser, app: App, file?: any) => Promise<any> {