@endo/marshal
Advanced tools
Comparing version 0.6.2 to 0.6.3
@@ -6,2 +6,11 @@ # Change Log | ||
### [0.6.3](https://github.com/endojs/endo/compare/@endo/marshal@0.6.2...@endo/marshal@0.6.3) (2022-03-07) | ||
### Features | ||
* **marshal:** have `Remotable` create `Remote<T>`-compatible objs ([1ba89ba](https://github.com/endojs/endo/commit/1ba89ba922275f08d3b7b8c82fae0dca31752321)) | ||
### [0.6.2](https://github.com/endojs/endo/compare/@endo/marshal@0.6.1...@endo/marshal@0.6.2) (2022-03-02) | ||
@@ -8,0 +17,0 @@ |
{ | ||
"name": "@endo/marshal", | ||
"version": "0.6.2", | ||
"version": "0.6.3", | ||
"description": "marshal", | ||
@@ -40,9 +40,9 @@ "type": "module", | ||
"dependencies": { | ||
"@endo/eventual-send": "^0.14.7", | ||
"@endo/nat": "^4.1.7", | ||
"@endo/promise-kit": "^0.2.36" | ||
"@endo/eventual-send": "^0.14.8", | ||
"@endo/nat": "^4.1.8", | ||
"@endo/promise-kit": "^0.2.37" | ||
}, | ||
"devDependencies": { | ||
"@endo/lockdown": "^0.1.8", | ||
"@endo/ses-ava": "^0.2.20", | ||
"@endo/lockdown": "^0.1.9", | ||
"@endo/ses-ava": "^0.2.21", | ||
"ava": "^3.12.1", | ||
@@ -78,3 +78,3 @@ "c8": "^7.7.3" | ||
}, | ||
"gitHead": "08973d4fc6358a58d733251b051b2812bb4c651a" | ||
"gitHead": "9ddd58b4a26755cdba9403b0cb042b2067c69832" | ||
} |
@@ -1,5 +0,9 @@ | ||
export function Remotable(iface?: string | undefined, props?: undefined, remotable?: any): any; | ||
export function Far<T>(farName: string, remotable?: T | undefined): T; | ||
export function Remotable<T>(iface?: string | undefined, props?: undefined, remotable?: T | undefined): T & { | ||
__Remote__: T; | ||
}; | ||
export function Far<T>(farName: string, remotable?: T | undefined): T & { | ||
__Remote__: T; | ||
}; | ||
export function ToFarFunction(farName: string, func: (...args: any[]) => any): (...args: any[]) => any; | ||
export type InterfaceSpec = import('./types.js').InterfaceSpec; | ||
//# sourceMappingURL=make-far.d.ts.map |
@@ -74,2 +74,3 @@ // @ts-check | ||
* | ||
* @template T | ||
* @param {InterfaceSpec} [iface='Remotable'] The interface specification for | ||
@@ -86,4 +87,4 @@ * the remotable. For now, a string iface must be "Remotable" or begin with | ||
* That plan is that own-properties are copied to the remotable | ||
* @param {any} [remotable={}] The object used as the remotable | ||
* @returns {any} remotable, modified for debuggability | ||
* @param {T} [remotable={}] The object used as the remotable | ||
* @returns {T & { __Remote__: T }} remotable, modified for debuggability | ||
*/ | ||
@@ -93,3 +94,3 @@ export const Remotable = ( | ||
props = undefined, | ||
remotable = {}, | ||
remotable = /** @type {T} */ ({}), | ||
) => { | ||
@@ -134,3 +135,3 @@ assertIface(iface); | ||
assert(iface !== undefined); // To make TypeScript happy | ||
return remotable; | ||
return /** @type {T & { __Remote__: T }} */ (remotable); | ||
}; | ||
@@ -145,7 +146,6 @@ harden(Remotable); | ||
* for now to form the `Remotable` `iface` argument. | ||
* @param {T|undefined} [remotable={}] The object used as the remotable | ||
* @returns {T} remotable, modified for debuggability | ||
* @param {T} [remotable={}] The object used as the remotable | ||
*/ | ||
export const Far = (farName, remotable = undefined) => { | ||
const r = remotable === undefined ? {} : remotable; | ||
const r = remotable === undefined ? /** @type {T} */ ({}) : remotable; | ||
return Remotable(`Alleged: ${farName}`, undefined, r); | ||
@@ -152,0 +152,0 @@ }; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
165687
3227
Updated@endo/eventual-send@^0.14.8
Updated@endo/nat@^4.1.8
Updated@endo/promise-kit@^0.2.37