UNPKG

rpcchannel

Version:

Easy RPC with permission controls

24 lines (23 loc) 894 B
/** * A mapping of multi-part addresses (using the Java naming convention) to any * type. Used extensively by the RPC channel. * @author Nathan Pennie <kb1rd@kb1rd.net> */ /** */ declare type MultistringAddress = string[]; declare type WildcardMultistringAddress = (string | undefined | null)[]; declare const DefaultEntryKey: unique symbol; declare const WildcardEntryKey: unique symbol; declare type AddressMapFlat<T> = { [key: string]: AddressMapFlat<T>; [WildcardEntryKey]?: AddressMapFlat<T>; [DefaultEntryKey]?: T; }; declare class AddressMap<T> { table: AddressMapFlat<T>; put(addr: WildcardMultistringAddress, value: T | undefined): void; get(addr: MultistringAddress, wc_values?: string[]): T | undefined; clear(): void; toString(): string; } export { MultistringAddress, WildcardMultistringAddress, AddressMap, DefaultEntryKey, WildcardEntryKey };