Immutable (Type)
Type Aliases
Section titled “Type Aliases”Immutable
Section titled “Immutable”type Immutable<T> = T extends ImmutablePrimitive ? T : T extends infer U[] ? ImmutableArray<U> : T extends Map<infer K, infer V> ? ImmutableMap<K, V> : T extends Set<infer M> ? ImmutableSet<M> : ImmutableObject<T>;Defined in: types/Immutable.ts:8
Immutable is a utility type that will make the given array/map/set/object recursively read-only.
You can use this type to easily build safe data structures.
From: https://stackoverflow.com/questions/41879327/deepreadonly-object-typescript
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
