joshswan / react-native-autolink

Automatic linking of URLs, phone numbers, emails, handles, and even custom patterns in text for React Native
MIT License
656 stars 82 forks source link

Import React in Typescript typing #42

Closed JonnyBurger closed 4 years ago

JonnyBurger commented 4 years ago

Thank you for adding Typescript types in the last version!

I got the following error:

node_modules/react-native-autolink/src/index.d.ts:26:39 - error TS2686: 'React' refers to a UMD global, but the current file is a module. Consider adding an import instead.

26 export default class Autolink extends React.PureComponent<AutolinkProps> {

I fixed it by adding import React from 'react' at the top of the TS definition.

CC @mo22, maybe you also can give his thumbs up on this PR.

mo22 commented 4 years ago

Thumbs up!

joshswan commented 4 years ago

👍 Just released v1.9.1