mkuczera / react-native-haptic-feedback

React-Native Haptic Feedback for iOS with Android similar behaviour.
MIT License
868 stars 106 forks source link

Export feedback types type #60

Closed pvinis closed 3 years ago

mrousavy commented 3 years ago

The HapticFeedbackTypes union type is already exported because of the declare module.

pvinis commented 3 years ago

I'm not sure if that works. I couldn't access the type without exporting it manually.

woodrufs commented 3 years ago

I second @mrousavy that these are already exported. @pvinis, you do not need to export the type from a declaration file. I have imported the type in a project of mine without issues like so:

import Haptic, { HapticFeedbackTypes } from "react-native-haptic-feedback";
mkuczera commented 3 years ago

Closing due to invalid.

pvinis commented 2 years ago

I dont get how this works. It definitely did not work before for me, it works today, but this feels like a thing that TS might make it so it doesn't work again. https://github.com/junina-de/react-native-haptic-feedback/blob/master/index.d.ts#L2 looking at the docs, everything that hsould be exported is expored explicitly.