export { default as statuses } from 'statuses'; /** * The type definitions for the `statuses` library. * * While the library has type definitions, TypeScript throws an error that they can't be * exported, so that's why they are copied in there. */ type Statuses = { /** * Given a status code, returns the status text, and given a status text, returns the * status code. * * @param code The status code or status text to look up. * @throws If the status is invalid. */ (code: number | string): number | string; /** * A list of all the supported status codes. */ codes: number[]; /** * A dictionary with the status texts and their corresponding status codes. */ code: Record; /** * A dictionary with the status codes and their corresponding status texts, for * responses that expect an empty body. */ empty: Record; /** * A dictionary with the status codes and their corresponding status texts. */ message: Record; /** * A dictionary with status codes for responses that are valid for redirections. */ redirect: Record; /** * A dictionary with status codes that should be retried. */ retry: Record; }; export type { Statuses };