UNPKG

@contract-case/case-plugin-dsl-types

Version:

Types for writing the definition DSL for plugins for the ContractCase test framework

24 lines 863 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isLookupableMatcher = exports.LOOKUP_MATCHER_TYPE = void 0; /** * The type constant for a lookup matcher * @internal */ exports.LOOKUP_MATCHER_TYPE = '_case:Lookup'; /** * Determines if a specific matcher or data is a lookupable matcher * @public * * @param maybeMatcher - the matcher or data in question * @returns true if `maybeMatcher` is a lookupable matcher, false otherwise */ const isLookupableMatcher = (maybeMatcher) => { const matcher = maybeMatcher; return (matcher != null && '_case:matcher:uniqueName' in matcher && typeof '_case:matcher:uniqueName' === 'string' && matcher['_case:matcher:type'] === exports.LOOKUP_MATCHER_TYPE); }; exports.isLookupableMatcher = isLookupableMatcher; //# sourceMappingURL=lookup.types.js.map