Skip to main content
Module

x/rimbu/mod.ts>Immutable

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
type alias Immutable
Re-export
import { type Immutable } from "https://deno.land/x/rimbu@0.10.0/mod.ts";

An immutably typed version of given type T. Makes all properties or elements read only.

definition: T extends (infer E)[] ? readonly Immutable<E>[] : T extends Literal.Obj ? readonly [K in keyof T]: Immutable<T[K]> : T extends boolean ? boolean : T
function Immutable
Re-export
import { Immutable } from "https://deno.land/x/rimbu@0.10.0/mod.ts";

Returns the same value wrapped in the Immutable type

Parameters

value: T
  • the value to wrap