編譯器

建立同步編譯器的結果。由 initCompiler 返回。

階層

  • 編譯器

建構函式

方法

建構函式

方法

  • Compiler 實例處於活動狀態時,透過它公開的 compile 方法。如果在 Compiler 實例上呼叫 dispose 之後呼叫此方法,則會拋出錯誤。

    在 Compiler 實例的生命週期內,給定相同的輸入,此方法將返回與模組根目錄公開的 compile 方法相同的結果。

    參數

    • path: string
    • 選選項 options: Options<"sync">

    返回 CompileResult

  • 結束此 Compiler 實例的生命週期。呼叫此方法後,所有對 Compiler 實例的 compilecompileString 方法的呼叫都將導致錯誤。

    返回 無 (void)