shelving
Version:
Toolkit for using data in JavaScript.
16 lines (15 loc) • 698 B
TypeScript
import type { AbsolutePath } from "../util/path.js";
import { Store } from "./Store.js";
/** Store an absolute path, e.g. `/a/b/c` */
export declare class PathStore extends Store<AbsolutePath> {
constructor(path?: string, time?: number);
get value(): AbsolutePath;
set value(path: string);
/** Based on the current store path, is a path active? */
isActive(path: AbsolutePath): boolean;
/** Based on the current store path, is a path proud (i.e. a child of the current store path)? */
isProud(path: AbsolutePath): boolean;
/** Get an absolute path from a path relative to the current store path. */
getPath(path: string): AbsolutePath;
toString(): string;
}