@augment-vir/assert 31.14.0 → 31.15.0

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.
@@ -9,7 +9,7 @@ import { type WaitUntilOptions } from '../guard-types/wait-until-function.js';
9
9
  * @example
10
10
  *
11
11
  * ```ts
12
- * import type {FalsyValue} from '@augment-vir/assert';
12
+ * import {type FalsyValue} from '@augment-vir/assert';
13
13
  *
14
14
  * const falsy: FalsyValue = 0;
15
15
  * ```
@@ -25,7 +25,7 @@ export type FalsyValue = undefined | null | false | 0 | '' | -0 | 0n;
25
25
  * @example
26
26
  *
27
27
  * ```ts
28
- * import type {Falsy} from '@augment-vir/assert';
28
+ * import {type Falsy} from '@augment-vir/assert';
29
29
  *
30
30
  * type MyFalsy = Falsy<string | number>; // "" | 0
31
31
  * ```
@@ -42,7 +42,7 @@ export type Falsy<T> = NarrowToExpected<T, FalsyValue>;
42
42
  * @example
43
43
  *
44
44
  * ```ts
45
- * import type {Truthy} from '@augment-vir/assert';
45
+ * import {type Truthy} from '@augment-vir/assert';
46
46
  *
47
47
  * type MyTruthy = Truthy<0 | undefined | string>; // string
48
48
  * ```
@@ -1,5 +1,4 @@
1
- import type { NarrowToExpected } from '@augment-vir/core';
2
- import { type EnumBaseType, type MaybePromise } from '@augment-vir/core';
1
+ import { type EnumBaseType, type MaybePromise, type NarrowToExpected } from '@augment-vir/core';
3
2
  import { type WaitUntilOptions } from '../guard-types/wait-until-function.js';
4
3
  export declare function assertIsEnumValue<const Expected extends EnumBaseType>(this: void, child: unknown, checkEnum: Expected, failureMessage?: string | undefined): asserts child is Expected[keyof Expected];
5
4
  export declare function isEnumValue<const Expected extends EnumBaseType>(this: void, child: unknown, checkEnum: Expected): child is Expected[keyof Expected];
@@ -1,4 +1,4 @@
1
- import { getEnumValues } from '@augment-vir/core';
1
+ import { getEnumValues, } from '@augment-vir/core';
2
2
  import { AssertionError } from '../augments/assertion.error.js';
3
3
  import { createWaitUntil } from '../guard-types/wait-until-function.js';
4
4
  export function assertIsEnumValue(child, checkEnum, failureMessage) {
@@ -1,5 +1,4 @@
1
- import type { NarrowToExpected } from '@augment-vir/core';
2
- import { type AnyObject, type MaybePromise } from '@augment-vir/core';
1
+ import { type AnyObject, type MaybePromise, type NarrowToExpected } from '@augment-vir/core';
3
2
  import { type WaitUntilOptions } from '../../guard-types/wait-until-function.js';
4
3
  export declare const entryEqualityGuards: {
5
4
  assert: {
@@ -1,4 +1,4 @@
1
- import { stringify } from '@augment-vir/core';
1
+ import { stringify, } from '@augment-vir/core';
2
2
  import { AssertionError } from '../../augments/assertion.error.js';
3
3
  import { createWaitUntil } from '../../guard-types/wait-until-function.js';
4
4
  const assertions = {
@@ -1,5 +1,5 @@
1
1
  import { type MaybePromise, type NarrowToExpected } from '@augment-vir/core';
2
- import { WaitUntilOptions } from '../../guard-types/wait-until-function.js';
2
+ import { type WaitUntilOptions } from '../../guard-types/wait-until-function.js';
3
3
  export declare const jsonEqualityGuards: {
4
4
  assert: {
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { type MaybePromise, type NarrowToExpected } from '@augment-vir/core';
2
- import { WaitUntilOptions } from '../../guard-types/wait-until-function.js';
2
+ import { type WaitUntilOptions } from '../../guard-types/wait-until-function.js';
3
3
  export declare const deepEquals: <const Actual, const Expected extends Actual>(this: void, actual: Actual, expected: Expected, failureMessage?: string | undefined) => asserts actual is NarrowToExpected<Actual, Expected>;
4
4
  export declare const simpleEqualityGuards: {
5
5
  assert: {
@@ -1,5 +1,5 @@
1
- import { MaybePromise, MinMax } from '@augment-vir/core';
2
- import { WaitUntilOptions } from '../guard-types/wait-until-function.js';
1
+ import { type MaybePromise, type MinMax } from '@augment-vir/core';
2
+ import { type WaitUntilOptions } from '../guard-types/wait-until-function.js';
3
3
  export declare const numericGuards: {
4
4
  assert: {
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { type AnyFunction } from '@augment-vir/core';
2
- import type { IsAny } from 'type-fest';
2
+ import { type IsAny } from 'type-fest';
3
3
  import { type WaitUntilOptions } from '../guard-types/wait-until-function.js';
4
4
  /**
5
5
  * A custom asserter for `.output` guards (`assert.output`, `check.output`, etc.). This is typically
@@ -1,5 +1,5 @@
1
- import type { MaybePromise } from '@augment-vir/core';
2
- import { WaitUntilOptions } from '../guard-types/wait-until-function.js';
1
+ import { type MaybePromise } from '@augment-vir/core';
2
+ import { type WaitUntilOptions } from '../guard-types/wait-until-function.js';
3
3
  export declare const regexpGuards: {
4
4
  assert: {
5
5
  /**
@@ -1,6 +1,5 @@
1
- import type { NarrowToActual, NarrowToExpected } from '@augment-vir/core';
2
- import { type AnyObject, type MaybePromise, type Values } from '@augment-vir/core';
3
- import type { EmptyObject } from 'type-fest';
1
+ import { type AnyObject, type MaybePromise, type NarrowToActual, type NarrowToExpected, type Values } from '@augment-vir/core';
2
+ import { type EmptyObject } from 'type-fest';
4
3
  import { type WaitUntilOptions } from '../guard-types/wait-until-function.js';
5
4
  export declare function isIn<Parent extends object | string>(this: void, child: unknown, parent: Parent): child is Values<Parent>;
6
5
  /**
@@ -1,4 +1,4 @@
1
- import { stringify } from '@augment-vir/core';
1
+ import { stringify, } from '@augment-vir/core';
2
2
  import { AssertionError } from '../augments/assertion.error.js';
3
3
  import { createWaitUntil } from '../guard-types/wait-until-function.js';
4
4
  function hasValue(parent, value) {
@@ -1,5 +1,5 @@
1
- import { ArrayElement } from '@augment-vir/core';
2
- import { UnionToIntersection } from 'type-fest';
1
+ import { type ArrayElement } from '@augment-vir/core';
2
+ import { type UnionToIntersection } from 'type-fest';
3
3
  import { guardOverrides } from '../../assertions/extendable-assertions.js';
4
4
  declare const assertWrapMethods: UnionToIntersection<Extract<ArrayElement<typeof guardOverrides>, {
5
5
  assertWrap: any;
@@ -1,5 +1,5 @@
1
- import { AnyFunction, ArrayElement } from '@augment-vir/core';
2
- import { UnionToIntersection } from 'type-fest';
1
+ import { type AnyFunction, type ArrayElement } from '@augment-vir/core';
2
+ import { type UnionToIntersection } from 'type-fest';
3
3
  import { guardOverrides } from '../../assertions/extendable-assertions.js';
4
4
  declare const checkWrapMethods: UnionToIntersection<Extract<ArrayElement<typeof guardOverrides>, {
5
5
  checkWrap: any;
@@ -1,5 +1,5 @@
1
- import { AnyFunction, ArrayElement } from '@augment-vir/core';
2
- import { UnionToIntersection } from 'type-fest';
1
+ import { type AnyFunction, type ArrayElement } from '@augment-vir/core';
2
+ import { type UnionToIntersection } from 'type-fest';
3
3
  import { guardOverrides } from '../../assertions/extendable-assertions.js';
4
4
  declare const checkMethods: UnionToIntersection<ArrayElement<typeof guardOverrides>['check']>;
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { ArrayElement } from '@augment-vir/core';
2
- import { UnionToIntersection } from 'type-fest';
1
+ import { type ArrayElement } from '@augment-vir/core';
2
+ import { type UnionToIntersection } from 'type-fest';
3
3
  import { guardOverrides } from '../../assertions/extendable-assertions.js';
4
4
  import { type WaitUntilOptions } from '../../guard-types/wait-until-function.js';
5
5
  declare const waitUntilMethods: UnionToIntersection<Extract<ArrayElement<typeof guardOverrides>, {
@@ -1,4 +1,4 @@
1
- import type { IsEqual } from 'type-fest';
1
+ import { type IsEqual } from 'type-fest';
2
2
  /**
3
3
  * A helper type that resolves to the given `Yes` type parameter if `Actual` === `Expected`.
4
4
  * Otherwise it resolves to the given `No` type parameter.
@@ -1,7 +1,7 @@
1
1
  /** C8 fails in type-only files. */
2
- import { AnyFunction, MaybePromise } from '@augment-vir/core';
3
- import type { AssertFunction } from './assert-function.js';
4
- import type { WaitUntilOverridesBase } from './wait-until-function.js';
2
+ import { type AnyFunction, type MaybePromise } from '@augment-vir/core';
3
+ import { type AssertFunction } from './assert-function.js';
4
+ import { type WaitUntilOverridesBase } from './wait-until-function.js';
5
5
  export type AssertWrapOverridesBase<Keys extends PropertyKey = string> = Partial<Readonly<Record<Keys, AnyFunction | undefined>>>;
6
6
  export type CheckFunction<Output> = (input: any, ...extraInputs: any[]) => input is Output;
7
7
  export type GenericCheckFunction = (input: any, ...extraInputs: any[]) => MaybePromise<boolean> | never;
@@ -1,6 +1,6 @@
1
- import type { AnyFunction, MaybePromise, NarrowToExpected, PartialWithUndefined, RemoveFirstTupleEntry, RemoveLastTupleEntry, RequiredAndNotNull } from '@augment-vir/core';
1
+ import { type AnyFunction, type MaybePromise, type NarrowToExpected, type PartialWithUndefined, type RemoveFirstTupleEntry, type RemoveLastTupleEntry, type RequiredAndNotNull } from '@augment-vir/core';
2
2
  import { type AnyDuration } from '@date-vir/duration';
3
- import type { AssertFunction } from './assert-function.js';
3
+ import { type AssertFunction } from './assert-function.js';
4
4
  /**
5
5
  * Options for configuring the timing of `waitUntil`.
6
6
  *
@@ -1,4 +1,4 @@
1
- import { ensureError, ensureErrorAndPrependMessage, wait } from '@augment-vir/core';
1
+ import { ensureError, ensureErrorAndPrependMessage, wait, } from '@augment-vir/core';
2
2
  import { convertDuration } from '@date-vir/duration';
3
3
  export const defaultWaitUntilOptions = {
4
4
  interval: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/assert",
3
- "version": "31.14.0",
3
+ "version": "31.15.0",
4
4
  "description": "A collection of assertions for test and production code alike.",
5
5
  "keywords": [
6
6
  "augment",
@@ -42,7 +42,7 @@
42
42
  "test:update": "npm test"
43
43
  },
44
44
  "dependencies": {
45
- "@augment-vir/core": "^31.14.0",
45
+ "@augment-vir/core": "^31.15.0",
46
46
  "@date-vir/duration": "^7.3.1",
47
47
  "deep-eql": "^5.0.2",
48
48
  "expect-type": "^1.2.1",