hms-react-native-plugin
hms-react-native-plugin copied to clipboard
Unhelpful Typescript type definitions
You provide typescript type declaration files(.d.ts
) for your modules. They are however very poorly typed - specifying the return type as any generic Object
, or the accepted argument as any generic Function
. There are also type definitions for your libraries made by the community, and they represent the api more accurately. You can compare these two here:
https://github.com/HMS-Core/hms-react-native-plugin/blob/master/react-native-hms-push/src/index.d.ts#L34 https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/hmscore__react-native-hms-push/index.d.ts#L47
Right now, I will have to configure my tsconfig to ignore your types and use the community typings. I would like this to not be the case however 🥺.
Types are awful 😞