@httpx/assert
Version:
Assertions and typeguards
15 lines (12 loc) • 558 B
text/typescript
import { H as HttpMethod } from './http.types-J36zpW89.cjs';
import { M as MsgOrErrorFactory } from './internal.types-D5VRBw-5.cjs';
/**
* 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 };