interface QueryToken

A query flag (-t/-m/-s/-p) with its resolved value.

import * as Args from './index.ts';

Args.tokenize(['--filter=Cart checkout'])[0];
// { kind: 'query', action: 'run', value: 'Cart checkout', greedy: false }

Properties

kind: "query"

Discriminant.

action: "run" | "list"

What to do with the matches: run narrows which tests execute; list previews them instead.

value: string | null

The value, or null when the flag was given with nothing after it.

greedy: boolean

True when the value was consumed from following argv entries (-t a b) rather than = glued.

Usage

import { type QueryToken } from "lib/args/tokenize.ts";