compileTsSource
이 페이지에서

compileTsSource()

함수, 작성 분류

Compile a TypeScript source string through the TypeShade authoring pipeline.

import { compileTsSource } from 'typeshade'

시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

구문

function compileTsSource(
source: string,
options: CompileTsSourceOptions = {},
): CompileTsSourceResult

매개변수

source string
options선택 사항 CompileTsSourceOptions

반환값

CompileTsSourceResult

설명

A source without the "use typeshade" directive returns hasDirective: false, no functions and one MISSING_DIRECTIVE error (unless options.requireDirective is false). wgsl is present only when the file lowered at least one function with no error diagnostic and options.emit is not false; a backend that throws on such a module is reported as a BACKEND error diagnostic and leaves wgsl undefined.

소스

src/compiler/ts/source-file.ts, 189행, 커밋 c66579bf 기준

이 페이지 편집 문제 보고