Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/tui/src/signals/mod.ts>makeMapMethodsReactive

🦕 Deno module for creating Terminal User Interfaces
Latest
function makeMapMethodsReactive
Re-export
import { makeMapMethodsReactive } from "https://deno.land/x/tui@2.1.11/src/signals/mod.ts";

Replaces set, delete and clear methods in given map with ones that provide reactivity.

When map gets in any way updated propagate method gets called on provided signal.

Type Parameters

T extends Map<unknown, unknown>
S

Parameters

map: T

Changes method of detecting value changes when .set() gets called.

  • When set to true it checks whether value changed.
  • When set to false it checks whether map size changed (default).
signal: Signal<S>
optional
watchMapUpdates = [UNSUPPORTED]