HostFace
인터페이스, 편집기 분류
셰이더 모듈 하나의 호스트 인터페이스(host face)입니다.
import type { HostFace } from 'typeshade/language-service'
설명은 커밋 af54ddad5의 검토된 컴파일러 문서를 번역한 것입니다. 시그니처와 예제 코드는 원문을 따르며, 필요한 경우 설명에 편집상 수정이 반영됩니다.
구문
interface HostFace { readonly diagnostics: readonly TsCompilerDiagnostic[]; readonly exports?: readonly HostExport[]; readonly view?: string; readonly code?: string; readonly files: readonly string[];}인스턴스 속성
diagnostics읽기 전용readonly TsCompilerDiagnostic[]모듈 자체의 진단입니다. 그중 하나라도 오류이면 모듈은 컴파일되지 않고
exports,view,code가 없습니다. 이때 빌드는 이 진단을 내며 실패합니다.exports선택 사항읽기 전용readonly HostExport[]view선택 사항읽기 전용string호스트 뷰의 텍스트입니다.
code선택 사항읽기 전용string생성 모듈의 JavaScript입니다.
files읽기 전용readonly string[]컴파일이 읽은 모든 파일로, 모듈 자신이 맨 앞에 옵니다. 번들러가 감시하는 목록이라서, 모듈이 가져오는 파일을 고치면 모듈이 다시 빌드됩니다.
소스
src/compiler/ts/host-face/contracts.ts, 40행, 커밋 af54ddad5 기준