Skip to content

fx-flow v0.7.0 / types / Immutable

Type alias: Immutable<T, Ignore>

Immutable<T, Ignore>: T extends T ? T extends Primitive | AnyFunction | Ignore ? T : T extends infer U[] ? IsTuple<T> extends true ? ImmutableTuple<T, Ignore> : ImmutableArray<U, Ignore> : T extends Map<infer K, infer V> ? ImmutableMap<K, V, Ignore> : T extends Set<infer M> ? ImmutableSet<M, Ignore> : ImmutableObject<T, Ignore> : never

Make types to readonly, work recursively

Type parameters

T

Ignore = never

Source

packages/core/src/types/immutable.ts:15

Released under the MIT License.