---
title: "Values, a category in the TypeShade API reference"
description: "Values in the TypeShade API reference. Literals, typed references and the constructors that turn a JavaScript value into a node."
url: https://typeshade.dev/api/values/
language: en
---

# Values

15 members

Literals, typed references and the constructors that turn a JavaScript value into a node.

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

**[`arrayLit`](https://typeshade.dev/api/arraylit/) Function**

A fixed-length array literal, `array<elemKey, N>`(...).

**[`bindingRef`](https://typeshade.dev/api/bindingref/) Function**

A module-level binding reference.

**[`bool`](https://typeshade.dev/api/bool/) Function**

A bool literal node, the condition type for .select(), `select()` and control flow (If, While).

**[`constRef`](https://typeshade.dev/api/constref/) Function**

A reference to a module-level constant by name, such as one declared with constExpr.

**[`construct`](https://typeshade.dev/api/construct/) Function**

Low-level TypeName(args) constructor call, the primitive that `vec2`, `vec3`, `vec2f64` and a struct's .construct({...}) all build on.

**[`enumU32`](https://typeshade.dev/api/enumu32/) Function**

Declare a `u32` enum from a name-to-value map: const Kind = enumU32.

**[`EnumU32`](https://typeshade.dev/api/enumu32-interface/) Interface**

A typed `u32` enum: a name-to-value map whose members are Node<'`u32`'> literals, plus the raw value map.

**[`externRef`](https://typeshade.dev/api/externref/) Function**

A read of a global the host provides, the read side of an externVar(...) declaration and the variable counterpart of an externFn call.

**[`f32`](https://typeshade.dev/api/f32/) Function**

An `f32` literal node.

**[`f64`](https://typeshade.dev/api/f64/) Function**

An `f64` literal node.

**[`i32`](https://typeshade.dev/api/i32/) Function**

An `i32` literal node.

**[`member`](https://typeshade.dev/api/member/) Function**

Low-level struct member access, base.name, with the field type given explicitly.

**[`overrideRef`](https://typeshade.dev/api/overrideref/) Function**

A read of a pipeline specialization constant, the read side of an overrideConst(...) declaration.

**[`param`](https://typeshade.dev/api/param/) Function**

A function parameter reference, with the key inferred from the ShaderType.

**[`u32`](https://typeshade.dev/api/u32/) Function**

A `u32` literal node.
