ToothlessGear / node-gcm

A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
https://github.com/ToothlessGear/node-gcm
Other
1.3k stars 208 forks source link

`data` type appears wrong #338

Closed rex-remind101 closed 4 years ago

rex-remind101 commented 4 years ago

type for data is { [key: string]: string } https://github.com/DefinitelyTyped/DefinitelyTyped/blob/9fd18b7cf75676be256b04e754377cbd98663a2b/types/node-gcm/index.d.ts#L33

yet examples show something closer to { [key: string]: string | number | boolean | undefined } https://github.com/ToothlessGear/node-gcm#usage

Please fix the type so casting isn't required.

eladnava commented 4 years ago

Hi @rex-remind101, Thanks for the report. However, this needs to be changed in the DefinitelyTyped GitHub project.

Would you mind opening a PR in that Github project, for the DefinitelyTyped/types/node-gcm/index.d.ts file, with the changes you proposed?

Closing for now as it's not an issue with node-gcm itself.