From c4437ea2b0ab91cd5e2a19a3042c177ba112bd36 Mon Sep 17 00:00:00 2001 From: Myriad-Dreamin Date: Thu, 28 Sep 2023 15:23:29 +0800 Subject: [PATCH] dev(compiler): add a `CompileFormat` type --- packages/typst.ts/src/compiler.mts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/typst.ts/src/compiler.mts b/packages/typst.ts/src/compiler.mts index 73731141..f7b22c6f 100644 --- a/packages/typst.ts/src/compiler.mts +++ b/packages/typst.ts/src/compiler.mts @@ -6,6 +6,11 @@ import { FsAccessModel } from './internal.types.mjs'; import { preloadRemoteFonts, type InitOptions } from './options.init.mjs'; import { LazyWasmModule } from './wasm.mjs'; +/** + * Available formats for compiling the document. + */ +export type CompileFormat = 'vector' | 'pdf'; + /** * The options for compiling the document. */ @@ -20,7 +25,7 @@ export interface CompileOptions { * - 'pdf': for finally exporting pdf to the user. * @default 'vector' */ - format?: 'vector' | 'pdf'; + format?: CompileFormat; } /**