From 2463877e0f1013f5589aa0d5c62a4066bd0c7c81 Mon Sep 17 00:00:00 2001 From: bendtherules Date: Sun, 15 Dec 2019 16:36:11 +0530 Subject: [PATCH] .ts - Fix tslint errors --- src/helpers.ts | 10 +++++----- src/renderer.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/helpers.ts b/src/helpers.ts index 919cef7..f4b9f8a 100644 --- a/src/helpers.ts +++ b/src/helpers.ts @@ -1,20 +1,20 @@ import { + ComponentClass, ElementType, FunctionComponent, - ComponentClass, PropsWithChildren, ReactText } from "react"; -export type ReactElementSubset = { +export interface IReactElementSubset { props: PropsWithChildren; type: ElementType; -}; +} export type ReactElementSubsetWithPrimitive = - | ReactElementSubset + | IReactElementSubset | ReactText - | Array + | ReactElementSubsetWithPrimitive[] | null | undefined; diff --git a/src/renderer.ts b/src/renderer.ts index ea32cb4..fa643e5 100644 --- a/src/renderer.ts +++ b/src/renderer.ts @@ -2,6 +2,7 @@ import { root, text } from "mdast-builder"; import { Children as ReactChildren } from "react"; import * as stringify from "remark-stringify"; import * as unified from "unified"; +// tslint:disable-next-line: no-implicit-dependencies import { Parent as MDASTParent } from "unist"; import { @@ -56,12 +57,11 @@ function render( // Render processed array of children render(renderOutput, parentASTNodeMod); - } } - // Handle intrinsic types of element like div, h1 { + // Handle intrinsic types of element like div, h1 } {