Skip to content

Commit

Permalink
dev(pkg::core): update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Nov 1, 2023
1 parent 14ce24d commit 6c06441
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/typst.ts/src/contrib/snippet.mts
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,17 @@ const isNode =
* Create an instance of utility:
*
* ```typescript
* // optional renderer instance
* const renderer = enableRendering ?? (() => {
* return createGlobalRenderer(createTypstRenderer, pdfJsLib, initOptions);
* const $typst = new TypstSnippet({
* // optional renderer instance
* renderer: enableRendering ?? (() => {
* return createGlobalRenderer(createTypstRenderer,
* undefined, initOptions);
* }),
* compiler() => {
* return createGlobalCompiler(createTypstCompiler,
* initOptions);
* }
* });
* const $typst = new TypstSnippet(() => {
* return createGlobalCompiler(createTypstCompiler, initOptions);
* }, renderer);
* ```
*/
export class TypstSnippet {
Expand Down

0 comments on commit 6c06441

Please sign in to comment.