NameHub<Value>: {
    entries: ((includeReserved?: boolean) => [string, Value][]);
    has: ((key: string) => boolean);
    keys: (() => string[]);
    lookup: ((...path: string[]) => Promise<any>);
    values: (() => Value[]);
}

read-only access to a node in a name hierarchy

NOTE: We need to return arrays, not iterables, because even if marshal could allow passing a remote iterable, there would be an inordinate number of round trips for the contents of even the simplest nameHub.

Type Parameters

  • Value = any

Type declaration

  • entries: ((includeReserved?: boolean) => [string, Value][])

    get all the entries available in the current NameHub

      • (includeReserved?): [string, Value][]
      • Parameters

        • OptionalincludeReserved: boolean

        Returns [string, Value][]

  • has: ((key: string) => boolean)
      • (key): boolean
      • Parameters

        • key: string

        Returns boolean

  • keys: (() => string[])

    get all names available in the current NameHub

      • (): string[]
      • Returns string[]

  • lookup: ((...path: string[]) => Promise<any>)

    Look up a path of keys starting from the current NameHub. Wait on any reserved promises.

      • (...path): Promise<any>
      • Parameters

        • Rest...path: string[]

        Returns Promise<any>

  • values: (() => Value[])

    get all values available in the current NameHub