Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "types/immutable"

Index

Type aliases

Immutable

Immutable<T>: T extends Primitive ? T : T extends Array<infer E> ? ReadonlyArray<E> : T extends Map<infer K, infer V> ? ReadonlyMap<K, V> : T extends object ? Readonly<T> : T

Marks any type as immutable, and deep recursive into containers too.

Type parameters

  • T

ImmutableArray

ImmutableArray<T>: ReadonlyArray<Immutable<T>>

An Array where itself, and all it's children, and so on, are readonly.

Type parameters

  • T

ImmutableMap

ImmutableMap<K, V>: ReadonlyMap<Immutable<K>, Immutable<V>>

A Map where itself, and all it's children, and so on, are readonly.

Type parameters

  • K

  • V

ImmutableObject

ImmutableObject<T>: {}

An object where itself, and all it's children, and so on, are readonly.

Type parameters

  • T

Type declaration

Generated using TypeDoc