ConstExprDecl
인터페이스, 작성 분류
What constExpr returns: the ConstDecl itself, so it drops straight into module, carrying node, the typed reference to read the constant through at call sites.
import type { ConstExprDecl } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
interface ConstExprDecl<T extends ShaderType> extends ConstDecl { readonly node: ReadonlyNode<KeyOf<T>>;}설명
Reading through .node is what makes a rename or a retype of the constant a
tsc error rather than a constRef('NAME', someType) string that agrees with nothing.
node is non-enumerable: the declaration is spread, compared and serialized on its way to
the emitted module, and it stays exactly the object it was.
인스턴스 속성
node읽기 전용ReadonlyNode<KeyOf<T>>The typed reference to read the constant through at call sites.
함께 보기
소스
src/core/ir/builder.ts, 1338행, 커밋 c66579bf 기준