@effect/match
Advanced tools
Comparing version 0.23.0 to 0.23.1
@@ -252,2 +252,9 @@ /** | ||
/** | ||
* @category predicates | ||
* @tsplus static effect/match/Matcher.Ops instanceOf | ||
* @since 1.0.0 | ||
* @tsplus location "@effect/match" | ||
*/ | ||
export declare const instanceOf: <A extends abstract new (...args: any) => any>(constructor: A) => SafeSchema<InstanceType<A>, never>; | ||
/** | ||
* @category conversions | ||
@@ -254,0 +261,0 @@ * @tsplus pipeable effect/match/Matcher orElse |
11
index.js
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.whenOr = exports.whenAnd = exports.when = exports.value = exports.unsafe = exports.undefined = exports.type = exports.tag = exports.string = exports.safe = exports.record = exports.orElse = exports.option = exports.number = exports.null = exports.not = exports.nonEmptyString = exports.is = exports.exhaustive = exports.either = exports.discriminator = exports.defined = exports.date = exports.boolean = exports.bigint = exports.any = exports._undefined = exports._null = exports.SafeSchemaId = void 0; | ||
exports.whenOr = exports.whenAnd = exports.when = exports.value = exports.unsafe = exports.undefined = exports.type = exports.tag = exports.string = exports.safe = exports.record = exports.orElse = exports.option = exports.number = exports.null = exports.not = exports.nonEmptyString = exports.is = exports.instanceOf = exports.exhaustive = exports.either = exports.discriminator = exports.defined = exports.date = exports.boolean = exports.bigint = exports.any = exports._undefined = exports._null = exports.SafeSchemaId = void 0; | ||
var E = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Either")); | ||
@@ -325,2 +325,9 @@ var _Function = /*#__PURE__*/require("@effect/data/Function"); | ||
/** | ||
* @category predicates | ||
* @tsplus static effect/match/Matcher.Ops instanceOf | ||
* @since 1.0.0 | ||
*/ | ||
exports.record = record; | ||
const instanceOf = constructor => u => u instanceof constructor; | ||
/** | ||
* @category conversions | ||
@@ -330,3 +337,3 @@ * @tsplus pipeable effect/match/Matcher orElse | ||
*/ | ||
exports.record = record; | ||
exports.instanceOf = instanceOf; | ||
const orElse = f => self => { | ||
@@ -333,0 +340,0 @@ const result = either_1(self); |
{ | ||
"name": "@effect/match", | ||
"version": "0.23.0", | ||
"version": "0.23.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -492,2 +492,12 @@ /** | ||
/** | ||
* @category predicates | ||
* @tsplus static effect/match/Matcher.Ops instanceOf | ||
* @since 1.0.0 | ||
*/ | ||
export const instanceOf = <A extends abstract new (...args: any) => any>( | ||
constructor: A, | ||
): SafeSchema<InstanceType<A>, never> => | ||
((u: unknown) => u instanceof constructor) as any | ||
/** | ||
* @category conversions | ||
@@ -494,0 +504,0 @@ * @tsplus pipeable effect/match/Matcher orElse |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121314
2366