@augment-vir/assert 30.0.5 → 30.1.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.
@@ -6,6 +6,9 @@ type AssertTypeOf<TestingType> = {
6
6
  notEquals: ExpectTypeOf<TestingType, {
7
7
  positive: false;
8
8
  }>['toEqualTypeOf'];
9
+ slowEquals: ExpectTypeOf<TestingType, {
10
+ positive: true;
11
+ }>['branded']['toEqualTypeOf'];
9
12
  matches: ExpectTypeOf<TestingType, {
10
13
  positive: true;
11
14
  }>['toMatchTypeOf'];
@@ -20,22 +23,6 @@ input: Actual): AssertTypeOf<Actual>;
20
23
  declare function tsType<Actual>(): AssertTypeOf<Actual>;
21
24
  export declare const tsTypeGuards: {
22
25
  assert: {
23
- /**
24
- * Check if a value or type matches type expectations. Use this to write type tests.
25
- *
26
- * This should not be used in production code. It won't cause any issues there, but it also
27
- * provides no value there.
28
- *
29
- * Performs no type guarding.
30
- *
31
- * @example
32
- *
33
- * ```ts
34
- * import {assert} from '@augment-vir/assert';
35
- *
36
- * assert.tsType('hello').equals<string>();
37
- * ```
38
- */
39
26
  /**
40
27
  * Asserts within the TypeScript type system that a given type or value matches type
41
28
  * expectations (using the [`expect-type`](https://www.npmjs.com/package/expect-type) package.
@@ -8,6 +8,7 @@ input) {
8
8
  notEquals: () => { },
9
9
  matches: () => { },
10
10
  notMatches: () => { },
11
+ slowEquals: () => { },
11
12
  };
12
13
  }
13
14
  const assertions = {
@@ -4,7 +4,6 @@ declare function isLengthAtLeast<const Element, const Length extends number>(act
4
4
  declare function isLengthAtLeast(actual: string | AnyObject, length: number, failureMessage?: string | undefined): void;
5
5
  declare function isLengthExactly<const Element, const Length extends number>(actual: ReadonlyArray<Element | undefined>, length: Length, failureMessage?: string | undefined): asserts actual is Tuple<Element, Length>;
6
6
  declare function isLengthExactly(actual: string | AnyObject, length: number, failureMessage?: string | undefined): void;
7
- /** These functions are not used at run time, they're only here for types. */
8
7
  declare function checkIsLengthAtLeast<Element, Length extends number>(actual: ReadonlyArray<Element | undefined>, length: Length): actual is AtLeastTuple<Element, Length>;
9
8
  declare function checkIsLengthAtLeast(actual: string | AnyObject, length: number): boolean;
10
9
  declare function assertWrapIsLengthAtLeast<Element, Length extends number>(actual: ReadonlyArray<Element | undefined>, length: Length): AtLeastTuple<Element, Length>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@augment-vir/assert",
3
- "version": "30.0.5",
3
+ "version": "30.1.0",
4
4
  "description": "A collection of assertions for test and production code alike.",
5
5
  "keywords": [
6
6
  "augment",
@@ -41,7 +41,7 @@
41
41
  "test:update": "npm test"
42
42
  },
43
43
  "dependencies": {
44
- "@augment-vir/core": "^30.0.5",
44
+ "@augment-vir/core": "^30.1.0",
45
45
  "@date-vir/duration": "^6.0.0",
46
46
  "deep-eql": "^5.0.2",
47
47
  "expect-type": "^0.20.0",