PackOptions
인터페이스, 리플렉션 분류
Everything packModule() adds on request.
import type { PackOptions } from 'typeshade'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
interface PackOptions { readonly console?: boolean; readonly ir?: boolean; readonly emit?: EmitOptions & { readonly level?: OptLevel };}인스턴스 속성
console선택 사항읽기 전용booleanAdd the recorded variant,
console: the WGSL that records theconsole.*calls.ir선택 사항읽기 전용booleanAdd the program as portable IR,
ir, which the load-time emitter (typeshade/emit) emits again without the front end. About three times the WGSL gzipped, so on request only.emit선택 사항읽기 전용EmitOptions & { readonly level?: OptLevel }Emit the program under other options than the defaults: the WGSL writer’s own (
EmitOptions:parens,fp64Flavorandplugins) and an optimizationlevel,'O0','O1'or'O2'(the default;OptLevelsays what each runs). The manifest’swgsl, its recorded variant’swgsl, itsglsl(the WebGL2 tier’s programs included) and itsbindingsare the ones those options emit:fp64Flavorchanges the bindings too, since the'float'flavor binds the_fp64guard and the'integer'one binds none.parens,fp64Flavorandpluginsreach the GLSL as they reach the WGSL;levelis the WGSL’s alone, since the GLSL writer has no level and writes its own optimized program. The manifest recordslevel,parensandfp64Flavorin itsemit, which the load-time emitter emits the program again under. A plugin is a function, which a manifest cannot record, soir: truewith a plugin is aTypeError: the load-time emitter could not emit the program again. A word an option does not take is aTypeErrortoo.
함께 보기
소스
src/core/manifest.ts, 70행, 커밋 c66579bf 기준