平台

此接口提供关于应用正在运行的操作系统或运行时平台的信息。

类型

type PlatformType = 'web' | 'ios' | 'android' | 'windows';

方法

// Returns the platform type
getType(): Types.PlatformType;

// Returns the value in `specifics` for the current platform type.
select<T>(specifics: { [ platform in Types.PlatformType | 'default' ]?: T }): T | undefined;