Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Object/P/Readonly"

Index

Type aliases

Type aliases

Readonly

Readonly<O, Path, depth>: Compute<"_" extends TupleOf<Pick<ObjectOf<Prepend<Path, "_">>, Exclude<keyof ObjectOf<Prepend<Path, "_">>, IterationMap[IterationOf<_Max<IterationOf<NumberOf<Prepend<Path, "_">["length"]>>>[2]>[0]][2]>>>[0] ? 0 extends Tail<TupleOf<Pick<ObjectOf<Prepend<Path, "_">>, Exclude<keyof ObjectOf<Prepend<Path, "_">>, IterationMap[IterationOf<_Max<IterationOf<NumberOf<Prepend<Path, "_">["length"]>>>[2]>[0]][2]>>>>["length"] ? { 1: { 'flat': ReadonlyFlat<O & {}>; 'deep': ReadonlyDeep<O & {}>; }[depth]; 0: Compute<{ 'flat': ReadonlyFlat<Pick<O & {}, Path[Tail<Path>["length"]]>>; 'deep': ReadonlyDeep<Pick<O & {}, Path[Tail<Path>["length"]]>>; }[depth] & Pick<O & {}, Exclude<keyof O, keyof { 'flat': ReadonlyFlat<Pick<O & {}, Path[Tail<Path>["length"]]>>; 'deep': ReadonlyDeep<Pick<O & {}, Path[Tail<Path>["length"]]>>; }[depth]>>>; }[Implements<Keys<O & {}>, Path[Tail<Path>["length"]]>] : _Readonly<O & {}, TupleOf<Pick<ObjectOf<Prepend<Path, "_">>, Exclude<keyof ObjectOf<Prepend<Path, "_">>, IterationMap[IterationOf<_Max<IterationOf<NumberOf<Prepend<Path, "_">["length"]>>>[2]>[0]][2]>>>, Path[Tail<Path>["length"]], depth, ["0", "2", "1", 1, "+"]> : O>

Make some fields of O readonly at Path (deeply or not) (⚠️ this type is expensive)

Type parameters

  • O: object

    to make readonly

  • Path: PPath

    to be followed

  • depth: Depth

    to do it deeply (?='flat')

returns

object

example

_Readonly

_Readonly<O, Path, K, depth, I>: object

Type parameters

Made with ❤️ by pirix-gh. Documentation generated by TypeDoc.