Skip to content

PromptScript API


Class: BrowserCompiler

Defined in: browser-compiler/src/compiler.ts:131

Browser-compatible compiler for PromptScript.

Constructors

Constructor

new BrowserCompiler(options): BrowserCompiler

Defined in: browser-compiler/src/compiler.ts:139

Parameters

options

BrowserCompilerOptions

Returns

BrowserCompiler

Methods

clearCache()

clearCache(): void

Defined in: browser-compiler/src/compiler.ts:309

Clear the resolution cache.

Returns

void


compile()

compile(entryPath): Promise\<CompileResult>

Defined in: browser-compiler/src/compiler.ts:168

Compile a PromptScript file through the full pipeline.

Parameters

entryPath

string

Path to the entry file in the virtual file system

Returns

Promise\<CompileResult>

Compilation result with outputs, errors, and stats


getFormatters()

getFormatters(): readonly Formatter[]

Defined in: browser-compiler/src/compiler.ts:302

Get the configured formatters.

Returns

readonly Formatter[]