@theia/core
Version:
Theia is a cloud & desktop IDE framework implemented in TypeScript.
32 lines • 1.6 kB
TypeScript
/**
* The CLI options of a launch, already parsed. A window opened for a *forwarded* launch (see the
* `second-instance` handling in `ElectronMainApplication`) receives this rather than a raw `argv`:
* the command line is parsed once, in the Electron main process, so that no consumer has to
* re-implement the argument grammar and the frontend never sees an unparsed command line.
*
* @experimental
*/
export interface LaunchArguments {
/**
* The values of each (possibly repeated) `--name value` / `--name=value` option, in the order
* they appeared on the command line.
*/
readonly values: Readonly<Record<string, readonly string[]>>;
/** The options that were explicitly negated, i.e. `--no-name` or `--name=false`. */
readonly negated: readonly string[];
}
/** @experimental */
export declare namespace LaunchArguments {
/** A launch that carried no options. */
const EMPTY: LaunchArguments;
/** Every value of a (possibly repeated) option, or an empty array when the option is absent. */
function values(args: LaunchArguments, name: string): readonly string[];
/**
* The last value of an option, or `undefined` when the option is absent. Last wins, so that a
* repeated option behaves like it does on a normal command line.
*/
function lastValue(args: LaunchArguments, name: string): string | undefined;
/** Whether a boolean option was explicitly disabled, i.e. `--no-name` or `--name=false`. */
function isNegated(args: LaunchArguments, name: string): boolean;
}
//# sourceMappingURL=launch-arguments.d.ts.map