npm.io
3.0.4 • Published 2 years ago

@types/react-katex

Licence
MIT
Version
3.0.4
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/react-katex

Summary

This package contains type definitions for react-katex (https://github.com/talyssonoc/react-katex).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-katex.

index.d.ts

import * as React from "react";

export type ErrorRenderer = (error: Error) => React.ReactNode;

export interface MathComponentPropsWithMath {
    math: string;
    errorColor?: string;
    renderError?: ErrorRenderer;
}

export interface MathComponentPropsWithChildren {
    children: React.ReactNode;
    errorColor?: string;
    renderError?: ErrorRenderer;
}

export type MathComponentProps = MathComponentPropsWithMath | MathComponentPropsWithChildren;

export function BlockMath(props: MathComponentProps): React.JSX.Element;

export function InlineMath(props: MathComponentProps): React.JSX.Element;

Additional Details

  • Last updated: Mon, 04 Dec 2023 2043 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Geoffrey Tang.