@v4fire/core
Version:
V4Fire core library
23 lines (18 loc) • 496 B
text/typescript
/*!
* V4Fire Core
* https://github.com/V4Fire/Core
*
* Released under the MIT license
* https://github.com/V4Fire/Core/blob/master/LICENSE
*/
import type { Mock } from 'core/data';
import type { MiddlewareParams } from 'core/request';
export interface MockOptions {
patterns: RegExp[];
}
export type RequestMatchingData = Partial<Pick<MiddlewareParams['opts'], 'query' | 'body' | 'headers'>>;
export interface MockBestMatch {
score: number;
mismatches: number;
mock: Mock | null;
}