UNPKG

typia

Version:

Superfast runtime validators with only one line

769 lines (768 loc) • 31.4 kB
import { Atomic } from "./typings/Atomic"; import { IValidation } from "./IValidation"; import { Resolved } from "./Resolved"; import { TypeGuardError } from "./TypeGuardError"; /** * Form data decoder. * * `typia.http.formData()` is a function decoding `FormData` instance, with * automatic type casting to the expected type. When roperty type be defined * as `boolean` or `Blob` type, `typia.http.formData()` will cast the value to * the expected type when decoding. * * By the way, as `FormData` is not enough to express complex data structures, * `typia.http.formData()` function has some limitations. If target type `T` is * not following those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array types are allowed * 4. By the way, union type never be not allowed * * Also, `typia.http.formData()` function does not perform validation about the * decoded value. Therefore, if you can't sure that input data is following the * `T` type, it would better to call one of below functions intead. * * @template T Expected type of decoded value * @param input FormData instance * @returns Decoded form FormData * * @author Jeongho Nam - https://github.com/samchon */ declare function formData<T extends object>(input: FormData): Resolved<T>; declare const formDataPure: typeof formData; export { formDataPure as formData }; /** * Form data decoder with type assertion. * * `typia.http.assertFormData()` is a function decoding `FormData` instance, with * automatic type casting to the expected type. When roperty type be defined * as `boolean` or `Blob` type, `typia.http.assertFormData()` will cast the value * to the expected type when decoding. * * Also, after decoding, `typia.http.assertFormData()` performs type assertion to * the decoded value by combining with {@link assert} function. Therefore, when * the decoded value is not following the `T` type, {@link TypeGuardError} or * custom error generated by *errorFactory* would be thrown. * * By the way, as `FormData` is not enough to express complex data structures, * `typia.http.assertFormData()` function has some limitations. If target type `T` * is not following those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array types are allowed * 4. By the way, union type never be not allowed * * @template T Expected type of decoded value * @param input FormData instance * @param errorFactory Custom error factory. Default is `TypeGuardError` * @returns Decoded form FormData * * @author Jeongho Nam - https://github.com/samchon */ declare function assertFormData<T extends object>(input: FormData, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>; declare const assertFormDataPure: typeof assertFormData; export { assertFormDataPure as assertFormData }; /** * Form data decoder with type checking. * * `typia.http.isFormData()` is a function decoding `FormData` instance, with * automatic type casting to the expected type. When roperty type be defined * as `boolean` or `Blob` type, `typia.http.isFormData()` will cast the value * to the expected type when decoding. * * Also, after decoding, `typia.http.isFormData()` performs type checking to the * decoded value by combining with {@link is} function. Therefore, when the * decoded value is not following the `T` type, `null` value would be returned. * * By the way, as `FormData` is not enough to express complex data structures, * `typia.http.isFormData()` function has some limitations. If target type `T` is * not following those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array types are allowed * 4. By the way, union type never be not allowed * * @template T Expected type of decoded value * @param input FormData instance * @returns Decoded form FormData or `null` value * * @author Jeongho Nam - https://github.com/samchon */ declare function isFormData<T extends object>(input: FormData): Resolved<T> | null; declare const isFormDataPure: typeof isFormData; export { isFormDataPure as isFormData }; /** * Form data decoder with type validation. * * `typia.http.validateFormData()` is a function decoding `FormData` instance, * with automatic type casting to the expected type. When roperty type be defined * as `boolean` or `Blob` type, `typia.http.validateFormData()` will cast the * value to the expected type when decoding. * * Also, after decoding, `typia.http.validateFormData()` performs type validation * to the decoded value by combining with {@link validate} function. Therefore, * when the decoded value is not following the `T` type, * {@link IValidation.IFailure} would be returned. Otherwise, * x@xxxx IValidation.ISuccess} would be returned. * * By the way, as `FormData` is not enough to express complex data structures, * `typia.http.validateFormData()` function has some limitations. If target type * `T` is not following those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Only `boolean`, `bigint`, `number`, `string`, `Blob`, `File` or their array types are allowed * 4. By the way, union type never be not allowed * * @template T Expected type of decoded value * @param input FormData instance * @returns Validation result with decoded form FormData * * @author Jeongho Nam - https://github.com/samchon */ declare function validateFormData<T extends object>(input: FormData): IValidation<Resolved<T>>; declare const validateFormDataPure: typeof validateFormData; export { validateFormDataPure as validateFormData }; /** * URL query decoder. * * `typia.http.query()` is a function decoding a query string or an `URLSearchParams` * instance, with automatic type casting to the expected type. When property type be * defined as `boolean` or `number` type, `typia.http.query()` will cast the value to * the expected type when decoding. * * By the way, as URL query is not enough to express complex data structures, * `typia.http.query()` function has some limitations. If target type `T` is not * following those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed * 4. By the way, union type never be not allowed * * Also, `typia.http.query()` function does not perform validation about the decoded * value. Therefore, if you can't sure that input data is following the `T` type, * it would better to call one of below functions intead. * * - {@link assertQuery} * - {@link isQuery} * - {@link validateQuery} * * @template T Expected type of decoded value * @param input Query string or URLSearchParams instance * @returns Decoded query object * * @author Jeongho Nam - https://github.com/samchon */ declare function query<T extends object>(input: string | URLSearchParams): Resolved<T>; declare const queryPure: typeof query; export { queryPure as query }; /** * URL query decoder with type assertion. * * `typia.http.assertQuery()` is a function decoding a query string or an * `URLSearchParams` instance, with automatic type casting to the expected type. * When property type be defined as `boolean` or `number` type, * `typia.http.assertQuery()` will cast the value to the expected type when decoding. * * Also, after decoding, `typia.http.assertQuery()` performs type assertion to the * decoded value by combining with {@link assert} function. Therefore, when the * decoded value is not following the `T` type, {@link TypeGuardError} or custom * error generated by *errorFactory* would be thrown. * * By the way, as URL query is not enough to express complex data structures, * `typia.http.assertQuery()` function has some limitations. If target type `T` is * notfollowing those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed * 4. By the way, union type never be not allowed * * @template T Expected type of decoded value * @param input Query string or URLSearchParams instance * @param errorFactory Custom error factory. Default is `TypeGuardError` * @returns Decoded query object * * @author Jeongho Nam - https://github.com/samchon */ declare function assertQuery<T extends object>(input: string | URLSearchParams, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>; declare const assertQueryPure: typeof assertQuery; export { assertQueryPure as assertQuery }; /** * URL query decoder with type checking. * * `typia.http.isQuery()` is a function decoding a query string or an * `URLSearchParams` instance, with automatic type casting to the expected type. * When property type be defined as `boolean` or `number` type, * `typia.http.isQuery()` will cast the value to the expected type when decoding. * * Also, after decoding, `typia.http.isQuery()` performs type checking to the * decoded value by combining with {@link is} function. Therefore, when the * decoded value is not following the `T` type, `null` value would be returned. * * By the way, as URL query is not enough to express complex data structures, * `typia.http.isQuery()` function has some limitations. If target type `T` is * notfollowing those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed * 4. By the way, union type never be not allowed * * @template T Expected type of decoded value * @param input Query string or URLSearchParams instance * @returns Decoded query object or `null` value * * @author Jeongho Nam - https://github.com/samchon */ declare function isQuery<T extends object>(input: string | URLSearchParams): Resolved<T> | null; declare const isQueryPure: typeof isQuery; export { isQueryPure as isQuery }; /** * URL query decoder with type validation. * * `typia.http.validateQuery()` is a function decoding a query string or an * `URLSearchParams` instance, with automatic type casting to the expected type. * When property type be defined as `boolean` or `number` type, * `typia.http.validateQuery()` will cast the value to the expected type when decoding. * * Also, after decoding, `typia.http.validateQuery()` performs type validation to the * decoded value by combining with {@link validate} function. Therefore, when the * decoded value is not following the `T` type, {@link IValidation.IFailure} would * be returned. Otherwise, {@link IValidation.ISuccess} would be returned. * * By the way, as URL query is not enough to express complex data structures, * `typia.http.validateQuery()` function has some limitations. If target type `T` is * notfollowing those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed * 4. By the way, union type never be not allowed * * @template T Expected type of decoded value * @param input Query string or URLSearchParams instance * @returns Validation result with decoded query object * * @author Jeongho Nam - https://github.com/samchon */ declare function validateQuery<T extends object>(input: string | URLSearchParams): IValidation<Resolved<T>>; declare const validateQueryPure: typeof validateQuery; export { validateQueryPure as validateQuery }; /** * Headers decoder (for express and fastify). * * `typia.http.headers()` is a function decoding an header instance, with automatic * type casting to the expected type. When property type be defined as `boolean` or * `number` type, `typia.http.headers()` will cast the value to the expected type. * * By the way, as HTTP headers are not enough to express complex data structures, * `typia.http.headers()` function has some limitations. If target type `T` is not * following those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Property key must be lower case * 4. Property value cannot be `null`, but `undefined` is possible * 5. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed * 6. By the way, union type never be not allowed * 7. Property `set-cookie` must be array type * 8. Those properties cannot be array type * - age * - authorization * - content-length * - content-type * - etag * - expires * - from * - host * - if-modified-since * - if-unmodified-since * - last-modified * - location * - max-forwards * - proxy-authorization * - referer * - retry-after * - server * - user-agent * * Also, `typia.http.headers()` function does not perform validation about the decoded * value. Therefore, if you can't sure that input data is following the `T` type, * it would better to call one of below functions intead. * * - {@link assertHeaders} * - {@link isHeaders} * - {@link validateHeaders} * * @template T Expected type of decoded value * @param input Query string or URLSearchParams instance * @returns Decoded headers object * * @author Jeongho Nam - https://github.com/samchon */ declare function headers<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T>; declare const headersPure: typeof headers; export { headersPure as headers }; /** * Headers decoder with type assertion (for express and fastify). * * `typia.http.assertHeaders()` is a function decoding an header instance, with * automatic type casting to the expected type. When property type be defined as * `boolean` or `number` type, `typia.http.headers()` will cast the value to the * expected type. * * Also, after decoding, `typia.http.assertHeaders()` performs type assertion to the * decoded value by combining with {@link assert} function. Therefore, when the * decoded value is not following the `T` type, {@link TypeGuardError} or custom * error generated by *errorFactory* would be thrown. * * By the way, as HTTP headers are not enough to express complex data structures, * `typia.http.headers()` function has some limitations. If target type `T` is not * following those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Property key must be lower case * 4. Property value cannot be `null`, but `undefined` is possible * 5. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed * 6. By the way, union type never be not allowed * 7. Property `set-cookie` must be array type * 8. Those properties cannot be array type * - age * - authorization * - content-length * - content-type * - etag * - expires * - from * - host * - if-modified-since * - if-unmodified-since * - last-modified * - location * - max-forwards * - proxy-authorization * - referer * - retry-after * - server * - user-agent * * @template T Expected type of decoded value * @param input Query string or URLSearchParams instance * @param errorFactory Custom error factory. Default is `TypeGuardError` * @returns Decoded headers object * * @author Jeongho Nam - https://github.com/samchon */ declare function assertHeaders<T extends object>(input: Record<string, string | string[] | undefined>, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>; declare const assertHeadersPure: typeof assertHeaders; export { assertHeadersPure as assertHeaders }; /** * > You must configure the generic argument `T`. * * Headers decoder with type checking (for express and fastify). * * `typia.http.isHeaders()` is a function decoding an header instance, with * automatic type casting to the expected type. When property type be defined as * `boolean` or `number` type, `typia.http.headers()` will cast the value to the * expected type. * * Also, after decoding, `typia.http.isHeaders()` performs type checking to the * decoded value by combining with {@link is} function. Therefore, when the * decoded value is not following the `T` type, `null` value would be returned. * * By the way, as HTTP headers are not enough to express complex data structures, * `typia.http.headers()` function has some limitations. If target type `T` is not * following those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Property key must be lower case * 4. Property value cannot be `null`, but `undefined` is possible * 5. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed * 6. By the way, union type never be not allowed * 7. Property `set-cookie` must be array type * 8. Those properties cannot be array type * - age * - authorization * - content-length * - content-type * - etag * - expires * - from * - host * - if-modified-since * - if-unmodified-since * - last-modified * - location * - max-forwards * - proxy-authorization * - referer * - retry-after * - server * - user-agent * * @template T Expected type of decoded value * @param input Query string or URLSearchParams instance * @returns Decoded headers object or `null` value * * @author Jeongho Nam - https://github.com/samchon */ declare function isHeaders<T extends object>(input: Record<string, string | string[] | undefined>): Resolved<T> | null; declare const isHeadersPure: typeof isHeaders; export { isHeadersPure as isHeaders }; /** * Headers decoder with type validation (for express and fastify). * * `typia.http.validateHeaders()` is a function decoding an header instance, with * automatic type casting to the expected type. When property type be defined as * `boolean` or `number` type, `typia.http.headers()` will cast the value to the * expected type. * * Also, after decoding, `typia.http.validateHeaders()` performs type assertion to the * decoded value by combining with {@link validate} function. Therefore, when the * decoded value is not following the `T` type, {@link IValidation.IError} would be * returned. Otherwise, {@link IValidation.ISuccess} be returned. * * By the way, as HTTP headers are not enough to express complex data structures, * `typia.http.headers()` function has some limitations. If target type `T` is not * following those restrictions, compilation errors would be occured. * * 1. Type `T` must be an object type * 2. Do not allow dynamic property * 3. Property key must be lower case * 4. Property value cannot be `null`, but `undefined` is possible * 5. Only `boolean`, `bigint`, `number`, `string` or their array types are allowed * 6. By the way, union type never be not allowed * 7. Property `set-cookie` must be array type * 8. Those properties cannot be array type * - age * - authorization * - content-length * - content-type * - etag * - expires * - from * - host * - if-modified-since * - if-unmodified-since * - last-modified * - location * - max-forwards * - proxy-authorization * - referer * - retry-after * - server * - user-agent * * @template T Expected type of decoded value * @param input Query string or URLSearchParams instance * @returns Decoded headers object * * @author Jeongho Nam - https://github.com/samchon */ declare function validateHeaders<T extends object>(input: Record<string, string | string[] | undefined>): IValidation<Resolved<T>>; declare const validateHeadersPure: typeof validateHeaders; export { validateHeadersPure as validateHeaders }; /** * URL path parameter decoder. * * `typia.http.parameter()` is a function decoding a path parameter, with automatic * type casting to the expected type. When type `T` has beeen defined as `boolean` or * `number` type, `typia.http.parameter()` will cast the value to the expected type. * * Also, `typia.http.parameter()` performs type assertion to the decoded value by * combining with {@link assert} function. Therefore, when the decoded value is not * following the `T` type, {@link TypeGuardError} would be thrown. * * @template T Expected type of decoded value * @param input Path parameter string * @returns Decoded path parameter value */ declare function parameter<T extends Atomic.Type | null>(input: string): Resolved<T>; declare const parameterPure: typeof parameter; export { parameterPure as parameter }; /** * Creates a reusable {@link formdata} function. * * @danger You must configure the generic argument `T` * @template T The type of the formdata object * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createFormData(): never; /** * Creates a reusable {@link formdata} function. * * @template T The type of the formdata object * @returns A reusable `formdata` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createFormData<T extends object>(): (input: FormData) => T; declare const createFormDataPure: typeof createFormData; export { createFormDataPure as createFormData }; /** * Creates a reusable {@link assertFormData} function. * * @danger You must configure the generic argument `T` * @template T The type of the formdata object * @param errorFactory Custom error factory. Default is `TypeGuardError` * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createAssertFormData(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never; /** * Creates a reusable {@link assertFormData} function. * * @template T The type of the formdata object * @param errorFactory Custom error factory. Default is `TypeGuardError` * @returns A reusable `assertFormData` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createAssertFormData<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: FormData) => T; declare const createAssertFormDataPure: typeof createAssertFormData; export { createAssertFormDataPure as createAssertFormData }; /** * Creates a reusable {@link isFormData} function. * * @danger You must configure the generic argument `T` * @template T The type of the formdata object * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createIsFormData(): never; /** * Creates a reusable {@link isFormData} function. * * @template T The type of the formdata object * @returns A reusable `isFormData` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createIsFormData<T extends object>(): (input: FormData) => T | null; declare const createIsFormDataPure: typeof createIsFormData; export { createIsFormDataPure as createIsFormData }; /** * Creates a reusable {@link validateFormData} function. * * @danger You must configure the generic argument `T` * @template T The type of the formdata object * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createValidateFormData(): never; /** * Creates a reusable {@link validateFormData} function. * * @template T The type of the formdata object * @returns A reusable `validateFormData` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createValidateFormData<T extends object>(): (input: FormData) => IValidation<Resolved<T>>; declare const createValidateFormDataPure: typeof createValidateFormData; export { createValidateFormDataPure as createValidateFormData }; /** * Creates a reusable {@link query} function. * * @danger You must configure the generic argument `T` * @template T The type of the query object * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createQuery(): never; /** * Creates a reusable {@link query} function. * * @template T The type of the query object * @returns A reusable `query` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createQuery<T extends object>(): (input: string | URLSearchParams) => T; declare const createQueryPure: typeof createQuery; export { createQueryPure as createQuery }; /** * Creates a reusable {@link assertQuery} function. * * @danger You must configure the generic argument `T` * @template T The type of the query object * @param errorFactory Custom error factory. Default is `TypeGuardError` * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createAssertQuery(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never; /** * Creates a reusable {@link assertQuery} function. * * @template T The type of the query object * @param errorFactory Custom error factory. Default is `TypeGuardError` * @returns A reusable `assertQuery` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createAssertQuery<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: string | URLSearchParams) => T; declare const createAssertQueryPure: typeof createAssertQuery; export { createAssertQueryPure as createAssertQuery }; /** * Creates a reusable {@link isQuery} function. * * @danger You must configure the generic argument `T` * @template T The type of the query object * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createIsQuery(): never; /** * Creates a reusable {@link isQuery} function. * * @template T The type of the query object * @returns A reusable `isQuery` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createIsQuery<T extends object>(): (input: string | URLSearchParams) => T | null; declare const createIsQueryPure: typeof createIsQuery; export { createIsQueryPure as createIsQuery }; /** * Creates a reusable {@link validateQuery} function. * * @danger You must configure the generic argument `T` * @template T The type of the query object * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createValidateQuery(): never; /** * Creates a reusable {@link validateQuery} function. * * @template T The type of the query object * @returns A reusable `validateQuery` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createValidateQuery<T extends object>(): (input: string | URLSearchParams) => IValidation<Resolved<T>>; declare const createValidateQueryPure: typeof createValidateQuery; export { createValidateQueryPure as createValidateQuery }; /** * Creates a reusable {@link headers} function. * * @danger You must configure the generic argument `T` * @template T The type of the headers object * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createHeaders(): never; /** * Creates a reusable {@link headers} function. * * @template T The type of the headers object * @returns A reusable `headers` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createHeaders<T extends object>(): (input: Record<string, string | string[] | undefined>) => T; declare const createHeadersPure: typeof createHeaders; export { createHeadersPure as createHeaders }; /** * Creates a reusable {@link assertHeaders} function. * * @danger You must configure the generic argument `T` * @template T The type of the headers object * @param errorFactory Custom error factory. Default is `TypeGuardError` * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createAssertHeaders(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): never; /** * Creates a reusable {@link assertHeaders} function. * * @template T The type of the headers object * @param errorFactory Custom error factory. Default is `TypeGuardError` * @returns A reusable `assertHeaders` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createAssertHeaders<T extends object>(errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): (input: Record<string, string | string[] | undefined>) => T; declare const createAssertHeadersPure: typeof createAssertHeaders; export { createAssertHeadersPure as createAssertHeaders }; /** * Creates a reusable {@link isHeaders} function. * * @danger You must configure the generic argument `T` * @template T The type of the headers object * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createIsHeaders(): never; /** * Creates a reusable {@link isHeaders} function. * * @template T The type of the headers object * @returns A reusable `isHeaders` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createIsHeaders<T extends object>(): (input: Record<string, string | string[] | undefined>) => T | null; declare const createIsHeadersPure: typeof createIsHeaders; export { createIsHeadersPure as createIsHeaders }; /** * Creates a reusable {@link validateHeaders} function. * * @danger You must configure the generic argument `T` * @template T The type of the headers object * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createValidateHeaders(): never; /** * Creates a reusable {@link validateHeaders} function. * * @template T The type of the headers object * @returns A reusable `validateHeaders` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createValidateHeaders<T extends object>(): (input: Record<string, string | string[] | undefined>) => IValidation<Resolved<T>>; declare const createValidateHeadersPure: typeof createValidateHeaders; export { createValidateHeadersPure as createValidateHeaders }; /** * Creates a reusable {@link parameter} function. * * @danger You must configure the generic argument `T` * @template T The type of the parameter value * @throws compile error * * @author Jeongho Nam - https://github.com/samchon */ declare function createParameter(): never; /** * Creates a reusable {@link parameter} function. * * @template T The type of the parameter value * @returns A reusable `parameter` function * * @author Jeongho Nam - https://github.com/samchon */ declare function createParameter<T extends Atomic.Type | null>(): (input: string) => T; declare const createParameterPure: typeof createParameter; export { createParameterPure as createParameter };