@contract-case/case-plugin-dsl-types
Version:
Types for writing the definition DSL for plugins for the ContractCase test framework
19 lines • 691 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isCaseMock = void 0;
/**
* Determines if a given value is a valid mock descriptor.
* @public
* @remarks
*
* This function checks if the provided value is an object and contains the
* property '_case:mock:type', indicating that it is a valid mock descriptor.
*
* @param maybeMock - The value to be checked.
* @returns A boolean indicating whether the provided value is a valid mock descriptor.
*/
const isCaseMock = (maybeMock) => typeof maybeMock === 'object' &&
maybeMock != null &&
'_case:mock:type' in maybeMock;
exports.isCaseMock = isCaseMock;
//# sourceMappingURL=nodes.types.js.map