@@ -405,11 +405,12 @@ declare module '@theme/BlogLayout' {
405
405
406
406
declare module '@theme/CodeBlock' {
407
407
import type { ReactNode } from 'react' ;
408
+ import type { CodeBlockMeta } from '@docusaurus/theme-common' ;
408
409
409
410
export interface Props {
410
411
readonly children : ReactNode ;
411
412
readonly className ?: string ;
412
- readonly metastring ?: string ;
413
+ readonly metastring ?: string | CodeBlockMeta ;
413
414
readonly title ?: ReactNode ;
414
415
readonly language ?: string ;
415
416
readonly showLineNumbers ?: boolean | number ;
@@ -481,13 +482,26 @@ declare module '@theme/CodeBlock/Line' {
481
482
readonly line : Token [ ] ;
482
483
readonly classNames : string [ ] | undefined ;
483
484
readonly showLineNumbers : boolean ;
485
+ readonly meta ?: CodeBlockMeta ;
484
486
readonly getLineProps : ( input : LineInputProps ) => LineOutputProps ;
485
487
readonly getTokenProps : ( input : TokenInputProps ) => TokenOutputProps ;
486
488
}
487
489
488
490
export default function CodeBlockLine ( props : Props ) : ReactNode ;
489
491
}
490
492
493
+ declare module '@theme/CodeBlock/Token' {
494
+ import type { ReactNode } from 'react' ;
495
+ import type { TokenOutputProps } from 'prism-react-renderer' ;
496
+
497
+ export interface Props {
498
+ readonly output : TokenOutputProps ;
499
+ readonly meta ?: CodeBlockMeta ;
500
+ }
501
+
502
+ export default function CodeBlockToken ( props : Props ) : ReactNode ;
503
+ }
504
+
491
505
declare module '@theme/CodeBlock/WordWrapButton' {
492
506
import type { ReactNode } from 'react' ;
493
507
0 commit comments