Skip to main content

XpmInitTemplateItemValue interface

Defines an xpm init template platform-specific item value.

Signature

export interface XpmInitTemplateItemValue

Remarks

Platform-specific items allow select properties to offer different options based on the user's operating system and architecture. Only items matching the current platform are shown to the user.

Example usage in property definition:

{
toolchain: {
label: 'Toolchain',
description: 'Select the toolchain to be used by the builds',
type: 'select',
items: {
gcc: {
// There is no gcc on macOS.
platforms: ['linux', 'win32'],
message: 'The xPack GNU Compiler Collection (GCC) toolchain'
},
clang: 'The xPack LLVM clang toolchain',
system: {
// There is no system toolchain on Windows.
platforms: ['linux', 'darwin'],
message: 'The system toolchain'
}
},
default: 'clang'
}
}

When running on Windows, only the "msvc" option appears. On Linux or macOS Intel, only "gcc-arm" appears.

Properties

Property

Modifiers

Type

Description

message

string

The description message for this item.

platforms

XpmInitTemplatePlatform[]

The list of supported platforms.


Generated via tsdoc2docusaurus 1.3.0-pre by API Extractor/Documenter 7.55.2.