mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(core): sdkVersion and osVersion type adjustments (#10269)
- 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
This commit is contained in:
8
packages/core/platform/index.d.ts
vendored
8
packages/core/platform/index.d.ts
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user