Type alias Immutable<T>

Immutable<T>: T extends ImmutablePrimitive ? T : T extends (infer U)[] ? ImmutableArray<U> : T extends Uint8Array ? ImmutableUint8Array : T extends Map<infer K, infer V> ? ImmutableMap<K, V> : T extends Set<infer M> ? ImmutableSet<M> : ImmutableObject<T>

A deep-readonly utility type. Supports objects, Arrays, Uint8Arrays, Maps, and Sets.

Note: Uint8Array is the only supported TypedArray.

Type Parameters

  • T

Generated using TypeDoc