@arktype/util
Advanced tools
Comparing version 0.0.46 to 0.0.47
@@ -0,1 +1,2 @@ | ||
import type { array } from "./arrays.js"; | ||
import type { describeDomainOf, domainOf, inferDomain } from "./domain.js"; | ||
@@ -5,3 +6,3 @@ import type { Stringifiable, isAny, isNever } from "./generics.js"; | ||
import type { stringifyUnion } from "./unionToTuple.js"; | ||
export type describe<t, branchDelimiter extends string = " or "> = stringifyUnion<isAny<t> extends true ? "any" : isNever<t> extends true ? "never" : unknown extends t ? "unknown" : t extends object ? describeObject<t> : t extends Stringifiable ? inferDomain<domainOf<t>> extends t ? describeDomainOf<t> : `${t}` : describeDomainOf<t>, branchDelimiter>; | ||
export type describe<t, branchDelimiter extends string = " or "> = stringifyUnion<isAny<t> extends true ? "any" : isNever<t> extends true ? "never" : unknown extends t ? "unknown" : t extends array ? "an array" : t extends object ? describeObject<t> : t extends Stringifiable ? inferDomain<domainOf<t>> extends t ? describeDomainOf<t> : `${t}` : describeDomainOf<t>, branchDelimiter>; | ||
export type describeExpression<t> = describe<t, " | ">; |
@@ -19,2 +19,3 @@ import type { Primitive } from "./domain.js"; | ||
} & u; | ||
export type leftIfEqual<l, r> = [l, r] extends [r, l] ? l : r; | ||
export type defer<t> = [t][t extends any ? 0 : never]; | ||
@@ -21,0 +22,0 @@ export type UnknownUnion = string | number | symbol | bigint | boolean | object | null | undefined; |
@@ -7,3 +7,4 @@ import { domainOf, hasDomain } from "./domain.js"; | ||
throwError(`Tried to initialize an $ark registry but one already existed. | ||
This probably means you are depending on multiple versions of an arktype package. | ||
This probably means you are either depending on multiple versions of an arktype package, | ||
or importing the same package from both ESM and CJS. | ||
Review package.json versions across your repo to ensure consistency.`); | ||
@@ -10,0 +11,0 @@ } |
{ | ||
"name": "@arktype/util", | ||
"version": "0.0.46", | ||
"version": "0.0.47", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "David Blass", |
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
78965
1634