NodeLike
On this page

NodeLike

Type in Types

Anything accepted where a node is read: any node, mutable or read-only, or a JS number, which lifts to an f32 literal.

import type { NodeLike } from 'typeshade'

The signature, the description and the examples come from the compiler's own source at commit 26de7be8.

Syntax

type NodeLike = ReadonlyNode<any> | number;

Description

Reading takes the ReadonlyNode supertype, so a Let(), parameter or constant operand is accepted everywhere a value is consumed; only .assign() needs the mutable Node subtype.

See also

Source

src/core/ir/node.ts, line 58, at commit 26de7be8

Edit this page Report a problem