import type { TSchema, SchemaOptions } from '../schema/index'; import type { Static } from '../static/index'; import type { Ensure } from '../helpers/index'; import type { TReadonlyOptional } from '../readonly-optional/index'; import type { TReadonly } from '../readonly/index'; import type { TOptional } from '../optional/index'; import { Kind } from '../symbols/index'; type StaticReturnType = Static; type StaticParameter = T extends TReadonlyOptional ? [Readonly>?] : T extends TReadonly ? [Readonly>] : T extends TOptional ? [Static?] : [ Static ]; type StaticParameters = (T extends [infer L extends TSchema, ...infer R extends TSchema[]] ? StaticParameters]> : Acc); type StaticFunction = Ensure<(...param: StaticParameters) => StaticReturnType>; export interface TFunction extends TSchema { [Kind]: 'Function'; static: StaticFunction; type: 'Function'; parameters: T; returns: U; } /** `[JavaScript]` Creates a Function type */ export declare function Function(parameters: [...T], returns: U, options?: SchemaOptions): TFunction; export {};