Skip to content

Commit

Permalink
fix(core): sdkVersion and osVersion type adjustments (#10269)
Browse files Browse the repository at this point in the history
- These two return a number in Android (can't test iOS). Adding this fix would make expressions such as `Device.sdkVersion >= 23` possible without the need to add `@ts-ignore` before

- Updated JSDoc to reflect Android behavior
  • Loading branch information
guillemc23 committed Apr 17, 2023
1 parent 0a2f002 commit f8edee4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/platform/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ export interface IDevice {

/**
* Gets the OS version.
* For example: 4.4.4(android), 8.1(ios)
* For example: 12(android), 8.1(ios)
*/
osVersion: string;
osVersion: number | string;

/**
* Gets the SDK version.
* For example: 19(android), 8.1(ios).
* For example: 31(android), 8.1(ios).
*/
sdkVersion: string;
sdkVersion: number | string;

/**
* Gets the type of the current device.
Expand Down

0 comments on commit f8edee4

Please sign in to comment.