Skip to content

Commit 299953b

Browse files
fix: 修复 cliHighlight 类型不兼容问题
loadedGetLanguage 返回类型中 name 字段改为可选,匹配 highlight.js Language 类型中 name 为 string | undefined 的定义。 Co-Authored-By: Claude Opus 4.7 <[email protected]>
1 parent 7a3fdf6 commit 299953b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/utils/cliHighlight.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export type CliHighlight = {
1717
// One promise shared by Fallback.tsx, markdown.ts, events.ts, getLanguageName.
1818
let cliHighlightPromise: Promise<CliHighlight | null> | undefined
1919

20-
let loadedGetLanguage: ((name: string) => { name: string } | undefined) | undefined
20+
let loadedGetLanguage: ((name: string) => { name?: string } | undefined) | undefined
2121

2222
async function loadCliHighlight(): Promise<CliHighlight | null> {
2323
try {

0 commit comments

Comments
 (0)