@eagleoutice/flowr-dev
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
28 lines (27 loc) • 1.94 kB
TypeScript
/** Automatically provides hover over with the documentation for these! */
import { scripts } from '../../cli/common/scripts-info';
import { flowrMainOptionDefinitions } from '../../cli/flowr-main-options';
import type { ReplCommandNames } from '../../cli/repl/commands/repl-commands';
import { FlowrConfig } from '../../config';
import type { AutocompletablePaths } from '../../util/objects';
export type ScriptOptions<Type extends keyof typeof scripts | 'flowr'> = Type extends keyof typeof scripts ? typeof scripts[Type]['options'][number]['name'] : Type extends 'flowr' ? typeof flowrMainOptionDefinitions[number]['name'] : never;
/**
* Produce the documentation string for a CLI long option
*/
export declare function getCliLongOptionOf<ScriptName extends keyof typeof scripts | 'flowr', OptionName extends ScriptOptions<ScriptName>>(scriptName: ScriptName, optionName: OptionName, withAlias?: boolean, quote?: boolean): string;
/**
* Produce the documentation string for multiple CLI long options
*/
export declare function multipleCliOptions<ScriptName extends keyof typeof scripts | 'flowr', OptionName extends ScriptOptions<ScriptName>>(scriptName: ScriptName, ...options: OptionName[]): string;
/**
* Produce a documentation link for a flowR configuration option (e.g. `solver.sigdb.enabled`).
* The link points at the configuration section of the Interface wiki page and carries the option's
* schema type, description, and any enumerated values as a hover tooltip.
* @param path - The (autocompleted) `.`-separated configuration path.
* @param quote - Whether to render the path as inline code. Default is `true`.
*/
export declare function getConfigOption(path: AutocompletablePaths<FlowrConfig>, quote?: boolean): string;
/**
* Produce the documentation string for a REPL command
*/
export declare function getReplCommand(commandName: ReplCommandNames | string, quote?: boolean, showStar?: boolean): string;