Skip to content

Commit 192b0eb

Browse files
authored
Merge pull request #198 from MilanBarande/master
fix children typing on MarkdownStatic
2 parents c2f044c + e8e98df commit 192b0eb

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)