Skip to content

Commit e8e98df

Browse files
committed
fix children typing on MarkdownStatic
1 parent c2f044c commit e8e98df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// tslint:disable:max-classes-per-file
22
import MarkdownIt from 'markdown-it';
33
import Token from 'markdown-it/lib/token';
4-
import {ComponentType, ReactNode} from 'react';
4+
import {ComponentType, PropsWithChildren, ReactNode} from 'react';
55
import {StyleSheet, View} from 'react-native';
66

77
export function getUniqueID(): string;
@@ -91,7 +91,7 @@ export interface MarkdownProps {
9191
onLinkPress?: (url: string) => boolean;
9292
}
9393

94-
type MarkdownStatic = ComponentType<MarkdownProps>;
94+
type MarkdownStatic = ComponentType<PropsWithChildren<MarkdownProps>>;
9595
export const Markdown: MarkdownStatic;
9696
export type Markdown = MarkdownStatic;
9797
export {MarkdownIt};

0 commit comments

Comments
 (0)