typia
Version:
Superfast runtime validators with only one line
1 lines • 28.7 kB
Source Map (JSON)
{"version":3,"file":"http.mjs","names":[],"sources":["../src/http.ts"],"sourcesContent":["import {\n Atomic,\n IReadableURLSearchParams,\n IValidation,\n Resolved,\n} from \"@typia/interface\";\n\nimport { TypeGuardError } from \"./TypeGuardError\";\nimport { NoTransformConfigurationError } from \"./transformers/NoTransformConfigurationError\";\n\n/* ===========================================================\n HTTP\n - FORM-DATA\n - QUERY\n - HEADERS\n - PARAMETER\n - FACTORY FUNCTIONS\n==============================================================\n FORM-DATA\n----------------------------------------------------------- */\n/**\n * Decodes `FormData` into type `T`.\n *\n * Parses a `FormData` instance with automatic type casting. Properties typed as\n * `boolean` or `Blob` are cast to expected types during decoding.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array\n * types allowed\n * 4. No union types allowed\n *\n * Does not validate the decoded value. For validation, use:\n *\n * - {@link assertFormData} — Throws on type mismatch\n * - {@link isFormData} — Returns `null` on type mismatch\n * - {@link validateFormData} — Returns detailed validation errors\n *\n * @template T Target object type\n * @param input FormData instance to decode\n * @returns Decoded object of type `T`\n * @danger You must configure the generic argument `T`\n */\nexport function formData<T extends object>(input: FormData): Resolved<T>;\n\n/** @internal */\nexport function formData(): never {\n NoTransformConfigurationError(\"http.formData\");\n}\n\n/**\n * Decodes `FormData` into type `T` with assertion.\n *\n * Parses a `FormData` instance with automatic type casting, then validates the\n * result via {@link assert}. Throws {@link TypeGuardError} on mismatch.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array\n * types allowed\n * 4. No union types allowed\n *\n * Related functions:\n *\n * - {@link formData} — No validation\n * - {@link isFormData} — Returns `null` instead of throwing\n * - {@link validateFormData} — Returns detailed validation errors\n *\n * @template T Target object type\n * @param input FormData instance to decode\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Decoded object of type `T`\n * @throws {TypeGuardError} When decoded value doesn't conform to type `T`\n * @danger You must configure the generic argument `T`\n */\nexport function assertFormData<T extends object>(\n input: FormData,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): Resolved<T>;\n\n/** @internal */\nexport function assertFormData(): never {\n NoTransformConfigurationError(\"http.assertFormData\");\n}\n\n/**\n * Decodes `FormData` into type `T` with type checking.\n *\n * Parses a `FormData` instance with automatic type casting, then validates the\n * result via {@link is}. Returns `null` on type mismatch.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array\n * types allowed\n * 4. No union types allowed\n *\n * Related functions:\n *\n * - {@link formData} — No validation\n * - {@link assertFormData} — Throws instead of returning `null`\n * - {@link validateFormData} — Returns detailed validation errors\n *\n * @template T Target object type\n * @param input FormData instance to decode\n * @returns Decoded object of type `T`, or `null` if invalid\n * @danger You must configure the generic argument `T`\n */\nexport function isFormData<T extends object>(\n input: FormData,\n): Resolved<T> | null;\n\n/** @internal */\nexport function isFormData(): never {\n NoTransformConfigurationError(\"http.isFormData\");\n}\n\n/**\n * Decodes `FormData` into type `T` with validation.\n *\n * Parses a `FormData` instance with automatic type casting, then validates the\n * result via {@link validate}. Returns {@link IValidation.IFailure} with all\n * errors on mismatch, or {@link IValidation.ISuccess} with decoded value.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array\n * types allowed\n * 4. No union types allowed\n *\n * Related functions:\n *\n * - {@link formData} — No validation\n * - {@link assertFormData} — Throws on first error\n * - {@link isFormData} — Returns `null` instead of error details\n *\n * @template T Target object type\n * @param input FormData instance to decode\n * @returns Validation result containing decoded value or errors\n * @danger You must configure the generic argument `T`\n */\nexport function validateFormData<T extends object>(\n input: FormData,\n): IValidation<Resolved<T>>;\n\n/** @internal */\nexport function validateFormData(): never {\n NoTransformConfigurationError(\"http.validateFormData\");\n}\n\n/* -----------------------------------------------------------\n QUERY\n----------------------------------------------------------- */\n/**\n * Decodes URL query string into type `T`.\n *\n * Parses a query string or `URLSearchParams` instance with automatic type\n * casting. Properties typed as `boolean` or `number` are cast to expected types\n * during decoding.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Only `boolean`, `bigint`, `number`, `string` or their array types allowed\n * 4. No union types allowed\n *\n * Does not validate the decoded value. For validation, use:\n *\n * - {@link assertQuery} — Throws on type mismatch\n * - {@link isQuery} — Returns `null` on type mismatch\n * - {@link validateQuery} — Returns detailed validation errors\n *\n * @template T Target object type\n * @param input Query string or URLSearchParams instance\n * @returns Decoded object of type `T`\n * @danger You must configure the generic argument `T`\n */\nexport function query<T extends object>(\n input: string | IReadableURLSearchParams,\n): Resolved<T>;\n\n/** @internal */\nexport function query(): never {\n NoTransformConfigurationError(\"http.query\");\n}\n\n/**\n * Decodes URL query string into type `T` with assertion.\n *\n * Parses a query string or `URLSearchParams` instance with automatic type\n * casting, then validates the result via {@link assert}. Throws\n * {@link TypeGuardError} on mismatch.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Only `boolean`, `bigint`, `number`, `string` or their array types allowed\n * 4. No union types allowed\n *\n * Related functions:\n *\n * - {@link query} — No validation\n * - {@link isQuery} — Returns `null` instead of throwing\n * - {@link validateQuery} — Returns detailed validation errors\n *\n * @template T Target object type\n * @param input Query string or URLSearchParams instance\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Decoded object of type `T`\n * @throws {TypeGuardError} When decoded value doesn't conform to type `T`\n * @danger You must configure the generic argument `T`\n */\nexport function assertQuery<T extends object>(\n input: string | IReadableURLSearchParams,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): Resolved<T>;\n\n/** @internal */\nexport function assertQuery(): never {\n NoTransformConfigurationError(\"http.assertQuery\");\n}\n\n/**\n * Decodes URL query string into type `T` with type checking.\n *\n * Parses a query string or `URLSearchParams` instance with automatic type\n * casting, then validates the result via {@link is}. Returns `null` on type\n * mismatch.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Only `boolean`, `bigint`, `number`, `string` or their array types allowed\n * 4. No union types allowed\n *\n * Related functions:\n *\n * - {@link query} — No validation\n * - {@link assertQuery} — Throws instead of returning `null`\n * - {@link validateQuery} — Returns detailed validation errors\n *\n * @template T Target object type\n * @param input Query string or URLSearchParams instance\n * @returns Decoded object of type `T`, or `null` if invalid\n * @danger You must configure the generic argument `T`\n */\nexport function isQuery<T extends object>(\n input: string | IReadableURLSearchParams,\n): Resolved<T> | null;\n\n/** @internal */\nexport function isQuery(): never {\n NoTransformConfigurationError(\"http.isQuery\");\n}\n\n/**\n * Decodes URL query string into type `T` with validation.\n *\n * Parses a query string or `URLSearchParams` instance with automatic type\n * casting, then validates the result via {@link validate}. Returns\n * {@link IValidation.IFailure} with all errors on mismatch, or\n * {@link IValidation.ISuccess} with decoded value.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Only `boolean`, `bigint`, `number`, `string` or their array types allowed\n * 4. No union types allowed\n *\n * Related functions:\n *\n * - {@link query} — No validation\n * - {@link assertQuery} — Throws on first error\n * - {@link isQuery} — Returns `null` instead of error details\n *\n * @template T Target object type\n * @param input Query string or URLSearchParams instance\n * @returns Validation result containing decoded value or errors\n * @danger You must configure the generic argument `T`\n */\nexport function validateQuery<T extends object>(\n input: string | IReadableURLSearchParams,\n): IValidation<Resolved<T>>;\n\n/** @internal */\nexport function validateQuery(): never {\n NoTransformConfigurationError(\"http.validateQuery\");\n}\n\n/* -----------------------------------------------------------\n HEADERS\n----------------------------------------------------------- */\n/**\n * Decodes HTTP headers into type `T`.\n *\n * Parses HTTP headers object with automatic type casting. Properties typed as\n * `boolean` or `number` are cast to expected types during decoding. Compatible\n * with Express and Fastify request headers.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Property keys must be lowercase\n * 4. Property values cannot be `null` (but `undefined` is allowed)\n * 5. Only `boolean`, `bigint`, `number`, `string` or their array types allowed\n * 6. No union types allowed\n * 7. Property `set-cookie` must be array type\n * 8. These properties cannot be array type: `age`, `authorization`,\n * `content-length`, `content-type`, `etag`, `expires`, `from`, `host`,\n * `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`,\n * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`,\n * `user-agent`\n *\n * Does not validate the decoded value. For validation, use:\n *\n * - {@link assertHeaders} — Throws on type mismatch\n * - {@link isHeaders} — Returns `null` on type mismatch\n * - {@link validateHeaders} — Returns detailed validation errors\n *\n * @template T Target object type\n * @param input Headers object from HTTP request\n * @returns Decoded object of type `T`\n * @danger You must configure the generic argument `T`\n */\nexport function headers<T extends object>(\n input: Record<string, string | string[] | undefined>,\n): Resolved<T>;\n\n/** @internal */\nexport function headers(): never {\n NoTransformConfigurationError(\"http.headers\");\n}\n\n/**\n * Decodes HTTP headers into type `T` with assertion.\n *\n * Parses HTTP headers object with automatic type casting, then validates the\n * result via {@link assert}. Throws {@link TypeGuardError} on mismatch.\n * Compatible with Express and Fastify request headers.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Property keys must be lowercase\n * 4. Property values cannot be `null` (but `undefined` is allowed)\n * 5. Only `boolean`, `bigint`, `number`, `string` or their array types allowed\n * 6. No union types allowed\n * 7. Property `set-cookie` must be array type\n * 8. These properties cannot be array type: `age`, `authorization`,\n * `content-length`, `content-type`, `etag`, `expires`, `from`, `host`,\n * `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`,\n * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`,\n * `user-agent`\n *\n * Related functions:\n *\n * - {@link headers} — No validation\n * - {@link isHeaders} — Returns `null` instead of throwing\n * - {@link validateHeaders} — Returns detailed validation errors\n *\n * @template T Target object type\n * @param input Headers object from HTTP request\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Decoded object of type `T`\n * @throws {TypeGuardError} When decoded value doesn't conform to type `T`\n * @danger You must configure the generic argument `T`\n */\nexport function assertHeaders<T extends object>(\n input: Record<string, string | string[] | undefined>,\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): Resolved<T>;\n\n/** @internal */\nexport function assertHeaders(): never {\n NoTransformConfigurationError(\"http.assertHeaders\");\n}\n\n/**\n * Decodes HTTP headers into type `T` with type checking.\n *\n * Parses HTTP headers object with automatic type casting, then validates the\n * result via {@link is}. Returns `null` on type mismatch. Compatible with\n * Express and Fastify request headers.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Property keys must be lowercase\n * 4. Property values cannot be `null` (but `undefined` is allowed)\n * 5. Only `boolean`, `bigint`, `number`, `string` or their array types allowed\n * 6. No union types allowed\n * 7. Property `set-cookie` must be array type\n * 8. These properties cannot be array type: `age`, `authorization`,\n * `content-length`, `content-type`, `etag`, `expires`, `from`, `host`,\n * `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`,\n * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`,\n * `user-agent`\n *\n * Related functions:\n *\n * - {@link headers} — No validation\n * - {@link assertHeaders} — Throws instead of returning `null`\n * - {@link validateHeaders} — Returns detailed validation errors\n *\n * @template T Target object type\n * @param input Headers object from HTTP request\n * @returns Decoded object of type `T`, or `null` if invalid\n * @danger You must configure the generic argument `T`\n */\nexport function isHeaders<T extends object>(\n input: Record<string, string | string[] | undefined>,\n): Resolved<T> | null;\n\n/** @internal */\nexport function isHeaders(): never {\n NoTransformConfigurationError(\"http.isHeaders\");\n}\n\n/**\n * Decodes HTTP headers into type `T` with validation.\n *\n * Parses HTTP headers object with automatic type casting, then validates the\n * result via {@link validate}. Returns {@link IValidation.IFailure} with all\n * errors on mismatch, or {@link IValidation.ISuccess} with decoded value.\n * Compatible with Express and Fastify request headers.\n *\n * Type `T` constraints:\n *\n * 1. Must be an object type\n * 2. No dynamic properties allowed\n * 3. Property keys must be lowercase\n * 4. Property values cannot be `null` (but `undefined` is allowed)\n * 5. Only `boolean`, `bigint`, `number`, `string` or their array types allowed\n * 6. No union types allowed\n * 7. Property `set-cookie` must be array type\n * 8. These properties cannot be array type: `age`, `authorization`,\n * `content-length`, `content-type`, `etag`, `expires`, `from`, `host`,\n * `if-modified-since`, `if-unmodified-since`, `last-modified`, `location`,\n * `max-forwards`, `proxy-authorization`, `referer`, `retry-after`, `server`,\n * `user-agent`\n *\n * Related functions:\n *\n * - {@link headers} — No validation\n * - {@link assertHeaders} — Throws on first error\n * - {@link isHeaders} — Returns `null` instead of error details\n *\n * @template T Target object type\n * @param input Headers object from HTTP request\n * @returns Validation result containing decoded value or errors\n * @danger You must configure the generic argument `T`\n */\nexport function validateHeaders<T extends object>(\n input: Record<string, string | string[] | undefined>,\n): IValidation<Resolved<T>>;\n\n/** @internal */\nexport function validateHeaders(): never {\n NoTransformConfigurationError(\"http.validateHeaders\");\n}\n\n/* -----------------------------------------------------------\n PARAMETER\n----------------------------------------------------------- */\n/**\n * Decodes URL path parameter into type `T`.\n *\n * Parses a path parameter string with automatic type casting. When type `T` is\n * `boolean` or `number`, casts the string value to the expected type. Also\n * performs type assertion via {@link assert}, throwing {@link TypeGuardError} on\n * mismatch.\n *\n * @template T Target atomic type (`boolean`, `bigint`, `number`, `string`, or\n * `null`)\n * @param input Path parameter string\n * @returns Decoded value of type `T`\n * @throws {TypeGuardError} When decoded value doesn't conform to type `T`\n * @danger You must configure the generic argument `T`\n */\nexport function parameter<T extends Atomic.Type | null>(\n input: string,\n): Resolved<T>;\n\n/** @internal */\nexport function parameter(): never {\n NoTransformConfigurationError(\"http.parameter\");\n}\n\n/* -----------------------------------------------------------\n FACTORY FUNCTIONS\n----------------------------------------------------------- */\n/**\n * Creates reusable {@link formData} function.\n *\n * @template T Target object type\n * @danger You must configure the generic argument `T`\n */\nexport function createFormData(): never;\n\n/**\n * Creates reusable {@link formData} function.\n *\n * @template T Target object type\n * @returns Reusable decoder function\n */\nexport function createFormData<T extends object>(): (input: FormData) => T;\n\n/** @internal */\nexport function createFormData<T>(): (input: FormData) => T {\n NoTransformConfigurationError(\"http.createFormData\");\n}\n\n/**\n * Creates reusable {@link assertFormData} function.\n *\n * @template T Target object type\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertFormData(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertFormData} function.\n *\n * @template T Target object type\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable decoder function\n */\nexport function createAssertFormData<T extends object>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (input: FormData) => T;\n\n/** @internal */\nexport function createAssertFormData<T>(): (input: FormData) => T {\n NoTransformConfigurationError(\"http.createAssertFormData\");\n}\n\n/**\n * Creates reusable {@link isFormData} function.\n *\n * @template T Target object type\n * @danger You must configure the generic argument `T`\n */\nexport function createIsFormData(): never;\n\n/**\n * Creates reusable {@link isFormData} function.\n *\n * @template T Target object type\n * @returns Reusable decoder function\n */\nexport function createIsFormData<T extends object>(): (\n input: FormData,\n) => T | null;\n\n/** @internal */\nexport function createIsFormData<T>(): (input: FormData) => T | null {\n NoTransformConfigurationError(\"http.createIsFormData\");\n}\n\n/**\n * Creates reusable {@link validateFormData} function.\n *\n * @template T Target object type\n * @danger You must configure the generic argument `T`\n */\nexport function createValidateFormData(): never;\n\n/**\n * Creates reusable {@link validateFormData} function.\n *\n * @template T Target object type\n * @returns Reusable decoder function\n */\nexport function createValidateFormData<T extends object>(): (\n input: FormData,\n) => IValidation<Resolved<T>>;\n\n/** @internal */\nexport function createValidateFormData<T>(): (\n input: FormData,\n) => IValidation<Resolved<T>> {\n NoTransformConfigurationError(\"http.createValidateFormData\");\n}\n\n/**\n * Creates reusable {@link query} function.\n *\n * @template T Target object type\n * @danger You must configure the generic argument `T`\n */\nexport function createQuery(): never;\n\n/**\n * Creates reusable {@link query} function.\n *\n * @template T Target object type\n * @returns Reusable decoder function\n */\nexport function createQuery<T extends object>(): (\n input: string | IReadableURLSearchParams,\n) => T;\n\n/** @internal */\nexport function createQuery<T>(): (\n input: string | IReadableURLSearchParams,\n) => T {\n NoTransformConfigurationError(\"http.createQuery\");\n}\n\n/**\n * Creates reusable {@link assertQuery} function.\n *\n * @template T Target object type\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertQuery(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertQuery} function.\n *\n * @template T Target object type\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable decoder function\n */\nexport function createAssertQuery<T extends object>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (input: string | IReadableURLSearchParams) => T;\n\n/** @internal */\nexport function createAssertQuery<T>(): (\n input: string | IReadableURLSearchParams,\n) => T {\n NoTransformConfigurationError(\"http.createAssertQuery\");\n}\n\n/**\n * Creates reusable {@link isQuery} function.\n *\n * @template T Target object type\n * @danger You must configure the generic argument `T`\n */\nexport function createIsQuery(): never;\n\n/**\n * Creates reusable {@link isQuery} function.\n *\n * @template T Target object type\n * @returns Reusable decoder function\n */\nexport function createIsQuery<T extends object>(): (\n input: string | IReadableURLSearchParams,\n) => T | null;\n\n/** @internal */\nexport function createIsQuery<T>(): (\n input: string | IReadableURLSearchParams,\n) => T | null {\n NoTransformConfigurationError(\"http.createIsQuery\");\n}\n\n/**\n * Creates reusable {@link validateQuery} function.\n *\n * @template T Target object type\n * @danger You must configure the generic argument `T`\n */\nexport function createValidateQuery(): never;\n\n/**\n * Creates reusable {@link validateQuery} function.\n *\n * @template T Target object type\n * @returns Reusable decoder function\n */\nexport function createValidateQuery<T extends object>(): (\n input: string | IReadableURLSearchParams,\n) => IValidation<Resolved<T>>;\n\n/** @internal */\nexport function createValidateQuery<T>(): (\n input: string | IReadableURLSearchParams,\n) => IValidation<Resolved<T>> {\n NoTransformConfigurationError(\"http.createValidateQuery\");\n}\n\n/**\n * Creates reusable {@link headers} function.\n *\n * @template T Target object type\n * @danger You must configure the generic argument `T`\n */\nexport function createHeaders(): never;\n\n/**\n * Creates reusable {@link headers} function.\n *\n * @template T Target object type\n * @returns Reusable decoder function\n */\nexport function createHeaders<T extends object>(): (\n input: Record<string, string | string[] | undefined>,\n) => T;\n\n/** @internal */\nexport function createHeaders<T>(): (\n input: Record<string, string | string[] | undefined>,\n) => T {\n NoTransformConfigurationError(\"http.createHeaders\");\n}\n\n/**\n * Creates reusable {@link assertHeaders} function.\n *\n * @template T Target object type\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @danger You must configure the generic argument `T`\n */\nexport function createAssertHeaders(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): never;\n\n/**\n * Creates reusable {@link assertHeaders} function.\n *\n * @template T Target object type\n * @param errorFactory Custom error factory receiving\n * {@link TypeGuardError.IProps}\n * @returns Reusable decoder function\n */\nexport function createAssertHeaders<T extends object>(\n errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),\n): (input: Record<string, string | string[] | undefined>) => T;\n\n/** @internal */\nexport function createAssertHeaders<T>(): (\n input: Record<string, string | string[] | undefined>,\n) => T {\n NoTransformConfigurationError(\"http.createAssertHeaders\");\n}\n\n/**\n * Creates reusable {@link isHeaders} function.\n *\n * @template T Target object type\n * @danger You must configure the generic argument `T`\n */\nexport function createIsHeaders(): never;\n\n/**\n * Creates reusable {@link isHeaders} function.\n *\n * @template T Target object type\n * @returns Reusable decoder function\n */\nexport function createIsHeaders<T extends object>(): (\n input: Record<string, string | string[] | undefined>,\n) => T | null;\n\n/** @internal */\nexport function createIsHeaders<T>(): (\n input: Record<string, string | string[] | undefined>,\n) => T | null {\n NoTransformConfigurationError(\"http.createIsHeaders\");\n}\n\n/**\n * Creates reusable {@link validateHeaders} function.\n *\n * @template T Target object type\n * @danger You must configure the generic argument `T`\n */\nexport function createValidateHeaders(): never;\n\n/**\n * Creates reusable {@link validateHeaders} function.\n *\n * @template T Target object type\n * @returns Reusable decoder function\n */\nexport function createValidateHeaders<T extends object>(): (\n input: Record<string, string | string[] | undefined>,\n) => IValidation<Resolved<T>>;\n\n/** @internal */\nexport function createValidateHeaders<T>(): (\n input: Record<string, string | string[] | undefined>,\n) => IValidation<Resolved<T>> {\n NoTransformConfigurationError(\"http.createValidateHeaders\");\n}\n\n/**\n * Creates reusable {@link parameter} function.\n *\n * @template T Target atomic type\n * @danger You must configure the generic argument `T`\n */\nexport function createParameter(): never;\n\n/**\n * Creates reusable {@link parameter} function.\n *\n * @template T Target atomic type\n * @returns Reusable decoder function\n */\nexport function createParameter<T extends Atomic.Type | null>(): (\n input: string,\n) => T;\n\n/** @internal */\nexport function createParameter<T extends Atomic.Type | null>(): (\n input: string,\n) => T {\n NoTransformConfigurationError(\"http.createParameter\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAgB,WAAkB;CAChC,8BAA8B,eAAe;AAC/C;;AAoCA,SAAgB,iBAAwB;CACtC,8BAA8B,qBAAqB;AACrD;;AAgCA,SAAgB,aAAoB;CAClC,8BAA8B,iBAAiB;AACjD;;AAiCA,SAAgB,mBAA0B;CACxC,8BAA8B,uBAAuB;AACvD;;AAmCA,SAAgB,QAAe;CAC7B,8BAA8B,YAAY;AAC5C;;AAoCA,SAAgB,cAAqB;CACnC,8BAA8B,kBAAkB;AAClD;;AAgCA,SAAgB,UAAiB;CAC/B,8BAA8B,cAAc;AAC9C;;AAiCA,SAAgB,gBAAuB;CACrC,8BAA8B,oBAAoB;AACpD;;AA2CA,SAAgB,UAAiB;CAC/B,8BAA8B,cAAc;AAC9C;;AA4CA,SAAgB,gBAAuB;CACrC,8BAA8B,oBAAoB;AACpD;;AAwCA,SAAgB,YAAmB;CACjC,8BAA8B,gBAAgB;AAChD;;AAyCA,SAAgB,kBAAyB;CACvC,8BAA8B,sBAAsB;AACtD;;AAyBA,SAAgB,YAAmB;CACjC,8BAA8B,gBAAgB;AAChD;;AAsBA,SAAgB,iBAA4C;CAC1D,8BAA8B,qBAAqB;AACrD;;AA2BA,SAAgB,uBAAkD;CAChE,8BAA8B,2BAA2B;AAC3D;;AAqBA,SAAgB,mBAAqD;CACnE,8BAA8B,uBAAuB;AACvD;;AAqBA,SAAgB,yBAEc;CAC5B,8BAA8B,6BAA6B;AAC7D;;AAqBA,SAAgB,cAET;CACL,8BAA8B,kBAAkB;AAClD;;AA2BA,SAAgB,oBAET;CACL,8BAA8B,wBAAwB;AACxD;;AAqBA,SAAgB,gBAEF;CACZ,8BAA8B,oBAAoB;AACpD;;AAqBA,SAAgB,sBAEc;CAC5B,8BAA8B,0BAA0B;AAC1D;;AAqBA,SAAgB,gBAET;CACL,8BAA8B,oBAAoB;AACpD;;AA2BA,SAAgB,sBAET;CACL,8BAA8B,0BAA0B;AAC1D;;AAqBA,SAAgB,kBAEF;CACZ,8BAA8B,sBAAsB;AACtD;;AAqBA,SAAgB,wBAEc;CAC5B,8BAA8B,4BAA4B;AAC5D;;AAqBA,SAAgB,kBAET;CACL,8BAA8B,sBAAsB;AACtD"}