mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 02:53:08 +02:00
Update define.ts
This commit is contained in:
parent
c05586b53a
commit
747a0b1791
1 changed files with 2 additions and 1 deletions
|
@ -14,7 +14,8 @@ type Params<T extends IEndpointMeta> = {
|
||||||
export type Response = Record<string, any> | void;
|
export type Response = Record<string, any> | void;
|
||||||
|
|
||||||
type executor<T extends IEndpointMeta> =
|
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>)
|
export default function <T extends IEndpointMeta>(meta: T, cb: executor<T>)
|
||||||
: (params: any, user: ILocalUser, app: App, file?: any) => Promise<any> {
|
: (params: any, user: ILocalUser, app: App, file?: any) => Promise<any> {
|
||||||
|
|
Loading…
Reference in a new issue