arrayLit
이 페이지에서

arrayLit()

함수, 값 분류

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

import { arrayLit } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

const arrayLit: <E extends ShaderType, const I extends readonly ReadonlyNode[]>(
elem: E,
...items: I,
) => Node<`array<${KeyOf<E>},${I["length"]}>`>

매개변수

elem E extends ShaderType
...items I extends readonly ReadonlyNode[]

반환값

Node<`array<${KeyOf<E>},${I['length']}>`>

설명

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.

관련 가이드

함께 보기

소스

src/core/ir/node.ts, 2760행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고