Skip to content

CommandDirective

8 exports Added in v1.0.0 Source

Constructors

builtIn

Added in v1.0.0 Source

Signature

declare const builtIn: (option: BuiltInOptions) => CommandDirective<never>;

userDefined

Added in v1.0.0 Source

Signature

declare const userDefined: <A>(leftover: ReadonlyArray<string>, value: A) => CommandDirective<A>;

Mapping

map

Added in v1.0.0 Source

Signature

declare const map: {
  <A, B>(f: (a: A) => B): (self: CommandDirective<A>) => CommandDirective<B>;
  <A, B>(self: CommandDirective<A>, f: (a: A) => B): CommandDirective<B>;
};

Models

BuiltIn interface

Added in v1.0.0 Source

Signature

interface BuiltIn {
  readonly _tag: "BuiltIn";
  readonly option: BuiltInOptions;
}

CommandDirective type

Added in v1.0.0 Source

Signature

type CommandDirective<A> = BuiltIn | UserDefined<A>;

UserDefined interface

Added in v1.0.0 Source

Signature

interface UserDefined<A> {
  readonly _tag: "UserDefined";
  readonly leftover: readonly Array<string>;
  readonly value: A;
}

Refinements

isBuiltIn

Added in v1.0.0 Source

Signature

declare const isBuiltIn: <A>(self: CommandDirective<A>) => self is BuiltIn;

Signature

declare const isUserDefined: <A>(self: CommandDirective<A>) => self is UserDefined<A>;