From 4a46521731a62e6b151c66bd9c66b7a63fcd9201 Mon Sep 17 00:00:00 2001 From: guillemc23 Date: Sun, 16 Apr 2023 19:07:41 +0200 Subject: [PATCH 1/2] Fixed types 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 --- packages/core/platform/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/platform/index.d.ts b/packages/core/platform/index.d.ts index ceac382ce7..af49818717 100644 --- a/packages/core/platform/index.d.ts +++ b/packages/core/platform/index.d.ts @@ -48,13 +48,13 @@ export interface IDevice { * Gets the OS version. * For example: 4.4.4(android), 8.1(ios) */ - osVersion: string; + osVersion: number | string; /** * Gets the SDK version. * For example: 19(android), 8.1(ios). */ - sdkVersion: string; + sdkVersion: number | string; /** * Gets the type of the current device. From 4cfc742dcc44f122e8bc611dbb94218b7671ac71 Mon Sep 17 00:00:00 2001 From: guillemc23 Date: Sun, 16 Apr 2023 19:11:54 +0200 Subject: [PATCH 2/2] Updated JSDoc Updated JSDoc to reflect Android behavior --- packages/core/platform/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/platform/index.d.ts b/packages/core/platform/index.d.ts index af49818717..1221baa10c 100644 --- a/packages/core/platform/index.d.ts +++ b/packages/core/platform/index.d.ts @@ -46,13 +46,13 @@ export interface IDevice { /** * Gets the OS version. - * For example: 4.4.4(android), 8.1(ios) + * For example: 12(android), 8.1(ios) */ osVersion: number | string; /** * Gets the SDK version. - * For example: 19(android), 8.1(ios). + * For example: 31(android), 8.1(ios). */ sdkVersion: number | string;