Skip to main content

XpmInitTemplatePropertiesDefinition interface

Defines an xpm init single template property.

Signature

export interface XpmInitTemplatePropertiesDefinition

Remarks

Property definitions control how users are prompted for template configuration values during xpm init execution.

Property types:

  • select: Present a list of options for the user to choose from. Requires items to be populated with available choices.
  • string: Accept free-form text input from the user.
  • number: Accept numeric input with validation.
  • boolean: Accept yes/no input (true/false).

Platform filtering: For select types, items can specify platform constraints via XpmInitTemplateItemValue, hiding options that don't match the current platform. This enables platform-specific configuration without manual filtering.

Mandatory properties without defaults will block template initialization until the user provides a value. Optional properties with defaults use the default when the user skips the prompt.

Properties

Property

Modifiers

Type

Description

default?

string | number | boolean

(Optional) The default value for the property. Must match the property type.

description

string

The description shown when the user requests help.

isMandatory?

boolean

(Optional) Indicates whether the property is mandatory; defaults to false.

items?

XpmInitTemplateItems

(Optional) The selectable items for a select property.

label

string

The human-readable label used in prompts.

type

XpmInitTemplateType

The property value type.


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