mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-19 06:45:50 +00:00
fix: 修复 cliHighlight 类型不兼容问题
loadedGetLanguage 返回类型中 name 字段改为可选,匹配 highlight.js Language 类型中 name 为 string | undefined 的定义。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ export type CliHighlight = {
|
|||||||
// One promise shared by Fallback.tsx, markdown.ts, events.ts, getLanguageName.
|
// One promise shared by Fallback.tsx, markdown.ts, events.ts, getLanguageName.
|
||||||
let cliHighlightPromise: Promise<CliHighlight | null> | undefined
|
let cliHighlightPromise: Promise<CliHighlight | null> | undefined
|
||||||
|
|
||||||
let loadedGetLanguage: ((name: string) => { name: string } | undefined) | undefined
|
let loadedGetLanguage: ((name: string) => { name?: string } | undefined) | undefined
|
||||||
|
|
||||||
async function loadCliHighlight(): Promise<CliHighlight | null> {
|
async function loadCliHighlight(): Promise<CliHighlight | null> {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user