amplitude / amplitude/Amplitude-ReactNative

Invalid TS return type for `getDeviceId()`

Open
#121 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
87
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Hi,

While browsing the docs, I encounter the following sentence:

> You can retrieve the Device ID that Amplitude uses with Amplitude.getInstance().getDeviceId(). This method can return null if a Device ID has not been generated yet.

However, the types list it as returning a string: https://github.com/amplitude/Amplitude-ReactNative/blob/183a6b0669abe651bf47b08833a2e4d3c0a64552/src/types.ts#L27

Shouldn't this be changed to `getDeviceId(instanceName: string): Promise;`?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.