// export declare function KoaMiddleware(ctx:T, next:()=>Promise) : Promise // type MiddlewaresObj={[K:string] : KoaMiddleware} export default useOnion declare function useOnion( ctx :T, confs :{ baseHook ?: {[K in keyof H]: (ctx:T,next:()=>Promise)=> Promise}, customHook ?:{[K in keyof H]: (ctx:T,next:()=>Promise)=> Promise}, hasArgFnNames ?: [keyof H][number][] syncFnNames ?: [keyof H][number][] } ) declare namespace useOnion{ const curr_base_hook :string const has_arg_fn_prefix :string const onerror :string } export function getSyncMidware(fn :(ctx:T)=>any) :(ctx :T, next:Function)=>any; export function getAsyncMidware(fn :(ctx:T)=>any) :(ctx :T, next:Function)=>Promise; /* import baseHook from './baseCrudHooks' import uo from '../main' uo({ form:{ data:{title:'标题',num:233} }, table:{ data:[{id:1,name:'名字'}] } }, {baseHook, customHook:{ arg_delById:ctx=>{ctx} } , hasArgFnNames:[''] } )*/