mirror of
https://github.com/bendtherules/react-to-markdown.git
synced 2026-08-18 13:53:11 +00:00
.ts - Fix tslint errors
This commit is contained in:
+5
-5
@@ -1,20 +1,20 @@
|
|||||||
import {
|
import {
|
||||||
|
ComponentClass,
|
||||||
ElementType,
|
ElementType,
|
||||||
FunctionComponent,
|
FunctionComponent,
|
||||||
ComponentClass,
|
|
||||||
PropsWithChildren,
|
PropsWithChildren,
|
||||||
ReactText
|
ReactText
|
||||||
} from "react";
|
} from "react";
|
||||||
|
|
||||||
export type ReactElementSubset<TProps = {}> = {
|
export interface IReactElementSubset<TProps = {}> {
|
||||||
props: PropsWithChildren<TProps>;
|
props: PropsWithChildren<TProps>;
|
||||||
type: ElementType<TProps>;
|
type: ElementType<TProps>;
|
||||||
};
|
}
|
||||||
|
|
||||||
export type ReactElementSubsetWithPrimitive =
|
export type ReactElementSubsetWithPrimitive =
|
||||||
| ReactElementSubset
|
| IReactElementSubset
|
||||||
| ReactText
|
| ReactText
|
||||||
| Array<ReactElementSubsetWithPrimitive>
|
| ReactElementSubsetWithPrimitive[]
|
||||||
| null
|
| null
|
||||||
| undefined;
|
| undefined;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -2,6 +2,7 @@ import { root, text } from "mdast-builder";
|
|||||||
import { Children as ReactChildren } from "react";
|
import { Children as ReactChildren } from "react";
|
||||||
import * as stringify from "remark-stringify";
|
import * as stringify from "remark-stringify";
|
||||||
import * as unified from "unified";
|
import * as unified from "unified";
|
||||||
|
// tslint:disable-next-line: no-implicit-dependencies
|
||||||
import { Parent as MDASTParent } from "unist";
|
import { Parent as MDASTParent } from "unist";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -56,12 +57,11 @@ function render(
|
|||||||
|
|
||||||
// Render processed array of children
|
// Render processed array of children
|
||||||
render(renderOutput, parentASTNodeMod);
|
render(renderOutput, parentASTNodeMod);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Handle intrinsic types of element like div, h1
|
|
||||||
{
|
{
|
||||||
|
// Handle intrinsic types of element like div, h1
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user