openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
14 lines (13 loc) • 496 B
TypeScript
type TrieLeafValue = string | string[];
export type TrieValue = TrieData | TrieLeafValue | undefined;
export interface TrieData extends Map<string | RegExp, TrieValue> {
}
export declare function isLeafValue(value: any): value is TrieLeafValue;
export declare class Trie {
private root;
constructor(root: TrieData);
private _getLongestMatchingPrefix;
get(key: string): string | string[] | undefined;
getMatchingPrefix(key: string): string | string[] | undefined;
}
export {};