@mui/internal-docs-infra
Version:
MUI Infra - internal documentation creation tools.
17 lines • 846 B
TypeScript
import * as React from 'react';
import { Code, ControlledCode } from "./types.js";
import { Selection } from "../CodeControllerContext/index.js";
export interface CodeHighlighterContextType {
code?: Code;
setCode?: React.Dispatch<React.SetStateAction<ControlledCode | undefined>>;
selection?: Selection;
setSelection?: React.Dispatch<React.SetStateAction<Selection>>;
components?: Record<string, React.ReactNode>;
availableTransforms?: string[];
url?: string;
deferHighlight?: boolean;
setErrors?: React.Dispatch<React.SetStateAction<Error[]>>;
}
export declare const CodeHighlighterContext: React.Context<CodeHighlighterContextType | undefined>;
export declare function useCodeHighlighterContext(): CodeHighlighterContextType;
export declare function useCodeHighlighterContextOptional(): CodeHighlighterContextType | undefined;