@connectv/core
Version:
agent-based reactive programming library for typescript/javascript
18 lines • 678 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var pin_map_1 = require("../pin/pin-map");
var signature_1 = require("./signature");
/**
*
*
* @param whatever
* @returns `true` if `whatever` satisfies `AgentLike` interface.
*
*/
function isAgentLike(whatever) {
return whatever !== undefined && (typeof whatever.in == 'function') && (typeof whatever.out == 'function')
&& whatever.inputs instanceof pin_map_1.PinMap && whatever.outputs instanceof pin_map_1.PinMap &&
whatever.signature !== undefined && signature_1.isSignature(whatever.signature);
}
exports.isAgentLike = isAgentLike;
//# sourceMappingURL=agent-like.js.map