@effect/match
Advanced tools
Comparing version 0.18.4 to 0.18.5
@@ -23,3 +23,3 @@ export type ExtractMatch<I, P> = [ReplaceUnions<I, P>] extends [infer EI] ? Extract<EI, P> : never; | ||
type ReplaceUnions<I, P> = unknown extends P ? I : IsUnion<I> extends true ? ListOf<I> extends infer L ? L extends Array<any> ? FlattenUnionFails<{ | ||
[K in keyof L]: ReplaceUnions<L[K], P>; | ||
[K in keyof L]: L[K] extends Array<I> ? L[K] : ReplaceUnions<L[K], P>; | ||
}[number]> : never : never : IsPlainObject<I> extends true ? FlattenRecordFails<{ | ||
@@ -26,0 +26,0 @@ [RK in keyof I]-?: RK extends keyof P ? ReplaceUnions<I[RK], P[RK]> : I[RK]; |
{ | ||
"name": "@effect/match", | ||
"version": "0.18.4", | ||
"version": "0.18.5", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -81,3 +81,9 @@ /* eslint-disable @typescript-eslint/no-unnecessary-type-constraint */ | ||
? L extends Array<any> | ||
? FlattenUnionFails<{ [K in keyof L]: ReplaceUnions<L[K], P> }[number]> | ||
? FlattenUnionFails< | ||
{ | ||
[K in keyof L]: L[K] extends Array<I> | ||
? L[K] | ||
: ReplaceUnions<L[K], P> | ||
}[number] | ||
> | ||
: never | ||
@@ -84,0 +90,0 @@ : never |
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
111356
2063