export interface FmtResult { toString(): string; [Symbol.toPrimitive](): string; } export interface AsyncFmtResult { chunks(): AsyncIterable; text(): Promise; } export function fmt( strings: TemplateStringsArray | string, ...values: unknown[] ): FmtResult; export function afmt( strings: TemplateStringsArray | string, ...values: unknown[] ): AsyncFmtResult; export interface RefValue { uri: string; exs: (string | string[])[]; toString(): string; [Symbol.toPrimitive](hint: string): string | number; } export function Ref(uri: string, ...extensions: (string | string[])[]): RefValue; export namespace Ref { const MARKER: unique symbol; function stringify(value: unknown): string; } export interface JstagOptions { namer?: (index: number) => string; after?: boolean; } export interface Snippet { toString(): string; [Symbol.toPrimitive](): string; } export interface JsTag { (template: TemplateStringsArray, ...values: unknown[]): Snippet; join(joiner: string, values: unknown[]): Snippet; } export function jstag(options?: JstagOptions): JsTag; export interface ObjstrOptions { indent?: string; singleQuotes?: boolean; inlineCharacterLimit?: number; pad?: string; valueTransform?: (value: unknown) => unknown; } export function objstr(value: object, options?: ObjstrOptions): string; export interface JsonstrOptions { indent?: string; inlineCharacterLimit?: number; pad?: string; } export function jsonstr(value: object, options?: JsonstrOptions): string; export type Rewrite = [start: number, end: number, text: string]; export type Range = [start: number, end: number, match: string]; export function changes(source: string | { toString(): string }, rewrites: Rewrite[]): string; export function ranges(source: string | { toString(): string }, regex: RegExp): Range[];