Skip to content

API Reference


Interface: PositionalParam

Defined in: docs-entry.ts:223

A positional parameter for a task. Positional parameters are passed in order without flags on the CLI.

Example

typescript
task("copy")
  .params({
    source: { type: "string", isPositional: true },
    dest: { type: "string", isPositional: true }
  })
// CLI: ice run copy ./src ./dest

Extends

Properties

default?

optional default: unknown

Defined in: docs-entry.ts:177

Default value if not provided.

Inherited from

TaskParam.default


description?

optional description: string

Defined in: docs-entry.ts:175

Human-readable description for help text.

Inherited from

TaskParam.description


isFlag

isFlag: false

Defined in: docs-entry.ts:225

Always false for positional parameters.


isOptional

isOptional: boolean

Defined in: docs-entry.ts:179

Whether this parameter is optional.

Inherited from

TaskParam.isOptional


isVariadic

isVariadic: boolean

Defined in: docs-entry.ts:181

Whether this parameter accepts multiple values.

Inherited from

TaskParam.isVariadic


name

name: string

Defined in: docs-entry.ts:173

The parameter name (used in CLI as --name or positionally).

Inherited from

TaskParam.name


type

type: object | BuiltInTaskType

Defined in: docs-entry.ts:171

The type or schema for validation and parsing.

Inherited from

TaskParam.type