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'
import type { NodeLike } from 'typeshade/core/ir'

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

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 49, at commit af54ddad5

Edit this page Report a problem