feat(far)!: rename `Remote` to `FarRef`
MODIFY
packages/eventual-send/src/index.test-d.ts
packages/eventual-send/src/index.test-d.ts
@@ -3,14 +3,10 @@ import { expectType } from 'tsd';
import { E } from '../test/get-hp.js';
import { DataOnly, ERef } from './index.js';
-type Remote<
+type FarRef<
Primary,
Local = DataOnly<Primary>
-> = import('@endo/eventual-send').Remote<Primary, Local>;
-
-const Far = <T>(_iface: string, value: T) => {
- return value as T & { __Remote__: T };
-};
+> = import('@endo/eventual-send').FarRef<Primary, Local>;
// Check the legacy ERef type
const foo = async (a: ERef<{ bar(): string; baz: number }>) => {
@@ -30,8 +26,8 @@ const foo = async (a: ERef<{ bar(): string; baz: number }>) => {
a.bar();
};
-// Remote<T>
-const foo2 = async (a: Remote<{ bar(): string; baz: number }>) => {
+// FarRef<T>
+const foo2 = async (a: FarRef<{ bar(): string; baz: number }>) => {
const { baz } = await a;
expectType<number>(baz);

MODIFY
packages/far/src/index.js
packages/far/src/index.js
@@ -4,19 +4,20 @@ export { Far, getInterfaceOf, passStyleOf } from '@endo/marshal';
/**
* @template Primary
* @template [Local=import('@endo/eventual-send').DataOnly<Primary>]
- * @typedef {import('@endo/eventual-send').Remote<Primary, Local>} Remote
+ * @typedef {import('@endo/eventual-send').FarRef<Primary, Local>} FarRef
* Declare an object that is potentially a far reference of type Primary whose
- * near reference has type Local. This should be used only for arguments and
- * declarations; the only creators of Remote values are distributed object
- * creator components like the `Far` or `Remotable` functions.
+ * auxilliary data has type Local. This should be used only for consumers of
+ * Far objects in arguments and declarations; the only creators of Far objects
+ * are distributed object creator components like the `Far` or `Remotable`
+ * functions.
*/
/**
* @template T
* @typedef {import('@endo/eventual-send').ERef<T>} ERef
* Declare that `T` may or may not be a Promise. This should be used only for
- * arguments and declarations; return values should specifically be `Promise<T>`
- * or `T` itself.
+ * consumers of arguments and declarations; return values should specifically be
+ * `Promise<T>` or `T` itself.
*/
/**

feat(far)!: rename `Remote` to `FarRef`