@@ -17,17 +17,14 @@ const {
17
17
18
18
const { ownKeys } = Reflect ;
19
19
20
- // TODO: Use just 'remote' when we're willing to make a breaking change.
21
- export const REMOTE_STYLE = 'presence' ;
22
-
23
20
export const PASS_STYLE = Symbol . for ( 'passStyle' ) ;
24
21
25
22
/** @type {MarshalGetInterfaceOf } */
26
23
export function getInterfaceOf ( val ) {
27
24
if ( typeof val !== 'object' || val === null ) {
28
25
return undefined ;
29
26
}
30
- if ( val [ PASS_STYLE ] !== REMOTE_STYLE ) {
27
+ if ( val [ PASS_STYLE ] !== 'remotable' ) {
31
28
return undefined ;
32
29
}
33
30
assert ( isFrozen ( val ) , X `Remotable ${ val } must be frozen` , TypeError ) ;
@@ -225,8 +222,8 @@ const assertRemotableProto = val => {
225
222
X `Unexpect properties on Remotable Proto ${ ownKeys ( rest ) } ` ,
226
223
) ;
227
224
assert (
228
- passStyleValue === REMOTE_STYLE ,
229
- X `Expected ${ q ( REMOTE_STYLE ) } , not ${ q ( passStyleValue ) } ` ,
225
+ passStyleValue === 'remotable' ,
226
+ X `Expected 'remotable' , not ${ q ( passStyleValue ) } ` ,
230
227
) ;
231
228
assert . typeof ( toStringValue , 'function' , X `toString must be a function` ) ;
232
229
assert . typeof ( toStringTagValue , 'string' , X `@@toStringTag must be a string` ) ;
@@ -306,7 +303,7 @@ function assertRemotable(val) {
306
303
* * 'copyRecord' for non-empty records with only data properties
307
304
* * 'copyArray' for arrays with only data properties
308
305
* * 'copyError' for instances of Error with only data properties
309
- * * REMOTE_STYLE for non-array objects with only method properties
306
+ * * 'remotable' for non-array objects with only method properties
310
307
* * 'promise' for genuine promises only
311
308
* * throwing an error on anything else, including thenables.
312
309
* We export passStyleOf so other algorithms can use this module's
@@ -320,7 +317,7 @@ export function passStyleOf(val) {
320
317
switch ( typestr ) {
321
318
case 'object' : {
322
319
if ( getInterfaceOf ( val ) ) {
323
- return REMOTE_STYLE ;
320
+ return 'remotable' ;
324
321
}
325
322
if ( val === null ) {
326
323
return 'null' ;
@@ -348,7 +345,7 @@ export function passStyleOf(val) {
348
345
assertRemotable ( val ) ;
349
346
// console.log(`--- @@marshal: pass-by-ref object without Far/Remotable`);
350
347
// assert.fail(X`pass-by-ref object without Far/Remotable`);
351
- return REMOTE_STYLE ;
348
+ return 'remotable' ;
352
349
}
353
350
case 'function' : {
354
351
assert . fail ( X `Bare functions like ${ val } are disabled for now` ) ;
0 commit comments