UsesHandle
이 페이지에서

UsesHandle

타입, 작성 분류

module({ uses })가 받는 선언자 핸들입니다. 자체 선언이나 바인딩을 가진 값은 모두 여기에 해당합니다.

import type { UsesHandle } from 'typeshade'
import type { UsesHandle } from 'typeshade/core/ir'

설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.

구문

type UsesHandle =
| { readonly struct: StructDecl; readonly binding: BindingDecl }
| { readonly decl: StructDecl | ConstDecl }
| { readonly binding: BindingDecl; readonly elementDecl?: StructDecl };

설명

uniformStruct는 { struct, binding }을 반환합니다. ioStruct, structDecl, constDecl는 { decl }을 반환합니다. storageBuffer는 { binding }을 돌려주며, 구조체 요소이면 elementDecl도 함께 반환합니다. resource는 { binding }을 반환합니다.

함께 보기

소스

src/core/ir/builder.ts, 877행, 커밋 af54ddad5 기준

이 페이지 편집 문제 보고