Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openUrl types are not correct #208

Open
citrocitrusyolo opened this issue Feb 15, 2024 · 0 comments
Open

openUrl types are not correct #208

citrocitrusyolo opened this issue Feb 15, 2024 · 0 comments

Comments

@citrocitrusyolo
Copy link

citrocitrusyolo commented Feb 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant