fix: add type annotation

This commit is contained in:
tigerenwork 2026-02-03 11:42:38 +08:00
parent f006552ac1
commit 445d7122aa
1 changed files with 2 additions and 2 deletions

View File

@ -71,13 +71,13 @@ export function CodeBlock({ code, type, showLineNumbers = true }: CodeBlockProps
<div className="flex">
{/* Line numbers column */}
<div className="flex flex-col text-slate-500 text-right pr-4 select-none min-w-[3rem]">
{lines.map((_, i) => (
{lines.map((_: string, i: number) => (
<span key={i}>{i + 1}</span>
))}
</div>
{/* Code column */}
<div className="flex flex-col">
{highlightedLines.map((line, i) => (
{highlightedLines.map((line: string, i: number) => (
<span
key={i}
className="text-slate-100 whitespace-pre"