@ark/attest
Advanced tools
Comparing version 0.27.0 to 0.28.0
@@ -52,3 +52,5 @@ import { snapshot, type Constructor } from "@ark/util"; | ||
toFile: (id: string, options?: ExternalSnapshotOptions) => nextAssertions<kind>; | ||
unwrap: Unwrapper<expected>; | ||
}; | ||
export type Unwrapper<expected = unknown> = (opts?: UnwrapOptions) => expected; | ||
export type comparableValueAssertion<expected, kind extends AssertionKind> = { | ||
@@ -59,7 +61,11 @@ snap: snapProperty<expected, kind>; | ||
is: (value: expected) => nextAssertions<kind>; | ||
completions: (value?: Completions) => void; | ||
completions: CompletionsSnap; | ||
satisfies: <def>(def: type.validate<def>) => nextAssertions<kind>; | ||
unknown: Omit<comparableValueAssertion<unknown, kind>, "unknown">; | ||
unwrap: (opts?: UnwrapOptions) => unknown; | ||
unwrap: Unwrapper<expected>; | ||
}; | ||
export interface CompletionsSnap { | ||
(value?: Completions): void; | ||
unwrap: Unwrapper<Completions>; | ||
} | ||
export type TypeAssertionsRoot = { | ||
@@ -71,3 +77,3 @@ type: TypeAssertionProps; | ||
errors: valueFromTypeAssertion<string | RegExp, string>; | ||
completions: (value?: Completions) => void; | ||
completions: CompletionsSnap; | ||
}; | ||
@@ -74,0 +80,0 @@ export type ExternalSnapshotOptions = { |
@@ -106,3 +106,6 @@ import { caller } from "@ark/fs"; | ||
}; | ||
return Object.assign(inline, { toFile }); | ||
return Object.assign(inline, { | ||
toFile, | ||
unwrap: this.unwrap.bind(this) | ||
}); | ||
} | ||
@@ -109,0 +112,0 @@ immediateOrChained() { |
{ | ||
"name": "@ark/attest", | ||
"version": "0.27.0", | ||
"version": "0.28.0", | ||
"license": "MIT", | ||
@@ -39,8 +39,8 @@ "author": { | ||
"@prettier/sync": "0.5.2", | ||
"arktype": "2.0.0-rc.23", | ||
"@ark/util": "0.23.0", | ||
"@ark/fs": "0.23.0" | ||
"@ark/fs": "0.24.0", | ||
"arktype": "2.0.0-rc.24", | ||
"@ark/util": "0.24.0" | ||
}, | ||
"devDependencies": { | ||
"typescript": "5.7.0-beta" | ||
"typescript": "5.7.1-rc" | ||
}, | ||
@@ -47,0 +47,0 @@ "peerDependencies": { |
142047
4377
+ Added@ark/fs@0.24.0(transitive)
+ Added@ark/schema@0.24.0(transitive)
+ Added@ark/util@0.24.0(transitive)
+ Addedarktype@2.0.0-rc.24(transitive)
- Removed@ark/fs@0.23.0(transitive)
- Removed@ark/schema@0.23.0(transitive)
- Removed@ark/util@0.23.0(transitive)
- Removedarktype@2.0.0-rc.23(transitive)
Updated@ark/fs@0.24.0
Updated@ark/util@0.24.0
Updatedarktype@2.0.0-rc.24