FragmentDeclares
이 페이지에서

FragmentDeclares

인터페이스, 출력 분류

프래그먼트가 합성되어 들어가는 프로그램에서 선언하는 내용입니다. 합성기가 호스트 prelude를 대조하는 매니페스트입니다.

import type { FragmentDeclares } from 'typeshade'

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

구문

interface FragmentDeclares {
readonly functions: readonly string[];
readonly structs: readonly string[];
readonly bindings: readonly string[];
readonly consts: readonly string[];
readonly overrides: readonly string[];
readonly entryPoints: readonly string[];
}

설명

이름은 생성된 표기 그대로입니다. 그래서 호스트와 실제로 충돌하는 것이 바로 이 이름입니다.

인스턴스 속성

functions읽기 전용 readonly string[]

프래그먼트에서 정의하는 헬퍼 함수이다(진입점은 따로 나열합니다).

structs읽기 전용 readonly string[]

일반 struct 타입입니다. 유니폼 또는 스토리지 바인딩으로 쓰이는 struct는 블록으로 생성되므로, 그 이름은 대신 bindings 아래에 나타납니다.

bindings읽기 전용 readonly string[]

프래그먼트가 선언하는 리소스 바인딩을 바인딩 이름별로 나열합니다.

consts읽기 전용 readonly string[]

모듈 상수입니다.

overrides읽기 전용 readonly string[]

파이프라인 특수화 상수이다(overrideConst).

entryPoints읽기 전용 readonly string[]

스테이지 진입점입니다. 생성되었는지와 관계없이 모두 나열되므로, 선언만 요청한 합성기도 어떤 항목을 제외했는지 알 수 있습니다.

소스

src/core/fragment.ts, 29행, 커밋 af54ddad5 기준

이 페이지 편집 문제 보고