Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(pass-style): don't rely on Remotable in Far docs #2191

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading