import { Kind } from '../symbols/index'; import type { TSchema } from '../schema/index'; import type { Static } from '../static/index'; import type { Evaluate, Ensure, Assert } from '../helpers/index'; import { type TAny } from '../any/index'; import { type TBoolean } from '../boolean/index'; import { type TEnumRecord, type TEnum } from '../enum/index'; import { type TInteger } from '../integer/index'; import { type TLiteral, type TLiteralValue } from '../literal/index'; import { type TNever } from '../never/index'; import { type TNumber } from '../number/index'; import { type TObject, type TProperties, type TAdditionalProperties, type ObjectOptions } from '../object/index'; import { type TRegExp } from '../regexp/index'; import { type TString } from '../string/index'; import { type TUnion } from '../union/index'; import { TIsTemplateLiteralFinite, type TTemplateLiteral } from '../template-literal/index'; type TFromTemplateLiteralKeyInfinite = Ensure>; type TFromTemplateLiteralKeyFinite> = (Ensure>>); type TFromTemplateLiteralKey = TIsTemplateLiteralFinite extends false ? TFromTemplateLiteralKeyInfinite : TFromTemplateLiteralKeyFinite; type TFromEnumKey, Type extends TSchema> = Ensure>; type TFromUnionKeyLiteralString, Type extends TSchema> = { [_ in Key['const']]: Type; }; type TFromUnionKeyLiteralNumber, Type extends TSchema> = { [_ in Key['const']]: Type; }; type TFromUnionKeyVariants = Keys extends [infer Left extends TSchema, ...infer Right extends TSchema[]] ? (Left extends TUnion ? TFromUnionKeyVariants> : Left extends TLiteral ? TFromUnionKeyVariants> : Left extends TLiteral ? TFromUnionKeyVariants> : {}) : Result; type TFromUnionKey> = (Ensure>>); type TFromLiteralKey = (Ensure]: Type; }>>); type TFromRegExpKey<_Key extends TRegExp, Type extends TSchema> = (Ensure>); type TFromStringKey<_Key extends TString, Type extends TSchema> = (Ensure>); type TFromAnyKey<_Key extends TAny, Type extends TSchema> = (Ensure>); type TFromNeverKey<_Key extends TNever, Type extends TSchema> = (Ensure>); type TFromBooleanKey<_Key extends TBoolean, Type extends TSchema> = (Ensure>); type TFromIntegerKey<_Key extends TSchema, Type extends TSchema> = (Ensure>); type TFromNumberKey<_Key extends TSchema, Type extends TSchema> = (Ensure>); type RecordStatic = (Evaluate<{ [_ in Assert, PropertyKey>]: Static; }>); export interface TRecord extends TSchema { [Kind]: 'Record'; static: RecordStatic; type: 'object'; patternProperties: { [pattern: string]: Type; }; additionalProperties: TAdditionalProperties; } export type TRecordOrObject = (Key extends TTemplateLiteral ? TFromTemplateLiteralKey : Key extends TEnum ? TFromEnumKey : Key extends TUnion ? TFromUnionKey : Key extends TLiteral ? TFromLiteralKey : Key extends TBoolean ? TFromBooleanKey : Key extends TInteger ? TFromIntegerKey : Key extends TNumber ? TFromNumberKey : Key extends TRegExp ? TFromRegExpKey : Key extends TString ? TFromStringKey : Key extends TAny ? TFromAnyKey : Key extends TNever ? TFromNeverKey : TNever); /** `[Json]` Creates a Record type */ export declare function Record(key: Key, type: Type, options?: ObjectOptions): TRecordOrObject; /** Gets the Records Pattern */ export declare function RecordPattern(record: TRecord): string; /** Gets the Records Key Type */ export type TRecordKey ? (Key extends TNumber ? TNumber : Key extends TString ? TString : TString) : TString> = Result; /** Gets the Records Key Type */ export declare function RecordKey(type: Type): TRecordKey; /** Gets a Record Value Type */ export type TRecordValue ? Value : TNever)> = Result; /** Gets a Record Value Type */ export declare function RecordValue(type: Type): TRecordValue; export {};