arrayLit()
Function in Values
A fixed-length array literal, array<elemKey, N>(...).
import { arrayLit } from 'typeshade'
The signature, the description and the examples come from the compiler's own source at commit 26de7be8.
Syntax
const arrayLit: <E extends ShaderType, const I extends readonly ReadonlyNode[]>( elem: E, ...items: I,) => Node<`array<${KeyOf<E>},${I["length"]}>`>Parameters
elemE extends ShaderType...itemsI extends readonly ReadonlyNode[]
Return value
Description
The result key carries the element
key and the item count, so arrayLit(f32T, a, b, c) is Node<'array<f32,3>'>, the key
typeKey produces for its runtime type.
In the guide
See also
Source
src/core/ir/node.ts, line 2760, at commit 26de7be8