@samitouri / QOSami-HFS / commits / 8acd09f6

better code: fix type

Massimo Melina committed Jan 6, 2024 at 13:07 UTC 8acd09f6730ca6312e9751aebf873f92d1ea841b
1 file changed +2 -2
src/plugins.ts
+2 -2
@@ -7,7 +7,7 @@ import { API_VERSION, APP_PATH, COMPATIBLE_API_VERSION, IS_WINDOWS, MIME_AUTO, P
7 import * as Const from './const'
8 import Koa from 'koa'
9 import { adjustStaticPathForGlob, Callback, debounceAsync, Dict, getOrSet, onlyTruthy, onProcessExit,
10 - PendingPromise, pendingPromise, same, tryJson, wait, waitFor, wantArray, watchDir } from './misc'
10 + PendingPromise, pendingPromise, Promisable, same, tryJson, wait, waitFor, wantArray, watchDir } from './misc'
11 import { defineConfig, getConfig } from './config'
12 import { DirEntry } from './api.get_file_list'
13 import { VfsNode } from './vfs'
@@ -234,7 +234,7 @@ export function mapPlugins<T>(cb:(plugin:Readonly<Plugin>, pluginName:string)=>
234 }).filter(x => x !== undefined) as Exclude<T,undefined>[]
235 }
236
237 -type PluginMiddleware = (ctx:Koa.Context) => void | Stop | CallMeAfter
237 +type PluginMiddleware = (ctx:Koa.Context) => Promisable<void | Stop | CallMeAfter>
238 type Stop = true
239 type CallMeAfter = ()=>any
240