---
title: "NodeLike: type in Types, TypeShade API reference"
description: "NodeLike, a 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."
url: https://typeshade.dev/api/nodelike/
language: en
---

# `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

```ts
type NodeLike = ReadonlyNode<any> | number;
```

## Description

Reading takes the [`ReadonlyNode`](https://typeshade.dev/api/readonlynode/) supertype, so a `Let()`, parameter or constant operand is accepted everywhere a value is consumed; only `.assign()` needs the mutable [`Node`](https://typeshade.dev/api/node/) subtype.

## See also

- [`ReadonlyNode`](https://typeshade.dev/api/readonlynode/)
- [`Node`](https://typeshade.dev/api/node/)

## Source

[`src/core/ir/node.ts`, line 49](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/node.ts#L49), at commit af54ddad5
