import { type IndexOfTuple, type UnknownRecord } from 'ts-type-forge'; import { type Type } from '../type.mjs'; /** * Extracts the {@link Type} stored at a single key of a record type. * * The first argument must be a record type (i.e. it must extend * `Type`, like {@link pick} and {@link keyof}), and the second * argument is constrained to the keys declared on that record. * * The record type may be a simple record, an intersection (e.g. the result of * {@link mergeRecords}), a union, a recursive type, or any combination of * these — the underlying shape is expanded and, when a key resolves to * multiple member types (as in a union), the resulting types are combined with * {@link union}. * * @example * ```ts * import * as t from 'ts-fortress'; * * const ymd = t.record({ * year: t.number(1900), * month: t.number(1), * date: t.number(1), * }); * * const year = t.at(ymd, 'year'); // Type * * year.is(2000); // true * ``` */ export declare function at(recordType: Type, key: K): Type; /** * Extracts the {@link Type} stored at a single index of a tuple type. * * @example * ```ts * import * as t from 'ts-fortress'; * * const tup = t.tuple([t.number(), t.string(), t.boolean()]); * * const second = t.at(tup, 1); // Type * * second.is('hello'); // true * ``` */ export declare function at>(tupleType: Type, index: N): Type; //# sourceMappingURL=at.d.mts.map