/** * http status text adapted from https://go.dev/src/net/http/status.go * Source: https://github.com/golang/go/blob/master/src/net/http/status.go * Commit: 55590f3a2b89f001bcadf0df6eb2dde62618302b */ import type { HttpStatusCode } from './status.js'; /** * statusText returns a text for the HTTP status code. It returns the empty * string if the code is unknown. * @param code A number that may be an http status code. * @returns description of the status code or empty string if it's unknown. * * @example * ```ts * import { httpStatus } from 'http-codex' * * const text = httpStatus.text(httpStatus.OK) // 'OK' * ``` * * @example Status codes only (smaller bundle size) * ```ts * import { httpStatus } from 'http-codex/status' * * const status = httpStatus.OK // 200 * ``` */ export declare function text(code: HttpStatusCode | (number & {})): string; //# sourceMappingURL=statusText.d.ts.map