mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-02-12 03:42:46 +00:00
* [rehype-react] Add Fragment option Usually this will be `React.Fragment`, but it accepts any component. * [rehype-react] Update which options are optional Most options have healthy defaults. Only `createElement` is required. * [rehype-react] Update version number * [rehype-react] Update tests to include Fragment option
24 lines
645 B
TypeScript
24 lines
645 B
TypeScript
// Type definitions for rehype-react 4.0
|
|
// Project: https://github.com/rhysd/rehype-react
|
|
// Definitions by: Adrian Kremer <https://github.com/adriankremer>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.8
|
|
|
|
import * as React from "react";
|
|
|
|
interface Options {
|
|
createElement: typeof React.createElement;
|
|
Fragment?: React.ComponentType<{ children?: React.ReactNode }>;
|
|
components?: {
|
|
[tagName: string]: React.ComponentType<any>;
|
|
};
|
|
prefix?: string;
|
|
}
|
|
|
|
declare class RehypeReact {
|
|
constructor(options: Options)
|
|
Compiler: (node: any) => any;
|
|
}
|
|
|
|
export = RehypeReact;
|