crouter
PluginReference

Parameters

Declaring the flags, positionals and stdin input a leaf accepts.

Exports of @north-light/crouter-plugin, read from the TypeScript compiler at build time. Types re-exported from @north-light/crouter-api are documented with that package.

AnyParam

type declared in params.ts

Any parameter descriptor a param.* builder returns.

FlagBoolParam<boolean> | FlagEnumParam<string, boolean, boolean> | FlagIntParam<boolean, boolean> | FlagPathParam<boolean, Encoding> | FlagStringParam<boolean, boolean> | PositionalParam<boolean, boolean> | StdinParam<boolean>

Encoding

type declared in params.ts

How param.path hands the caller's file to the handler.

"base64" | "text"

FlagBoolParam

interface declared in params.ts

A boolean flag, as returned by param.bool. Never repeatable.

Prop

Type

FlagEnumParam

interface declared in params.ts

A flag restricted to a fixed set of values, as returned by param.enum.

Prop

Type

FlagIntParam

interface declared in params.ts

An integer flag, as returned by param.int.

Prop

Type

FlagPathParam

interface declared in params.ts

A flag carrying a local file's contents, as returned by param.path. Never repeatable.

Prop

Type

FlagStringParam

interface declared in params.ts

A string flag, as returned by param.string.

Prop

Type

Input

type declared in params.ts

Handler input inferred from a leaf's parameter object: required parameters are present, everything else optional, repeatable parameters arrays, enum choices literal values.

{ [K in keyof P as P[K] extends { required: true; } ? K : never]: Decoded<P[K]>; } & { [K in keyof P as P[K] extends { required: true; } ? never : K]?: Decoded<P[K]> | undefined; }

param

variable declared in params.ts

The parameter builders. Build descriptors with these rather than by hand.

Prop

Type

PositionalParam

interface declared in params.ts

The one positional argument a leaf may take, as returned by param.positional.

Prop

Type

StdinParam

interface declared in params.ts

The command's standard input, as returned by param.stdin.

Prop

Type

On this page