QuickBEAM.VM.Value (QuickBEAM v0.10.9)

Copy Markdown View Source

Type definitions and guards for JS values in the BEAM VM.

Summary

Types

bigint()

@type bigint() :: {:bigint, integer()}

bound()

@type bound() :: {:bound, non_neg_integer(), term(), term(), list()}

builtin()

@type builtin() :: {:builtin, binary(), function() | map()}

closure()

@type closure() :: {:closure, map(), QuickBEAM.VM.Function.t()}

heap_ref()

@type heap_ref() :: reference() | pos_integer()

js_value()

@type js_value() ::
  nil
  | :undefined
  | :nan
  | :infinity
  | :neg_infinity
  | boolean()
  | number()
  | binary()
  | object()
  | closure()
  | builtin()
  | bound()
  | symbol()
  | bigint()

object()

@type object() :: {:obj, heap_ref()}

symbol()

@type symbol() :: {:symbol, binary()} | {:symbol, binary(), reference()}

Functions

is_bigint(v)

(macro)

is_builtin(v)

(macro)

is_closure(v)

(macro)

is_nullish(v)

(macro)

is_object(v)

(macro)

is_symbol(v)

(macro)