@arktype/schema
Advanced tools
Comparing version 0.9.0 to 0.10.0
@@ -51,3 +51,4 @@ import { Callable, type Guardable, type Json, type Key, type array, type conform, type listable, type mutable } from "@ark/util"; | ||
toString(): string; | ||
equals(other: BaseNode): boolean; | ||
equals(r: unknown): boolean; | ||
ifEquals(r: unknown): BaseNode | undefined; | ||
hasKind<kind extends NodeKind>(kind: kind): this is nodeOfKind<kind>; | ||
@@ -54,0 +55,0 @@ assertHasKind<kind extends NodeKind>(kind: kind): nodeOfKind<kind>; |
@@ -128,5 +128,9 @@ import { Callable, appendUnique, flatMorph, includes, isArray, isEmptyObject, throwError } from "@ark/util"; | ||
} | ||
equals(other) { | ||
return this.innerHash === other.innerHash; | ||
equals(r) { | ||
const rNode = isNode(r) ? r : this.$.parseDefinition(r); | ||
return this.innerHash === rNode.innerHash; | ||
} | ||
ifEquals(r) { | ||
return this.equals(r) ? this : undefined; | ||
} | ||
hasKind(kind) { | ||
@@ -133,0 +137,0 @@ return this.kind === kind; |
@@ -53,7 +53,8 @@ import { inferred, type array } from "@ark/util"; | ||
extract(r: unknown): BaseRoot; | ||
exclude(r: BaseRoot): BaseRoot; | ||
exclude(r: unknown): BaseRoot; | ||
array(): BaseRoot; | ||
overlaps(r: BaseRoot): boolean; | ||
extends(r: BaseRoot): boolean; | ||
subsumes(r: BaseRoot): boolean; | ||
overlaps(r: unknown): boolean; | ||
extends(r: unknown): boolean; | ||
ifExtends(r: unknown): BaseRoot | undefined; | ||
subsumes(r: unknown): boolean; | ||
configure(meta: MetaSchema): this; | ||
@@ -60,0 +61,0 @@ describe(description: string): this; |
@@ -148,4 +148,8 @@ import { includes, inferred, omit, throwInternalError, throwParseError } from "@ark/util"; | ||
} | ||
ifExtends(r) { | ||
return this.extends(r) ? this : undefined; | ||
} | ||
subsumes(r) { | ||
return r.extends(this); | ||
const rNode = this.$.parseDefinition(r); | ||
return rNode.extends(this); | ||
} | ||
@@ -152,0 +156,0 @@ configure(meta) { |
{ | ||
"name": "@arktype/schema", | ||
"version": "0.9.0", | ||
"version": "0.10.0", | ||
"license": "MIT", | ||
@@ -32,3 +32,3 @@ "author": { | ||
"dependencies": { | ||
"@ark/util": "0.9.0" | ||
"@ark/util": "0.10.0" | ||
}, | ||
@@ -35,0 +35,0 @@ "publishConfig": { |
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
338273
7938
+ Added@ark/util@0.10.0(transitive)
- Removed@ark/util@0.9.0(transitive)
Updated@ark/util@0.10.0