tschoffelen / react-native-email-link

📭 Open an email client from React Native (for 'magic link' type functionality).
MIT License
409 stars 74 forks source link

exporting EmailException #42

Closed cesar3030 closed 5 years ago

cesar3030 commented 5 years ago

EmailException class was exported in the TS file but not in the JS file so it was not possible to do such thing:

if (err instanceof EmailException) {
 ...
}
tschoffelen commented 5 years ago

Oh, good point. Do we need to add the same for the index.android.js file?

cesar3030 commented 5 years ago

I'll do some tests next week and comeback to you regarding if we need to add it to index.android.js

cesar3030 commented 5 years ago

I created a new class in a src folder that holds the code of EmailException to avoid having to redefine it in android.index.js. I import and exportEmailException in both index files to be able to use it in the index file but also to make it available to developers who wants to use it in there code to do a if (err instanceof EmailException) { ... }

Tell me if you prefer not to have a src/ and have the email-exception.js file in the root folder.

tschoffelen commented 5 years ago

Looks great!

tschoffelen commented 5 years ago

Released as react-native-email-link@1.6.4.