openUrl types are not correct
citrocitrusyolo opened this issue · comments
David Currie commented
sample repro
const rules: RenderRules = {
link: (node, children, parent, styles, onLinkPress) => (
<Text
key={node.key}
style={styles.link}
// @ts-expect-error TS2554 the type is wrong on the package
onPress={() => openUrl(node.attributes.href, onLinkPress)}
>
{children}
</Text>
),
};
this appears to be due to
export function openUrl(url: string): void;
which to my understanding is https://github.com/iamacup/react-native-markdown-display/blob/master/src/lib/util/openUrl.js