Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhelpful Typescript type definitions #290

Open
Akatroj opened this issue Aug 23, 2023 · 1 comment
Open

Unhelpful Typescript type definitions #290

Akatroj opened this issue Aug 23, 2023 · 1 comment

Comments

@Akatroj
Copy link

Akatroj commented Aug 23, 2023

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 🥺.

@AlexeyNovikov
Copy link

Types are awful 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants