@waiting/shared-types
Advanced tools
Comparing version 15.2.0 to 15.3.0
@@ -5,3 +5,3 @@ /** | ||
* | ||
* @version 15.1.1 | ||
* @version 15.2.0 | ||
* @author waiting | ||
@@ -8,0 +8,0 @@ * @license MIT |
import { XOR } from './common'; | ||
export declare type MiddlewareConfig = { | ||
export declare type MiddlewareConfig<T = unknown> = { | ||
/** | ||
@@ -8,2 +8,3 @@ * Enable middleware. | ||
enableMiddleware: boolean; | ||
options?: T; | ||
} & PathPattern; | ||
@@ -29,2 +30,3 @@ export declare type PathPattern = XOR<PathMatchPattern, PathIgnorePattern>; | ||
} | ||
export declare type MiddlewarePathPattern = (string | RegExp)[]; | ||
export declare type PathPatternFunc = (ctx: any) => boolean; | ||
export declare type MiddlewarePathPattern = (string | RegExp | PathPatternFunc)[]; |
{ | ||
"name": "@waiting/shared-types", | ||
"author": "waiting", | ||
"version": "15.2.0", | ||
"version": "15.3.0", | ||
"description": "shared typescript types", | ||
@@ -27,4 +27,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"cross-env": "7", | ||
"typescript": "^4.5.5" | ||
"cross-env": "7" | ||
}, | ||
@@ -62,3 +61,3 @@ "engines": { | ||
}, | ||
"gitHead": "e62f6543e1527f3f758b478d895596c6c655a151" | ||
"gitHead": "048bfe308860002e8f30ae7e9a7d4a608ec171d8" | ||
} |
{ | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"declaration": true, | ||
@@ -8,3 +9,3 @@ "emitDecoratorMetadata": true, | ||
"incremental": true, | ||
"module": "ES6", | ||
"module": "ESNext", | ||
"moduleResolution": "node", | ||
@@ -11,0 +12,0 @@ "newLine": "lf", |
23914
1
664