UNPKG

shelving

Version:

Toolkit for using data in JavaScript.

14 lines (13 loc) 643 B
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); /** 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; set(path: string): void; }