import { Key } from '../../Any/Key'; import { Readonly as OReadonly } from '../Readonly'; import { List } from '../../List/List'; import { BuiltIn } from '../../Misc/BuiltIn'; import { Tail } from '../../List/Tail'; import { Depth } from '../_Internal'; /** * @hidden */ declare type ReadonlyAt, depth extends Depth> = O extends BuiltIn ? O : Path extends [Key] ? O extends List ? OReadonly : O extends object ? OReadonly : O : { [K in keyof O]: K extends Path[0] ? ReadonlyAt, depth> : O[K]; }; /** * Make some fields of `O` readonly at `Path` (deeply or not) * @param O to make readonly * @param Path to be followed * @param depth (?=`'flat'`) 'deep' to do it deeply * @returns [[Object]] * @example * ```ts * ``` */ export declare type Readonly, depth extends Depth = 'flat'> = Path extends unknown ? ReadonlyAt : never; export {};