Outbound RPC marshalable objects have a chance to declare their optional interfaces by way of this interface:
|
export interface RpcMarshalable { |
|
readonly _jsonRpcMarshalableLifetime: MarshaledObjectLifetime |
|
readonly _jsonRpcOptionalInterfaces?: number[] |
|
} |
But inbound RPC marshaled objects only generally satisfy this interface:
|
export interface MarshaledObjectProxy extends IDisposable { |
|
_jsonrpcMarshaledHandle: number |
|
} |
|
|
|
export module MarshaledObjectProxy { |
|
export function is(value: any): value is MarshaledObjectProxy { |
|
const valueCandidate = value as MarshaledObjectProxy | undefined |
|
return typeof valueCandidate?._jsonrpcMarshaledHandle === 'number' |
|
} |
|
} |
|
|
|
interface MarshaledObjectProxyTarget extends MarshaledObjectProxy { |
|
messageConnection: MessageConnection |
|
} |
Note the lack of the _jsonRpcOptionalInterfaces property. This property becomes important for the receiver when the original object may support specific interfaces.
We should expose this property on the proxy target.
Outbound RPC marshalable objects have a chance to declare their optional interfaces by way of this interface:
vs-servicehub/src/servicebroker-npm/src/jsonRpc/MarshalableObject.ts
Lines 57 to 60 in 2d5a870
But inbound RPC marshaled objects only generally satisfy this interface:
vs-servicehub/src/servicebroker-npm/src/jsonRpc/MarshalableObject.ts
Lines 120 to 133 in 2d5a870
Note the lack of the
_jsonRpcOptionalInterfacesproperty. This property becomes important for the receiver when the original object may support specific interfaces.We should expose this property on the proxy target.