@httpx/assert
Version:
Assertions and typeguards
15 lines (12 loc) • 556 B
TypeScript
import { H as HttpMethod } from './http.types-J36zpW89.js';
import { M as MsgOrErrorFactory } from './internal.types-D5VRBw-5.js';
/**
* Assert the value is a valid http method (case-insensitive)
* @throws TypeError
*/
declare function assertHttpValidMethod(v: unknown, msgOrErrorFactory?: MsgOrErrorFactory): asserts v is HttpMethod;
/**
* @throws TypeError
*/
declare function assertHttpMethod<T extends HttpMethod>(method: T, v: unknown, msgOrErrorFactory?: MsgOrErrorFactory): asserts v is T;
export { assertHttpMethod, assertHttpValidMethod };