fx-flow v0.7.0 / types / Immutable
Type alias: Immutable<T, Ignore>
Immutable<
T
,Ignore
>:T
extendsT
?T
extendsPrimitive
|AnyFunction
|Ignore
?T
:T
extends infer U[] ?IsTuple
<T
> extendstrue
?ImmutableTuple
<T
,Ignore
> :ImmutableArray
<U
,Ignore
> :T
extendsMap
<infer K, infer V> ?ImmutableMap
<K
,V
,Ignore
> :T
extendsSet
<infer M> ?ImmutableSet
<M
,Ignore
> :ImmutableObject
<T
,Ignore
> :never
Make types to readonly, work recursively
Type parameters
• T
• Ignore = never