@ooneex/middleware 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ import { ContextConfigType as SocketContextConfigType, ContextType as SocketCont
|
|
|
4
4
|
type MiddlewareClassType = new (...args: any[]) => IMiddleware;
|
|
5
5
|
type SocketMiddlewareClassType = new (...args: any[]) => ISocketMiddleware;
|
|
6
6
|
interface IMiddleware<T extends ContextConfigType = ContextConfigType> {
|
|
7
|
-
|
|
7
|
+
handler: (context: ContextType<T>) => Promise<ContextType<T>> | ContextType<T>;
|
|
8
8
|
}
|
|
9
9
|
interface ISocketMiddleware<T extends SocketContextConfigType = SocketContextConfigType> {
|
|
10
|
-
|
|
10
|
+
handler: (context: SocketContextType<T>) => Promise<SocketContextType<T>> | SocketContextType<T>;
|
|
11
11
|
}
|
|
12
12
|
declare const decorator: {
|
|
13
13
|
middleware: (scope?: EContainerScope) => (target: MiddlewareClassType | SocketMiddlewareClassType) => void;
|
package/package.json
CHANGED