Skip to content
TypeScript

fix(web): keep incremental highlighter return type portable (#17259)

luke2def3de4b931
diff --git a/apps/web/src/lib/incrementalHighlighting.ts b/apps/web/src/lib/incrementalHighlighting.ts
index fef3598a215..4124d858f15 100644
--- a/apps/web/src/lib/incrementalHighlighting.ts
+++ b/apps/web/src/lib/incrementalHighlighting.ts
@@ -18,7 +18,7 @@ export function createIncrementalHighlightedDocument(
highlighter: DiffsHighlighter,
language: string,
theme: DiffThemeName,
-) {
+): (code: string) => ReturnType<DiffsHighlighter["codeToHast"]> {
const options = { lang: language, theme };
const newline = { type: "text" as const, value: "\n" };
let cached: