@ark/attest 0.56.2 → 0.56.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -79,7 +79,7 @@ Here are some simple examples of type assertions and snapshotting:
|
|
|
79
79
|
// @ark/attest assertions can be made from any unit test framework with a global setup/teardown
|
|
80
80
|
describe("attest features", () => {
|
|
81
81
|
it("type and value assertions", () => {
|
|
82
|
-
const
|
|
82
|
+
const even = type("number%2")
|
|
83
83
|
// asserts even.infer is exactly number
|
|
84
84
|
attest<number>(even.infer)
|
|
85
85
|
// make assertions about types and values seamlessly
|
|
@@ -128,11 +128,11 @@ describe("attest features", () => {
|
|
|
128
128
|
})
|
|
129
129
|
|
|
130
130
|
it("integrate runtime logic with type assertions", () => {
|
|
131
|
-
const
|
|
131
|
+
const arrayOf = type("<t>", "t[]")
|
|
132
132
|
const numericArray = arrayOf("number | bigint")
|
|
133
133
|
// flexibly combine runtime logic with type assertions to customize your
|
|
134
134
|
// tests beyond what is possible from pure static-analysis based type testing tools
|
|
135
|
-
if (
|
|
135
|
+
if (getPrimaryTsVersionUnderTest().startsWith("5")) {
|
|
136
136
|
// this assertion will only occur when testing TypeScript 5+!
|
|
137
137
|
attest<(number | bigint)[]>(numericArray.infer)
|
|
138
138
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark/attest",
|
|
3
|
-
"version": "0.56.
|
|
3
|
+
"version": "0.56.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "David Blass",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"@typescript/analyze-trace": "0.10.1",
|
|
41
41
|
"@typescript/vfs": "1.6.1",
|
|
42
42
|
"prettier": "3.6.2",
|
|
43
|
-
"@ark/
|
|
44
|
-
"@ark/
|
|
45
|
-
"arktype": "2.2.
|
|
46
|
-
"@ark/
|
|
43
|
+
"@ark/util": "0.56.4",
|
|
44
|
+
"@ark/fs": "0.56.4",
|
|
45
|
+
"arktype": "2.2.5",
|
|
46
|
+
"@ark/schema": "0.56.4"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"typescript": "5.9.3"
|