UNPKG

@lynx-js/types

Version:

@lynx-js/types is a type package of all public APIs officially provided by the Lynx team. Using this package can help you better use Lynx APIs to develop your applications.

64 lines (52 loc) 1.34 kB
// Copyright 2024 The Lynx Authors. All rights reserved. // Licensed under the Apache License Version 2.0 that can be found in the // LICENSE file in the root directory of this source tree. /** * use 'windows' and 'macOS' instead of 'pc' since 3.3 */ export type PlatformType = 'Android' | 'iOS' | 'Harmony' | 'windows' | 'macOS' | PCPlatform; /** * @deprecated use 'windows' and 'macOS' instead since 3.3 */ type PCPlatform = 'pc'; export interface SystemInfo { /** * The version of the Lynx Engine. * * @deprecated * @example '2.4', '2.10' */ readonly lynxSdkVersion: string; /** * The version of the Lynx Engine. * * @example '3.2' */ readonly engineVersion: string; /** * The current operating system version. */ readonly osVersion: string; /** * The physical pixel height of the real device. */ readonly pixelHeight: number; /** * The physical pixel width of the real device. */ readonly pixelWidth: number; /** * The physical pixel ratio of the real device. */ readonly pixelRatio: number; /** * The platform of the current device. */ readonly platform: PlatformType; /** * The JavaScript engine currently used. * @note Not available in lepus */ readonly runtimeType: 'v8' | 'jsc' | 'quickjs'; readonly theme?: object; }