Skip to content

Commit

Permalink
docs(pass-style): don't rely on Remotable in Far docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Mar 29, 2024
1 parent 6cd8e87 commit 964bb39
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions packages/pass-style/src/make-far.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,16 +164,24 @@ const getMethodNamesDescriptor = harden({
});

/**
* A concise convenience for the most common `Remotable` use.
* Mark an object to be exposed for remote interaction
* and give it a suggestive interface name for debugging.
*
* For far objects (as opposed to far functions), also adds a miranda
* `GET_METHOD_NAMES` method that returns an array of all the method names,
* if there is not yet any method named `GET_METHOD_NAMES`. (Hence "miranda")
* All properties of the object have to be methods, not data.
*
* The object must not be hardened before it is marked.
* It will be hardened after marking.
*
* For far objects (as opposed to far functions), also adds
* `__getMethodNames__` method that returns an array of all the method names,
* if there is not yet any method named `__getMethodNames__`.
*
* @example
* Far('Employee', { getManager })
* @template {{}} T
* @param {string} farName This name will be prepended with `Alleged: `
* for now to form the `Remotable` `iface` argument.
* @param {T} [remotable] The object used as the remotable
* @param {T} [remotable] The object to be marked as remotable
*/
export const Far = (farName, remotable = undefined) => {
const r = remotable === undefined ? /** @type {T} */ ({}) : remotable;
Expand Down

0 comments on commit 964bb39

Please sign in to comment.