Endo
    Preparing search index...

    Variable EConst

    E: <T>(x: T) => ECallableOrMethods<RemoteFunctions<T>> & {
        get: <T>(x: T) => EGetters<LocalRecord<T>>;
        resolve: {
            (): Promise<void>;
            <T>(value: T): Promise<Awaited<T>>;
            <T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
        };
        sendOnly: <T>(x: T) => ESendOnlyCallableOrMethods<RemoteFunctions<T>>;
        when: <T, U = T>(
            x: T | PromiseLike<T>,
            onfulfilled?: (value: T) => ERef<U>,
            onrejected?: (reason: any) => ERef<U>,
        ) => Promise<U>;
    } = ...

    E(x) returns a proxy on which you can call arbitrary methods. Each of these method calls returns a promise. The method will be invoked on whatever 'x' designates (or resolves to) in a future turn, not this one.

    E.get(x) returns a proxy on which you can get arbitrary properties. Each of these properties returns a promise for the property. The promise value will be the property fetched from whatever 'x' designates (or resolves to) in a future turn, not this one.

    E.when(x, res, rej) is equivalent to HandledPromise.resolve(x).then(res, rej)

    Type Declaration

    • Readonlyget: <T>(x: T) => EGetters<LocalRecord<T>>

      E.get(x) returns a proxy on which you can get arbitrary properties. Each of these properties returns a promise for the property. The promise value will be the property fetched from whatever 'x' designates (or resolves to) in a future turn, not this one.

    • Readonlyresolve: {
          (): Promise<void>;
          <T>(value: T): Promise<Awaited<T>>;
          <T>(value: T | PromiseLike<T>): Promise<Awaited<T>>;
      }

      E.resolve(x) converts x to a handled promise. It is shorthand for HandledPromise.resolve(x)

      value to convert to a handled promise

      handled promise for x

    • ReadonlysendOnly: <T>(x: T) => ESendOnlyCallableOrMethods<RemoteFunctions<T>>

      E.sendOnly returns a proxy similar to E, but for which the results are ignored (undefined is returned).

    • Readonlywhen: <T, U = T>(
          x: T | PromiseLike<T>,
          onfulfilled?: (value: T) => ERef<U>,
          onrejected?: (reason: any) => ERef<U>,
      ) => Promise<U>

      E.when(x, res, rej) is equivalent to HandledPromise.resolve(x).then(res, rej)