Added a ton of JS Doc

This commit is contained in:
Zef Hemel
2024-08-07 13:27:25 +02:00
parent e29352556b
commit cafd001214
27 changed files with 612 additions and 197 deletions
+10 -1
View File
@@ -1,6 +1,13 @@
import type { CodeWidgetContent } from "../types.ts";
import { syscall } from "../syscall.ts";
/**
* Renders a code widget.
* @param lang the language of the fenced code block
* @param body the body of the code to render
* @param pageName the name of the page the code widget appears on
* @returns the rendered code widget content
*/
export function render(
lang: string,
body: string,
@@ -9,7 +16,9 @@ export function render(
return syscall("codeWidget.render", lang, body, pageName);
}
// Refresh all code widgets on the page that support it
/**
* Refreshes all code widgets on the page that support it.
*/
export function refreshAll(): Promise<void> {
return syscall("codeWidget.refreshAll");
}