Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

index file name discrepancy in react-native-library

$
0
0

I have a react-native library. I am exporting methods in this library as below.

index.ts

...code...const MyHealthLibrary: iosHealthkit = {  requestAuthorization: NotSupportedMethod,  getHealthData: NotSupportedMethod}export * from './types';export * from './authTypes';export default MyHealthLibrary;

index.ios.ts

...code...const MyHealthLibrary: iosHealthkit = {  requestAuthorization,  getHealthData}export * from './types';export * from './authTypes';export default MyHealthLibrary;

Now the above code works as expected.
Now as soon as i rename "index.ios.ts" to "index.healthkit.ts" or "index.healthdata.ts" i get error. The library doesn't function as expected.
What does the file name have to do with anything??? Any help would be great


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>