tiny-types
Version:
A tiny library that brings Tiny Types to JavaScript and TypeScript
15 lines • 544 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IdentityMatcher = void 0;
const PatternMatcher_1 = require("./PatternMatcher");
const rules_1 = require("./rules");
/**
* @access private
*/
class IdentityMatcher extends PatternMatcher_1.PatternMatcher {
when(pattern, transformation) {
return new IdentityMatcher(this.value, this.rules.concat(new rules_1.MatchesIdentical(pattern, transformation)));
}
}
exports.IdentityMatcher = IdentityMatcher;
//# sourceMappingURL=IdentityMatcher.js.map