bupkis 0.18.0 → 0.18.2
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/CHANGELOG.md +14 -0
- package/package.json +1 -4
- package/src/assertion/assertion-types.ts +4 -4
- package/src/assertion/impl/async-parametric.ts +4 -21
- package/src/assertion/impl/sync-parametric.ts +5 -17
- package/src/expect.ts +0 -4
- package/src/guards.ts +24 -24
- package/src/internal-schema.ts +16 -32
- package/src/value-to-schema.ts +1 -1
- package/dist/assertion/assertion-async.cjs +0 -268
- package/dist/assertion/assertion-async.cjs.map +0 -1
- package/dist/assertion/assertion-async.d.cts +0 -40
- package/dist/assertion/assertion-async.d.cts.map +0 -1
- package/dist/assertion/assertion-async.d.ts +0 -40
- package/dist/assertion/assertion-async.d.ts.map +0 -1
- package/dist/assertion/assertion-async.js +0 -259
- package/dist/assertion/assertion-async.js.map +0 -1
- package/dist/assertion/assertion-standard-schema-async.cjs +0 -132
- package/dist/assertion/assertion-standard-schema-async.cjs.map +0 -1
- package/dist/assertion/assertion-standard-schema-async.d.cts +0 -52
- package/dist/assertion/assertion-standard-schema-async.d.cts.map +0 -1
- package/dist/assertion/assertion-standard-schema-async.d.ts +0 -52
- package/dist/assertion/assertion-standard-schema-async.d.ts.map +0 -1
- package/dist/assertion/assertion-standard-schema-async.js +0 -128
- package/dist/assertion/assertion-standard-schema-async.js.map +0 -1
- package/dist/assertion/assertion-standard-schema-sync.cjs +0 -141
- package/dist/assertion/assertion-standard-schema-sync.cjs.map +0 -1
- package/dist/assertion/assertion-standard-schema-sync.d.cts +0 -52
- package/dist/assertion/assertion-standard-schema-sync.d.cts.map +0 -1
- package/dist/assertion/assertion-standard-schema-sync.d.ts +0 -52
- package/dist/assertion/assertion-standard-schema-sync.d.ts.map +0 -1
- package/dist/assertion/assertion-standard-schema-sync.js +0 -137
- package/dist/assertion/assertion-standard-schema-sync.js.map +0 -1
- package/dist/assertion/assertion-sync.cjs +0 -284
- package/dist/assertion/assertion-sync.cjs.map +0 -1
- package/dist/assertion/assertion-sync.d.cts +0 -60
- package/dist/assertion/assertion-sync.d.cts.map +0 -1
- package/dist/assertion/assertion-sync.d.ts +0 -60
- package/dist/assertion/assertion-sync.d.ts.map +0 -1
- package/dist/assertion/assertion-sync.js +0 -275
- package/dist/assertion/assertion-sync.js.map +0 -1
- package/dist/assertion/assertion-types.cjs +0 -20
- package/dist/assertion/assertion-types.cjs.map +0 -1
- package/dist/assertion/assertion-types.d.cts +0 -1086
- package/dist/assertion/assertion-types.d.cts.map +0 -1
- package/dist/assertion/assertion-types.d.ts +0 -1086
- package/dist/assertion/assertion-types.d.ts.map +0 -1
- package/dist/assertion/assertion-types.js +0 -19
- package/dist/assertion/assertion-types.js.map +0 -1
- package/dist/assertion/assertion.cjs +0 -382
- package/dist/assertion/assertion.cjs.map +0 -1
- package/dist/assertion/assertion.d.cts +0 -109
- package/dist/assertion/assertion.d.cts.map +0 -1
- package/dist/assertion/assertion.d.ts +0 -109
- package/dist/assertion/assertion.d.ts.map +0 -1
- package/dist/assertion/assertion.js +0 -375
- package/dist/assertion/assertion.js.map +0 -1
- package/dist/assertion/create.cjs +0 -148
- package/dist/assertion/create.cjs.map +0 -1
- package/dist/assertion/create.d.cts +0 -85
- package/dist/assertion/create.d.cts.map +0 -1
- package/dist/assertion/create.d.ts +0 -85
- package/dist/assertion/create.d.ts.map +0 -1
- package/dist/assertion/create.js +0 -143
- package/dist/assertion/create.js.map +0 -1
- package/dist/assertion/format-assertion-failure.cjs +0 -63
- package/dist/assertion/format-assertion-failure.cjs.map +0 -1
- package/dist/assertion/format-assertion-failure.d.cts +0 -21
- package/dist/assertion/format-assertion-failure.d.cts.map +0 -1
- package/dist/assertion/format-assertion-failure.d.ts +0 -21
- package/dist/assertion/format-assertion-failure.d.ts.map +0 -1
- package/dist/assertion/format-assertion-failure.js +0 -59
- package/dist/assertion/format-assertion-failure.js.map +0 -1
- package/dist/assertion/impl/assertion-util.cjs +0 -68
- package/dist/assertion/impl/assertion-util.cjs.map +0 -1
- package/dist/assertion/impl/assertion-util.d.cts +0 -36
- package/dist/assertion/impl/assertion-util.d.cts.map +0 -1
- package/dist/assertion/impl/assertion-util.d.ts +0 -36
- package/dist/assertion/impl/assertion-util.d.ts.map +0 -1
- package/dist/assertion/impl/assertion-util.js +0 -62
- package/dist/assertion/impl/assertion-util.js.map +0 -1
- package/dist/assertion/impl/async-iterable.cjs +0 -627
- package/dist/assertion/impl/async-iterable.cjs.map +0 -1
- package/dist/assertion/impl/async-iterable.d.cts +0 -406
- package/dist/assertion/impl/async-iterable.d.cts.map +0 -1
- package/dist/assertion/impl/async-iterable.d.ts +0 -406
- package/dist/assertion/impl/async-iterable.d.ts.map +0 -1
- package/dist/assertion/impl/async-iterable.js +0 -624
- package/dist/assertion/impl/async-iterable.js.map +0 -1
- package/dist/assertion/impl/async-parametric.cjs +0 -423
- package/dist/assertion/impl/async-parametric.cjs.map +0 -1
- package/dist/assertion/impl/async-parametric.d.cts +0 -278
- package/dist/assertion/impl/async-parametric.d.cts.map +0 -1
- package/dist/assertion/impl/async-parametric.d.ts +0 -278
- package/dist/assertion/impl/async-parametric.d.ts.map +0 -1
- package/dist/assertion/impl/async-parametric.js +0 -420
- package/dist/assertion/impl/async-parametric.js.map +0 -1
- package/dist/assertion/impl/async.cjs +0 -56
- package/dist/assertion/impl/async.cjs.map +0 -1
- package/dist/assertion/impl/async.d.cts +0 -179
- package/dist/assertion/impl/async.d.cts.map +0 -1
- package/dist/assertion/impl/async.d.ts +0 -179
- package/dist/assertion/impl/async.d.ts.map +0 -1
- package/dist/assertion/impl/async.js +0 -39
- package/dist/assertion/impl/async.js.map +0 -1
- package/dist/assertion/impl/index.cjs +0 -37
- package/dist/assertion/impl/index.cjs.map +0 -1
- package/dist/assertion/impl/index.d.cts +0 -21
- package/dist/assertion/impl/index.d.cts.map +0 -1
- package/dist/assertion/impl/index.d.ts +0 -21
- package/dist/assertion/impl/index.d.ts.map +0 -1
- package/dist/assertion/impl/index.js +0 -21
- package/dist/assertion/impl/index.js.map +0 -1
- package/dist/assertion/impl/iteration-util.cjs +0 -297
- package/dist/assertion/impl/iteration-util.cjs.map +0 -1
- package/dist/assertion/impl/iteration-util.d.cts +0 -12
- package/dist/assertion/impl/iteration-util.d.cts.map +0 -1
- package/dist/assertion/impl/iteration-util.d.ts +0 -12
- package/dist/assertion/impl/iteration-util.d.ts.map +0 -1
- package/dist/assertion/impl/iteration-util.js +0 -282
- package/dist/assertion/impl/iteration-util.js.map +0 -1
- package/dist/assertion/impl/snapshot.cjs +0 -276
- package/dist/assertion/impl/snapshot.cjs.map +0 -1
- package/dist/assertion/impl/snapshot.d.cts +0 -278
- package/dist/assertion/impl/snapshot.d.cts.map +0 -1
- package/dist/assertion/impl/snapshot.d.ts +0 -278
- package/dist/assertion/impl/snapshot.d.ts.map +0 -1
- package/dist/assertion/impl/snapshot.js +0 -273
- package/dist/assertion/impl/snapshot.js.map +0 -1
- package/dist/assertion/impl/sync-basic.cjs +0 -553
- package/dist/assertion/impl/sync-basic.cjs.map +0 -1
- package/dist/assertion/impl/sync-basic.d.cts +0 -528
- package/dist/assertion/impl/sync-basic.d.cts.map +0 -1
- package/dist/assertion/impl/sync-basic.d.ts +0 -528
- package/dist/assertion/impl/sync-basic.d.ts.map +0 -1
- package/dist/assertion/impl/sync-basic.js +0 -550
- package/dist/assertion/impl/sync-basic.js.map +0 -1
- package/dist/assertion/impl/sync-collection.cjs +0 -856
- package/dist/assertion/impl/sync-collection.cjs.map +0 -1
- package/dist/assertion/impl/sync-collection.d.cts +0 -607
- package/dist/assertion/impl/sync-collection.d.cts.map +0 -1
- package/dist/assertion/impl/sync-collection.d.ts +0 -607
- package/dist/assertion/impl/sync-collection.d.ts.map +0 -1
- package/dist/assertion/impl/sync-collection.js +0 -850
- package/dist/assertion/impl/sync-collection.js.map +0 -1
- package/dist/assertion/impl/sync-date.cjs +0 -341
- package/dist/assertion/impl/sync-date.cjs.map +0 -1
- package/dist/assertion/impl/sync-date.d.cts +0 -209
- package/dist/assertion/impl/sync-date.d.cts.map +0 -1
- package/dist/assertion/impl/sync-date.d.ts +0 -209
- package/dist/assertion/impl/sync-date.d.ts.map +0 -1
- package/dist/assertion/impl/sync-date.js +0 -338
- package/dist/assertion/impl/sync-date.js.map +0 -1
- package/dist/assertion/impl/sync-esoteric.cjs +0 -214
- package/dist/assertion/impl/sync-esoteric.cjs.map +0 -1
- package/dist/assertion/impl/sync-esoteric.d.cts +0 -191
- package/dist/assertion/impl/sync-esoteric.d.cts.map +0 -1
- package/dist/assertion/impl/sync-esoteric.d.ts +0 -191
- package/dist/assertion/impl/sync-esoteric.d.ts.map +0 -1
- package/dist/assertion/impl/sync-esoteric.js +0 -211
- package/dist/assertion/impl/sync-esoteric.js.map +0 -1
- package/dist/assertion/impl/sync-iterable.cjs +0 -512
- package/dist/assertion/impl/sync-iterable.cjs.map +0 -1
- package/dist/assertion/impl/sync-iterable.d.cts +0 -334
- package/dist/assertion/impl/sync-iterable.d.cts.map +0 -1
- package/dist/assertion/impl/sync-iterable.d.ts +0 -334
- package/dist/assertion/impl/sync-iterable.d.ts.map +0 -1
- package/dist/assertion/impl/sync-iterable.js +0 -509
- package/dist/assertion/impl/sync-iterable.js.map +0 -1
- package/dist/assertion/impl/sync-parametric.cjs +0 -812
- package/dist/assertion/impl/sync-parametric.cjs.map +0 -1
- package/dist/assertion/impl/sync-parametric.d.cts +0 -560
- package/dist/assertion/impl/sync-parametric.d.cts.map +0 -1
- package/dist/assertion/impl/sync-parametric.d.ts +0 -560
- package/dist/assertion/impl/sync-parametric.d.ts.map +0 -1
- package/dist/assertion/impl/sync-parametric.js +0 -809
- package/dist/assertion/impl/sync-parametric.js.map +0 -1
- package/dist/assertion/impl/sync.cjs +0 -214
- package/dist/assertion/impl/sync.cjs.map +0 -1
- package/dist/assertion/impl/sync.d.cts +0 -512
- package/dist/assertion/impl/sync.d.cts.map +0 -1
- package/dist/assertion/impl/sync.d.ts +0 -512
- package/dist/assertion/impl/sync.d.ts.map +0 -1
- package/dist/assertion/impl/sync.js +0 -197
- package/dist/assertion/impl/sync.js.map +0 -1
- package/dist/assertion/index.cjs +0 -38
- package/dist/assertion/index.cjs.map +0 -1
- package/dist/assertion/index.d.cts +0 -18
- package/dist/assertion/index.d.cts.map +0 -1
- package/dist/assertion/index.d.ts +0 -18
- package/dist/assertion/index.d.ts.map +0 -1
- package/dist/assertion/index.js +0 -17
- package/dist/assertion/index.js.map +0 -1
- package/dist/assertion/slotify.cjs +0 -165
- package/dist/assertion/slotify.cjs.map +0 -1
- package/dist/assertion/slotify.d.cts +0 -11
- package/dist/assertion/slotify.d.cts.map +0 -1
- package/dist/assertion/slotify.d.ts +0 -11
- package/dist/assertion/slotify.d.ts.map +0 -1
- package/dist/assertion/slotify.js +0 -161
- package/dist/assertion/slotify.js.map +0 -1
- package/dist/bootstrap.cjs +0 -43
- package/dist/bootstrap.cjs.map +0 -1
- package/dist/bootstrap.d.cts +0 -27
- package/dist/bootstrap.d.cts.map +0 -1
- package/dist/bootstrap.d.ts +0 -27
- package/dist/bootstrap.d.ts.map +0 -1
- package/dist/bootstrap.js +0 -40
- package/dist/bootstrap.js.map +0 -1
- package/dist/constant.cjs +0 -82
- package/dist/constant.cjs.map +0 -1
- package/dist/constant.d.cts +0 -69
- package/dist/constant.d.cts.map +0 -1
- package/dist/constant.d.ts +0 -69
- package/dist/constant.d.ts.map +0 -1
- package/dist/constant.js +0 -79
- package/dist/constant.js.map +0 -1
- package/dist/diff.cjs +0 -340
- package/dist/diff.cjs.map +0 -1
- package/dist/diff.d.cts +0 -51
- package/dist/diff.d.cts.map +0 -1
- package/dist/diff.d.ts +0 -51
- package/dist/diff.d.ts.map +0 -1
- package/dist/diff.js +0 -334
- package/dist/diff.js.map +0 -1
- package/dist/error.cjs +0 -204
- package/dist/error.cjs.map +0 -1
- package/dist/error.d.cts +0 -212
- package/dist/error.d.cts.map +0 -1
- package/dist/error.d.ts +0 -212
- package/dist/error.d.ts.map +0 -1
- package/dist/error.js +0 -191
- package/dist/error.js.map +0 -1
- package/dist/expect.cjs +0 -590
- package/dist/expect.cjs.map +0 -1
- package/dist/expect.d.cts +0 -138
- package/dist/expect.d.cts.map +0 -1
- package/dist/expect.d.ts +0 -138
- package/dist/expect.d.ts.map +0 -1
- package/dist/expect.js +0 -582
- package/dist/expect.js.map +0 -1
- package/dist/guards.cjs +0 -297
- package/dist/guards.cjs.map +0 -1
- package/dist/guards.d.cts +0 -231
- package/dist/guards.d.cts.map +0 -1
- package/dist/guards.d.ts +0 -231
- package/dist/guards.d.ts.map +0 -1
- package/dist/guards.js +0 -277
- package/dist/guards.js.map +0 -1
- package/dist/index.cjs +0 -111
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -448
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.ts +0 -448
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -71
- package/dist/index.js.map +0 -1
- package/dist/internal-schema.cjs +0 -253
- package/dist/internal-schema.cjs.map +0 -1
- package/dist/internal-schema.d.cts +0 -8
- package/dist/internal-schema.d.cts.map +0 -1
- package/dist/internal-schema.d.ts +0 -8
- package/dist/internal-schema.d.ts.map +0 -1
- package/dist/internal-schema.js +0 -248
- package/dist/internal-schema.js.map +0 -1
- package/dist/metadata.cjs +0 -57
- package/dist/metadata.cjs.map +0 -1
- package/dist/metadata.d.cts +0 -27
- package/dist/metadata.d.cts.map +0 -1
- package/dist/metadata.d.ts +0 -27
- package/dist/metadata.d.ts.map +0 -1
- package/dist/metadata.js +0 -54
- package/dist/metadata.js.map +0 -1
- package/dist/schema.cjs +0 -1522
- package/dist/schema.cjs.map +0 -1
- package/dist/schema.d.cts +0 -1196
- package/dist/schema.d.cts.map +0 -1
- package/dist/schema.d.ts +0 -1196
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -1516
- package/dist/schema.js.map +0 -1
- package/dist/snapshot/adapter.cjs +0 -31
- package/dist/snapshot/adapter.cjs.map +0 -1
- package/dist/snapshot/adapter.d.cts +0 -258
- package/dist/snapshot/adapter.d.cts.map +0 -1
- package/dist/snapshot/adapter.d.ts +0 -258
- package/dist/snapshot/adapter.d.ts.map +0 -1
- package/dist/snapshot/adapter.js +0 -27
- package/dist/snapshot/adapter.js.map +0 -1
- package/dist/snapshot/adapters/fallback.cjs +0 -453
- package/dist/snapshot/adapters/fallback.cjs.map +0 -1
- package/dist/snapshot/adapters/fallback.d.cts +0 -185
- package/dist/snapshot/adapters/fallback.d.cts.map +0 -1
- package/dist/snapshot/adapters/fallback.d.ts +0 -185
- package/dist/snapshot/adapters/fallback.d.ts.map +0 -1
- package/dist/snapshot/adapters/fallback.js +0 -446
- package/dist/snapshot/adapters/fallback.js.map +0 -1
- package/dist/snapshot/adapters/node-test.cjs +0 -301
- package/dist/snapshot/adapters/node-test.cjs.map +0 -1
- package/dist/snapshot/adapters/node-test.d.cts +0 -131
- package/dist/snapshot/adapters/node-test.d.cts.map +0 -1
- package/dist/snapshot/adapters/node-test.d.ts +0 -131
- package/dist/snapshot/adapters/node-test.d.ts.map +0 -1
- package/dist/snapshot/adapters/node-test.js +0 -297
- package/dist/snapshot/adapters/node-test.js.map +0 -1
- package/dist/snapshot/index.cjs +0 -61
- package/dist/snapshot/index.cjs.map +0 -1
- package/dist/snapshot/index.d.cts +0 -40
- package/dist/snapshot/index.d.cts.map +0 -1
- package/dist/snapshot/index.d.ts +0 -40
- package/dist/snapshot/index.d.ts.map +0 -1
- package/dist/snapshot/index.js +0 -44
- package/dist/snapshot/index.js.map +0 -1
- package/dist/snapshot/node-version.cjs +0 -49
- package/dist/snapshot/node-version.cjs.map +0 -1
- package/dist/snapshot/node-version.d.cts +0 -34
- package/dist/snapshot/node-version.d.cts.map +0 -1
- package/dist/snapshot/node-version.d.ts +0 -34
- package/dist/snapshot/node-version.d.ts.map +0 -1
- package/dist/snapshot/node-version.js +0 -44
- package/dist/snapshot/node-version.js.map +0 -1
- package/dist/snapshot/select-adapter.cjs +0 -170
- package/dist/snapshot/select-adapter.cjs.map +0 -1
- package/dist/snapshot/select-adapter.d.cts +0 -128
- package/dist/snapshot/select-adapter.d.cts.map +0 -1
- package/dist/snapshot/select-adapter.d.ts +0 -128
- package/dist/snapshot/select-adapter.d.ts.map +0 -1
- package/dist/snapshot/select-adapter.js +0 -164
- package/dist/snapshot/select-adapter.js.map +0 -1
- package/dist/snapshot/serializer.cjs +0 -246
- package/dist/snapshot/serializer.cjs.map +0 -1
- package/dist/snapshot/serializer.d.cts +0 -126
- package/dist/snapshot/serializer.d.cts.map +0 -1
- package/dist/snapshot/serializer.d.ts +0 -126
- package/dist/snapshot/serializer.d.ts.map +0 -1
- package/dist/snapshot/serializer.js +0 -238
- package/dist/snapshot/serializer.js.map +0 -1
- package/dist/standard-schema.cjs +0 -13
- package/dist/standard-schema.cjs.map +0 -1
- package/dist/standard-schema.d.cts +0 -192
- package/dist/standard-schema.d.cts.map +0 -1
- package/dist/standard-schema.d.ts +0 -192
- package/dist/standard-schema.d.ts.map +0 -1
- package/dist/standard-schema.js +0 -12
- package/dist/standard-schema.js.map +0 -1
- package/dist/types.cjs +0 -22
- package/dist/types.cjs.map +0 -1
- package/dist/types.d.cts +0 -905
- package/dist/types.d.cts.map +0 -1
- package/dist/types.d.ts +0 -905
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -21
- package/dist/types.js.map +0 -1
- package/dist/use.cjs +0 -240
- package/dist/use.cjs.map +0 -1
- package/dist/use.d.cts +0 -8
- package/dist/use.d.cts.map +0 -1
- package/dist/use.d.ts +0 -8
- package/dist/use.d.ts.map +0 -1
- package/dist/use.js +0 -236
- package/dist/use.js.map +0 -1
- package/dist/util.cjs +0 -255
- package/dist/util.cjs.map +0 -1
- package/dist/util.d.cts +0 -141
- package/dist/util.d.cts.map +0 -1
- package/dist/util.d.ts +0 -141
- package/dist/util.d.ts.map +0 -1
- package/dist/util.js +0 -234
- package/dist/util.js.map +0 -1
- package/dist/value-to-schema.cjs +0 -537
- package/dist/value-to-schema.cjs.map +0 -1
- package/dist/value-to-schema.d.cts +0 -144
- package/dist/value-to-schema.d.cts.map +0 -1
- package/dist/value-to-schema.d.ts +0 -144
- package/dist/value-to-schema.d.ts.map +0 -1
- package/dist/value-to-schema.js +0 -533
- package/dist/value-to-schema.js.map +0 -1
|
@@ -1,528 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Basic type and primitive value assertions.
|
|
3
|
-
*
|
|
4
|
-
* These are the fundamental building blocks for type checking including
|
|
5
|
-
* strings, numbers, booleans, arrays, objects, functions, and other primitive
|
|
6
|
-
* JavaScript types.
|
|
7
|
-
*
|
|
8
|
-
* @packageDocumentation
|
|
9
|
-
* @groupDescription Basic Assertions
|
|
10
|
-
* Fundamental type checking and primitive value validation.
|
|
11
|
-
*
|
|
12
|
-
* @showGroups
|
|
13
|
-
*/
|
|
14
|
-
import { z } from 'zod';
|
|
15
|
-
/**
|
|
16
|
-
* Asserts that the subject is a string value.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
*
|
|
20
|
-
* ```ts
|
|
21
|
-
* expect('hello', 'to be a string'); // passes
|
|
22
|
-
* expect(42, 'to be a string'); // fails
|
|
23
|
-
* ```
|
|
24
|
-
*
|
|
25
|
-
* @group Basic Assertions
|
|
26
|
-
* @bupkisAnchor unknown-to-be-a-string
|
|
27
|
-
* @bupkisAssertionCategory primitives
|
|
28
|
-
*/
|
|
29
|
-
export declare const stringAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be a string"], z.ZodString, never>;
|
|
30
|
-
/**
|
|
31
|
-
* Asserts that the subject is a finite number value.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
*
|
|
35
|
-
* ```ts
|
|
36
|
-
* expect(42, 'to be a number'); // passes
|
|
37
|
-
* expect(Infinity, 'to be a number'); // fails
|
|
38
|
-
* expect('42', 'to be a number'); // fails
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @group Basic Assertions
|
|
42
|
-
*/
|
|
43
|
-
export declare const numberAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a number", "to be finite"]], z.ZodNumber, never>;
|
|
44
|
-
/**
|
|
45
|
-
* Asserts that the subject is either positive or negative infinity.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
*
|
|
49
|
-
* ```ts
|
|
50
|
-
* expect(Infinity, 'to be infinite'); // passes
|
|
51
|
-
* expect(-Infinity, 'to be infinite'); // passes
|
|
52
|
-
* expect(42, 'to be infinite'); // fails
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* @group Basic Assertions
|
|
56
|
-
*/
|
|
57
|
-
export declare const infiniteAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be infinite"], z.ZodUnion<[z.ZodLiteral<number>, z.ZodLiteral<number>]>, never>;
|
|
58
|
-
/**
|
|
59
|
-
* Asserts that the subject is positive infinity.
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
*
|
|
63
|
-
* ```ts
|
|
64
|
-
* expect(Infinity, 'to be Infinity'); // passes
|
|
65
|
-
* expect(-Infinity, 'to be Infinity'); // fails
|
|
66
|
-
* ```
|
|
67
|
-
*
|
|
68
|
-
* @group Basic Assertions
|
|
69
|
-
*/
|
|
70
|
-
export declare const positiveInfinityAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be Infinity"], z.ZodLiteral<number>, never>;
|
|
71
|
-
/**
|
|
72
|
-
* Asserts that the subject is negative infinity.
|
|
73
|
-
*
|
|
74
|
-
* @example
|
|
75
|
-
*
|
|
76
|
-
* ```ts
|
|
77
|
-
* expect(-Infinity, 'to be -Infinity'); // passes
|
|
78
|
-
* expect(Infinity, 'to be -Infinity'); // fails
|
|
79
|
-
* ```
|
|
80
|
-
*
|
|
81
|
-
* @group Basic Assertions
|
|
82
|
-
*/
|
|
83
|
-
export declare const negativeInfinityAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be -Infinity"], z.ZodLiteral<number>, never>;
|
|
84
|
-
/**
|
|
85
|
-
* Asserts that the subject is a boolean value.
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
*
|
|
89
|
-
* ```ts
|
|
90
|
-
* expect(true, 'to be a boolean'); // passes
|
|
91
|
-
* expect('true', 'to be a boolean'); // fails
|
|
92
|
-
* ```
|
|
93
|
-
*
|
|
94
|
-
* @group Basic Assertions
|
|
95
|
-
*/
|
|
96
|
-
export declare const booleanAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a boolean", "to be boolean", "to be a bool"]], z.ZodBoolean, never>;
|
|
97
|
-
/**
|
|
98
|
-
* Asserts that the subject is a positive number.
|
|
99
|
-
*
|
|
100
|
-
* @example
|
|
101
|
-
*
|
|
102
|
-
* ```ts
|
|
103
|
-
* expect(42, 'to be positive'); // passes
|
|
104
|
-
* expect(-1, 'to be positive'); // fails
|
|
105
|
-
* expect(0, 'to be positive'); // fails
|
|
106
|
-
* ```
|
|
107
|
-
*
|
|
108
|
-
* @group Basic Assertions
|
|
109
|
-
*/
|
|
110
|
-
export declare const positiveAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be positive", "to be a positive number"]], z.ZodNumber, never>;
|
|
111
|
-
/**
|
|
112
|
-
* Asserts that the subject is a positive integer.
|
|
113
|
-
*
|
|
114
|
-
* @example
|
|
115
|
-
*
|
|
116
|
-
* ```ts
|
|
117
|
-
* expect(42, 'to be a positive integer'); // passes
|
|
118
|
-
* expect(-1, 'to be a positive integer'); // fails
|
|
119
|
-
* expect(42.5, 'to be a positive integer'); // fails
|
|
120
|
-
* ```
|
|
121
|
-
*
|
|
122
|
-
* @group Basic Assertions
|
|
123
|
-
*/
|
|
124
|
-
export declare const positiveIntegerAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a positive integer", "to be a positive int"]], z.ZodNumber, never>;
|
|
125
|
-
/**
|
|
126
|
-
* Asserts that the subject is a negative number.
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
*
|
|
130
|
-
* ```ts
|
|
131
|
-
* expect(-42, 'to be negative'); // passes
|
|
132
|
-
* expect(1, 'to be negative'); // fails
|
|
133
|
-
* expect(0, 'to be negative'); // fails
|
|
134
|
-
* ```
|
|
135
|
-
*
|
|
136
|
-
* @group Basic Assertions
|
|
137
|
-
*/
|
|
138
|
-
export declare const negativeAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be negative", "to be a negative number"]], z.ZodNumber, never>;
|
|
139
|
-
/**
|
|
140
|
-
* Asserts that the subject is a negative integer.
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
*
|
|
144
|
-
* ```ts
|
|
145
|
-
* expect(-42, 'to be a negative integer'); // passes
|
|
146
|
-
* expect(1, 'to be a negative integer'); // fails
|
|
147
|
-
* expect(-42.5, 'to be a negative integer'); // fails
|
|
148
|
-
* ```
|
|
149
|
-
*
|
|
150
|
-
* @group Basic Assertions
|
|
151
|
-
*/
|
|
152
|
-
export declare const negativeIntegerAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a negative integer", "to be a negative int"]], z.ZodNumber, never>;
|
|
153
|
-
/**
|
|
154
|
-
* Asserts that the subject is exactly the boolean value true.
|
|
155
|
-
*
|
|
156
|
-
* @example
|
|
157
|
-
*
|
|
158
|
-
* ```ts
|
|
159
|
-
* expect(true, 'to be true'); // passes
|
|
160
|
-
* expect(false, 'to be true'); // fails
|
|
161
|
-
* expect(1, 'to be true'); // fails
|
|
162
|
-
* ```
|
|
163
|
-
*
|
|
164
|
-
* @group Basic Assertions
|
|
165
|
-
*/
|
|
166
|
-
export declare const trueAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be true"], z.ZodLiteral<true>, never>;
|
|
167
|
-
/**
|
|
168
|
-
* Asserts that the subject is exactly the boolean value false.
|
|
169
|
-
*
|
|
170
|
-
* @example
|
|
171
|
-
*
|
|
172
|
-
* ```ts
|
|
173
|
-
* expect(false, 'to be false'); // passes
|
|
174
|
-
* expect(true, 'to be false'); // fails
|
|
175
|
-
* expect(0, 'to be false'); // fails
|
|
176
|
-
* ```
|
|
177
|
-
*
|
|
178
|
-
* @group Basic Assertions
|
|
179
|
-
*/
|
|
180
|
-
export declare const falseAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be false"], z.ZodLiteral<false>, never>;
|
|
181
|
-
/**
|
|
182
|
-
* Asserts that the subject is a BigInt value.
|
|
183
|
-
*
|
|
184
|
-
* @example
|
|
185
|
-
*
|
|
186
|
-
* ```ts
|
|
187
|
-
* expect(123n, 'to be a bigint'); // passes
|
|
188
|
-
* expect(123, 'to be a bigint'); // fails
|
|
189
|
-
* ```
|
|
190
|
-
*
|
|
191
|
-
* @group Basic Assertions
|
|
192
|
-
*/
|
|
193
|
-
export declare const bigintAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a bigint", "to be a BigInt"]], z.ZodBigInt, never>;
|
|
194
|
-
/**
|
|
195
|
-
* Asserts that the subject is a Symbol.
|
|
196
|
-
*
|
|
197
|
-
* @example
|
|
198
|
-
*
|
|
199
|
-
* ```ts
|
|
200
|
-
* expect(Symbol('test'), 'to be a symbol'); // passes
|
|
201
|
-
* expect('symbol', 'to be a symbol'); // fails
|
|
202
|
-
* ```
|
|
203
|
-
*
|
|
204
|
-
* @group Basic Assertions
|
|
205
|
-
*/
|
|
206
|
-
export declare const symbolAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a symbol", "to be a Symbol"]], z.ZodSymbol, never>;
|
|
207
|
-
/**
|
|
208
|
-
* Asserts that the subject is a function.
|
|
209
|
-
*
|
|
210
|
-
* @example
|
|
211
|
-
*
|
|
212
|
-
* ```ts
|
|
213
|
-
* expect(() => {}, 'to be a function'); // passes
|
|
214
|
-
* expect('function', 'to be a function'); // fails
|
|
215
|
-
* ```
|
|
216
|
-
*
|
|
217
|
-
* @group Basic Assertions
|
|
218
|
-
*/
|
|
219
|
-
export declare const functionAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be a function"], z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, never>;
|
|
220
|
-
/**
|
|
221
|
-
* Asserts that the subject is an async function.
|
|
222
|
-
*
|
|
223
|
-
* @example
|
|
224
|
-
*
|
|
225
|
-
* ```ts
|
|
226
|
-
* expect(async () => {}, 'to be an async function'); // passes
|
|
227
|
-
* expect(() => {}, 'to be an async function'); // fails
|
|
228
|
-
* ```
|
|
229
|
-
*
|
|
230
|
-
* @group Basic Assertions
|
|
231
|
-
*/
|
|
232
|
-
export declare const asyncFunctionAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be an async function"], z.ZodCustom<(...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("../../types.js").MutableOrReadonly<unknown[]>) => unknown>, never>;
|
|
233
|
-
/**
|
|
234
|
-
* Asserts that the subject is NaN (Not a Number).
|
|
235
|
-
*
|
|
236
|
-
* @example
|
|
237
|
-
*
|
|
238
|
-
* ```ts
|
|
239
|
-
* expect(NaN, 'to be NaN'); // passes
|
|
240
|
-
* expect(42, 'to be NaN'); // fails
|
|
241
|
-
* expect('not a number', 'to be NaN'); // fails
|
|
242
|
-
* ```
|
|
243
|
-
*
|
|
244
|
-
* @group Basic Assertions
|
|
245
|
-
*/
|
|
246
|
-
export declare const nanAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be NaN"], z.ZodNaN, never>;
|
|
247
|
-
/**
|
|
248
|
-
* Asserts that the subject is an integer (safe integer).
|
|
249
|
-
*
|
|
250
|
-
* @example
|
|
251
|
-
*
|
|
252
|
-
* ```ts
|
|
253
|
-
* expect(42, 'to be an integer'); // passes
|
|
254
|
-
* expect(42.5, 'to be an integer'); // fails
|
|
255
|
-
* ```
|
|
256
|
-
*
|
|
257
|
-
* @group Basic Assertions
|
|
258
|
-
*/
|
|
259
|
-
export declare const integerAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be an integer", "to be a safe integer", "to be an int", "to be a safe int"]], z.ZodNumber, never>;
|
|
260
|
-
/**
|
|
261
|
-
* Asserts that the subject is null.
|
|
262
|
-
*
|
|
263
|
-
* @example
|
|
264
|
-
*
|
|
265
|
-
* ```ts
|
|
266
|
-
* expect(null, 'to be null'); // passes
|
|
267
|
-
* expect(undefined, 'to be null'); // fails
|
|
268
|
-
* ```
|
|
269
|
-
*
|
|
270
|
-
* @group Basic Assertions
|
|
271
|
-
*/
|
|
272
|
-
export declare const nullAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be null"], z.ZodNull, never>;
|
|
273
|
-
/**
|
|
274
|
-
* Asserts that the subject is undefined.
|
|
275
|
-
*
|
|
276
|
-
* @example
|
|
277
|
-
*
|
|
278
|
-
* ```ts
|
|
279
|
-
* expect(undefined, 'to be undefined'); // passes
|
|
280
|
-
* expect(null, 'to be undefined'); // fails
|
|
281
|
-
* ```
|
|
282
|
-
*
|
|
283
|
-
* @group Basic Assertions
|
|
284
|
-
*/
|
|
285
|
-
export declare const undefinedAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be undefined"], z.ZodUndefined, never>;
|
|
286
|
-
/**
|
|
287
|
-
* Asserts that the subject is an array.
|
|
288
|
-
*
|
|
289
|
-
* @example
|
|
290
|
-
*
|
|
291
|
-
* ```ts
|
|
292
|
-
* expect([1, 2, 3], 'to be an array'); // passes
|
|
293
|
-
* expect('array', 'to be an array'); // fails
|
|
294
|
-
* ```
|
|
295
|
-
*
|
|
296
|
-
* @group Basic Assertions
|
|
297
|
-
*/
|
|
298
|
-
export declare const arrayAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be an array", "to be array"]], z.ZodArray<z.ZodUnknown>, never>;
|
|
299
|
-
/**
|
|
300
|
-
* Asserts that the subject is a Date object.
|
|
301
|
-
*
|
|
302
|
-
* @example
|
|
303
|
-
*
|
|
304
|
-
* ```ts
|
|
305
|
-
* expect(new Date(), 'to be a date'); // passes
|
|
306
|
-
* expect('2023-01-01', 'to be a date'); // fails
|
|
307
|
-
* ```
|
|
308
|
-
*
|
|
309
|
-
* @group Basic Assertions
|
|
310
|
-
*/
|
|
311
|
-
export declare const dateAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a date", "to be a Date"]], z.ZodDate, never>;
|
|
312
|
-
/**
|
|
313
|
-
* Asserts that the subject is a class constructor (constructible function).
|
|
314
|
-
*
|
|
315
|
-
* @example
|
|
316
|
-
*
|
|
317
|
-
* ```ts
|
|
318
|
-
* expect(Date, 'to be a class'); // passes
|
|
319
|
-
* expect(() => {}, 'to be a class'); // fails
|
|
320
|
-
* ```
|
|
321
|
-
*
|
|
322
|
-
* @group Basic Assertions
|
|
323
|
-
*/
|
|
324
|
-
export declare const classAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a class", "to be a constructor", "to be constructible"]], z.ZodCustom<import("../../types.js").Constructor, import("../../types.js").Constructor>, never>;
|
|
325
|
-
/**
|
|
326
|
-
* Asserts that the subject is a primitive value (string, number, boolean, null,
|
|
327
|
-
* undefined, symbol, or bigint).
|
|
328
|
-
*
|
|
329
|
-
* @example
|
|
330
|
-
*
|
|
331
|
-
* ```ts
|
|
332
|
-
* expect('hello', 'to be a primitive'); // passes
|
|
333
|
-
* expect({}, 'to be a primitive'); // fails
|
|
334
|
-
* ```
|
|
335
|
-
*
|
|
336
|
-
* @group Basic Assertions
|
|
337
|
-
*/
|
|
338
|
-
export declare const primitiveAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be a primitive"], z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodBigInt, z.ZodSymbol, z.ZodNull, z.ZodUndefined]>, never>;
|
|
339
|
-
/**
|
|
340
|
-
* Asserts that the subject is a regular expression.
|
|
341
|
-
*
|
|
342
|
-
* @example
|
|
343
|
-
*
|
|
344
|
-
* ```ts
|
|
345
|
-
* expect(/test/, 'to be a RegExp'); // passes
|
|
346
|
-
* expect('test', 'to be a RegExp'); // fails
|
|
347
|
-
* ```
|
|
348
|
-
*
|
|
349
|
-
* @group Basic Assertions
|
|
350
|
-
*/
|
|
351
|
-
export declare const regexpAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a RegExp", "to be a regex", "to be a regexp"]], z.ZodCustom<RegExp, RegExp>, never>;
|
|
352
|
-
/**
|
|
353
|
-
* Asserts that the subject is truthy (not false, 0, '', null, undefined, or
|
|
354
|
-
* NaN).
|
|
355
|
-
*
|
|
356
|
-
* @example
|
|
357
|
-
*
|
|
358
|
-
* ```ts
|
|
359
|
-
* expect('hello', 'to be truthy'); // passes
|
|
360
|
-
* expect('', 'to be truthy'); // fails
|
|
361
|
-
* ```
|
|
362
|
-
*
|
|
363
|
-
* @group Basic Assertions
|
|
364
|
-
*/
|
|
365
|
-
export declare const truthyAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be truthy", "to exist", "to be ok"]], z.ZodNonOptional<z.ZodAny>, never>;
|
|
366
|
-
/**
|
|
367
|
-
* Asserts that the subject is falsy (false, 0, '', null, undefined, or NaN).
|
|
368
|
-
*
|
|
369
|
-
* @example
|
|
370
|
-
*
|
|
371
|
-
* ```ts
|
|
372
|
-
* expect('', 'to be falsy'); // passes
|
|
373
|
-
* expect('hello', 'to be falsy'); // fails
|
|
374
|
-
* ```
|
|
375
|
-
*
|
|
376
|
-
* @group Basic Assertions
|
|
377
|
-
*/
|
|
378
|
-
export declare const falsyAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be falsy"], z.ZodNullable<z.ZodAny>, never>;
|
|
379
|
-
/**
|
|
380
|
-
* Asserts that the subject is an object (non-null object type).
|
|
381
|
-
*
|
|
382
|
-
* @example
|
|
383
|
-
*
|
|
384
|
-
* ```ts
|
|
385
|
-
* expect({}, 'to be an object'); // passes
|
|
386
|
-
* expect(null, 'to be an object'); // fails
|
|
387
|
-
* expect('string', 'to be an object'); // fails
|
|
388
|
-
* ```
|
|
389
|
-
*
|
|
390
|
-
* @group Basic Assertions
|
|
391
|
-
*/
|
|
392
|
-
export declare const objectAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be an object"], z.ZodNonOptional<z.ZodUnknown> & z.ZodType<object, unknown, z.core.$ZodTypeInternals<object, unknown>>, never>;
|
|
393
|
-
/**
|
|
394
|
-
* Asserts that the subject is a record (plain object with string/symbol/number
|
|
395
|
-
* keys).
|
|
396
|
-
*
|
|
397
|
-
* @example
|
|
398
|
-
*
|
|
399
|
-
* ```ts
|
|
400
|
-
* expect({ key: 'value' }, 'to be a record'); // passes
|
|
401
|
-
* expect([], 'to be a record'); // fails
|
|
402
|
-
* ```
|
|
403
|
-
*
|
|
404
|
-
* @group Basic Assertions
|
|
405
|
-
*/
|
|
406
|
-
export declare const recordAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be a record", "to be a plain object"]], z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, never>;
|
|
407
|
-
/**
|
|
408
|
-
* Asserts that an array is empty.
|
|
409
|
-
*
|
|
410
|
-
* @example
|
|
411
|
-
*
|
|
412
|
-
* ```ts
|
|
413
|
-
* expect([], 'to be empty'); // passes
|
|
414
|
-
* expect([1, 2], 'to be empty'); // fails
|
|
415
|
-
* ```
|
|
416
|
-
*
|
|
417
|
-
* @group Basic Assertions
|
|
418
|
-
*/
|
|
419
|
-
export declare const emptyArrayAssertion: import("../assertion-types.js").AssertionFunctionSync<readonly [z.ZodCustom<ArrayLike<unknown>, ArrayLike<unknown>>, "to be empty"], (subject: ArrayLike<unknown>) => {
|
|
420
|
-
actual: number;
|
|
421
|
-
expected: number;
|
|
422
|
-
message: string;
|
|
423
|
-
} | undefined, readonly [z.ZodCustom<ArrayLike<unknown>, ArrayLike<unknown>>, import("../assertion-types.js").PhraseLiteralSlot<"to be empty">]>;
|
|
424
|
-
/**
|
|
425
|
-
* Asserts that an object is empty (has no own properties).
|
|
426
|
-
*
|
|
427
|
-
* @example
|
|
428
|
-
*
|
|
429
|
-
* ```ts
|
|
430
|
-
* expect({}, 'to be empty'); // passes
|
|
431
|
-
* expect({ key: 'value' }, 'to be empty'); // fails
|
|
432
|
-
* ```
|
|
433
|
-
*
|
|
434
|
-
* @group Basic Assertions
|
|
435
|
-
*/
|
|
436
|
-
export declare const emptyObjectAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, "to be empty"], z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, readonly [z.ZodRecord<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodSymbol]>, z.ZodUnknown>, import("../assertion-types.js").PhraseLiteralSlot<"to be empty">]>;
|
|
437
|
-
/**
|
|
438
|
-
* Asserts that the subject is an Error instance.
|
|
439
|
-
*
|
|
440
|
-
* @example
|
|
441
|
-
*
|
|
442
|
-
* ```ts
|
|
443
|
-
* expect(new Error('test'), 'to be an Error'); // passes
|
|
444
|
-
* expect('error', 'to be an Error'); // fails
|
|
445
|
-
* ```
|
|
446
|
-
*
|
|
447
|
-
* @group Basic Assertions
|
|
448
|
-
*/
|
|
449
|
-
export declare const errorAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [readonly ["to be an Error", "to be a Error"]], z.ZodCustom<Error, Error>, never>;
|
|
450
|
-
/**
|
|
451
|
-
* Asserts that a string is empty.
|
|
452
|
-
*
|
|
453
|
-
* @example
|
|
454
|
-
*
|
|
455
|
-
* ```ts
|
|
456
|
-
* expect('', 'to be empty'); // passes
|
|
457
|
-
* expect('hello', 'to be empty'); // fails
|
|
458
|
-
* ```
|
|
459
|
-
*
|
|
460
|
-
* @group Basic Assertions
|
|
461
|
-
*/
|
|
462
|
-
export declare const emptyStringAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [z.ZodString, "to be empty"], z.ZodString, readonly [z.ZodString, import("../assertion-types.js").PhraseLiteralSlot<"to be empty">]>;
|
|
463
|
-
/**
|
|
464
|
-
* Asserts that a string is non-empty.
|
|
465
|
-
*
|
|
466
|
-
* @example
|
|
467
|
-
*
|
|
468
|
-
* ```ts
|
|
469
|
-
* expect('hello', 'to be non-empty'); // passes
|
|
470
|
-
* expect('', 'to be non-empty'); // fails
|
|
471
|
-
* ```
|
|
472
|
-
*
|
|
473
|
-
* @group Basic Assertions
|
|
474
|
-
*/
|
|
475
|
-
export declare const nonEmptyStringAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly [z.ZodString, "to be non-empty"], z.ZodString, readonly [z.ZodString, import("../assertion-types.js").PhraseLiteralSlot<"to be non-empty">]>;
|
|
476
|
-
/**
|
|
477
|
-
* Asserts that the subject is defined (not undefined).
|
|
478
|
-
*
|
|
479
|
-
* @example
|
|
480
|
-
*
|
|
481
|
-
* ```ts
|
|
482
|
-
* expect(null, 'to be defined'); // passes
|
|
483
|
-
* expect(undefined, 'to be defined'); // fails
|
|
484
|
-
* ```
|
|
485
|
-
*
|
|
486
|
-
* @group Basic Assertions
|
|
487
|
-
*/
|
|
488
|
-
export declare const definedAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be defined"], z.ZodNonOptional<z.ZodUnknown>, never>;
|
|
489
|
-
/**
|
|
490
|
-
* Asserts that the subject is a Set instance.
|
|
491
|
-
*
|
|
492
|
-
* @example
|
|
493
|
-
*
|
|
494
|
-
* ```ts
|
|
495
|
-
* expect(new Set(), 'to be a Set'); // passes
|
|
496
|
-
* expect([], 'to be a Set'); // fails
|
|
497
|
-
* ```
|
|
498
|
-
*
|
|
499
|
-
* @group Basic Assertions
|
|
500
|
-
*/
|
|
501
|
-
export declare const setAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be a Set"], z.ZodCustom<Set<unknown>, Set<unknown>>, never>;
|
|
502
|
-
/**
|
|
503
|
-
* Asserts that the subject is a WeakMap instance.
|
|
504
|
-
*
|
|
505
|
-
* @example
|
|
506
|
-
*
|
|
507
|
-
* ```ts
|
|
508
|
-
* expect(new WeakMap(), 'to be a WeakMap'); // passes
|
|
509
|
-
* expect(new Map(), 'to be a WeakMap'); // fails
|
|
510
|
-
* ```
|
|
511
|
-
*
|
|
512
|
-
* @group Basic Assertions
|
|
513
|
-
*/
|
|
514
|
-
export declare const weakMapAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be a WeakMap"], z.ZodCustom<WeakMap<WeakKey, unknown>, WeakMap<WeakKey, unknown>>, never>;
|
|
515
|
-
/**
|
|
516
|
-
* Asserts that the subject is a WeakSet instance.
|
|
517
|
-
*
|
|
518
|
-
* @example
|
|
519
|
-
*
|
|
520
|
-
* ```ts
|
|
521
|
-
* expect(new WeakSet(), 'to be a WeakSet'); // passes
|
|
522
|
-
* expect(new Set(), 'to be a WeakSet'); // fails
|
|
523
|
-
* ```
|
|
524
|
-
*
|
|
525
|
-
* @group Basic Assertions
|
|
526
|
-
*/
|
|
527
|
-
export declare const weakSetAssertion: import("../assertion-types.js").AssertionStandardSchemaSync<readonly ["to be a WeakSet"], z.ZodCustom<WeakSet<WeakKey>, WeakSet<WeakKey>>, never>;
|
|
528
|
-
//# sourceMappingURL=sync-basic.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sync-basic.d.ts","sourceRoot":"","sources":["../../../src/assertion/impl/sync-basic.ts"],"names":[],"mappings":"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"}
|