ts-reset icon indicating copy to clipboard operation
ts-reset copied to clipboard

Feature request - add support for react-native

Open BenLorantfy opened this issue 2 years ago • 5 comments

This library is a great idea 💡

I just tried to use it, but realized it's not going to work for my react-native project because react-native ships their own typings: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-native/v0.70/globals.d.ts#L41

Do you think it would be possible to also over-ride / reset @types/react-native ?

BenLorantfy avatar Feb 20 '23 15:02 BenLorantfy

Might be worth testing, looks like it might actually work fine given that the Response interface is the same?

mattpocock avatar Feb 20 '23 15:02 mattpocock

Seems like it's detecting both but using @types/react-native for some reason:

Screen Shot 2023-02-20 at 11 11 59 AM

BenLorantfy avatar Feb 20 '23 16:02 BenLorantfy

Cool, this is probably some extra work but definitely in scope for this lib. Will investigate!

mattpocock avatar Feb 20 '23 16:02 mattpocock

For Response specifically it may be worth getting this changed on the React Native side. I don't understand why they're including their own one here 🤔

tom-sherman avatar Feb 21 '23 08:02 tom-sherman

FWIW, I believe newer versions of RN (0.71+ I think) no longer rely on the @types package, instead shipping types directly from react-native.

nandorojo avatar Feb 21 '23 18:02 nandorojo