import { CommandBuilder, type RawArg, type TemplateExpr } from "./command.js"; /** @internal */ export type ExtrasObject = Record unknown>; /** Options for creating a custom `$`. */ export interface Create$Options { /** Uses this command builder (or the result of the function applied to * the parent's builder) as the starting point. */ commandBuilder?: CommandBuilder | ((builder: CommandBuilder) => CommandBuilder); /** Extra properties to attach to the resulting `$`. */ extras?: TExtras; } /** Callable/helper surface of a `$` produced by `build$`. */ export interface $Base { (strings: TemplateStringsArray, ...exprs: TemplateExpr[]): CommandBuilder; /** Same as the main tag, but arguments are not escaped. */ raw(strings: TemplateStringsArray, ...exprs: TemplateExpr[]): CommandBuilder; /** Wraps a value so it passes through template interpolation unescaped. */ rawArg(arg: T): RawArg; /** Escapes a string so it can be safely interpolated as a command arg. */ escapeArg(arg: string): string; /** Creates a new `$` derived from this one's state. */ build$(opts?: Create$Options): $Type; } /** A `$` produced by `build$`, combining the helper surface with any extras. */ export type $Type = $Base & TExtras; /** Creates a new `$` tagged template. */ export declare function build$(opts?: Create$Options): $Type; /** Default `$` instance. */ export declare const $: $Type;