@mll-lab/js-utils 2.29.0 → 2.30.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.
@@ -1,4 +1,4 @@
1
- export declare type PredicateFn = (value: unknown) => boolean;
1
+ export type PredicateFn = (value: unknown) => boolean;
2
2
  export declare const isAlphanumeric: PredicateFn;
3
3
  /**
4
4
  * Die BSNR (Betriebsstättennummer) ist eine neunstellige Zahl, die eine eindeutige Zuordnung
@@ -1,8 +1,8 @@
1
1
  import { DeepPartial, Either, Exact, KeyOfType, Maybe, MaybePromise, Modify, ValueOf } from './types';
2
- declare type Bar = {
2
+ type Bar = {
3
3
  baz: number;
4
4
  };
5
- declare type Obj = {
5
+ type Obj = {
6
6
  foo: string;
7
7
  bar: Bar;
8
8
  };
@@ -12,7 +12,7 @@ export declare const modifiedType: Modify<Obj, {
12
12
  foo: number;
13
13
  }>;
14
14
  export declare function acceptsValueOf(v: ValueOf<Obj>): string | Bar;
15
- declare type Foo = {
15
+ type Foo = {
16
16
  a: number;
17
17
  b: string;
18
18
  };
@@ -22,12 +22,12 @@ export declare const maybeAllowsNull: Maybe<number>;
22
22
  export declare const maybeAllowsUndefined: Maybe<number>;
23
23
  export declare const maybeAllowsT: Maybe<number>;
24
24
  export declare const maybeDoesNotAllowOtherType: Maybe<number>;
25
- declare type BarOrObj = Either<Bar, Obj>;
25
+ type BarOrObj = Either<Bar, Obj>;
26
26
  export declare const onlyFoo: BarOrObj;
27
27
  export declare const onlyBar: BarOrObj;
28
28
  export declare const both: BarOrObj;
29
29
  export declare const none: BarOrObj;
30
- declare type ExactlyBar = Exact<Bar>;
30
+ type ExactlyBar = Exact<Bar>;
31
31
  export declare const exactlyBar: ExactlyBar;
32
32
  export declare const lessThanBar: ExactlyBar;
33
33
  export declare const moreThanBar: ExactlyBar;
package/dist/types.d.ts CHANGED
@@ -1,33 +1,33 @@
1
1
  /** Recursively optional deep partial type. */
2
- export declare type DeepPartial<T> = {
2
+ export type DeepPartial<T> = {
3
3
  [P in keyof T]?: DeepPartial<T[P]>;
4
4
  };
5
5
  /** Either a value or a promise that will resolve to that value. */
6
- export declare type MaybePromise<T> = T | Promise<T>;
6
+ export type MaybePromise<T> = T | Promise<T>;
7
7
  /** Modify a given type, e.g. to make some properties optional. */
8
- export declare type Modify<T, R> = Pick<T, Exclude<keyof T, keyof R>> & R;
8
+ export type Modify<T, R> = Pick<T, Exclude<keyof T, keyof R>> & R;
9
9
  /** The missing counterpart to keyof. */
10
- export declare type ValueOf<T> = T[keyof T];
10
+ export type ValueOf<T> = T[keyof T];
11
11
  /**
12
12
  * Extracts keys of the given type TObject that are of type TKeys.
13
13
  *
14
14
  * https://stackoverflow.com/a/49752227
15
15
  */
16
- export declare type KeyOfType<TObject, TKeys> = keyof {
16
+ export type KeyOfType<TObject, TKeys> = keyof {
17
17
  [P in keyof TObject as TObject[P] extends TKeys ? P : never]: unknown;
18
18
  };
19
19
  /** Add null and undefined to a type. */
20
- export declare type Maybe<T> = T | null | undefined;
20
+ export type Maybe<T> = T | null | undefined;
21
21
  /** Only props that are contained in T but not U. */
22
- declare type Subtract<T, U> = {
22
+ type Subtract<T, U> = {
23
23
  [P in keyof T]: T[P];
24
24
  } & {
25
25
  [P in keyof U]?: never;
26
26
  };
27
27
  /** Only one of both types (exclusively). */
28
- export declare type Either<T, U> = Subtract<T, U> | Subtract<U, T>;
28
+ export type Either<T, U> = Subtract<T, U> | Subtract<U, T>;
29
29
  /** Only the given keys and no others. */
30
- export declare type Exact<T extends {
30
+ export type Exact<T extends {
31
31
  [key: string]: unknown;
32
32
  }> = {
33
33
  [K in keyof T]: T[K];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mll-lab/js-utils",
3
- "version": "2.29.0",
3
+ "version": "2.30.0",
4
4
  "main": "dist/index.common.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -54,29 +54,30 @@
54
54
  "@rollup/plugin-babel": "^5.3.0",
55
55
  "@rollup/plugin-commonjs": "^18.0.0",
56
56
  "@rollup/plugin-node-resolve": "^11.2.1",
57
- "@rollup/plugin-typescript": "^8.2.1",
57
+ "@rollup/plugin-typescript": "^11.1.6",
58
58
  "@semantic-release/changelog": "^6.0.3",
59
59
  "@semantic-release/git": "^10.0.1",
60
- "@types/jest": "^26.0.20",
60
+ "@types/jest": "^29.5.12",
61
61
  "@types/lodash": "4.14.136",
62
62
  "@types/node": "^14.14.31",
63
- "@typescript-eslint/eslint-plugin": "^6.13.2",
64
- "@typescript-eslint/parser": "^6.13.2",
65
- "babel-jest": "^26.6.3",
63
+ "@typescript-eslint/eslint-plugin": "^7.1.0",
64
+ "@typescript-eslint/parser": "^7.1.0",
65
+ "babel-jest": "^29.7.0",
66
66
  "babel-loader": "^8.2.2",
67
67
  "babel-plugin-require-context-hook": "^1.0.0",
68
- "eslint": "^8.55.0",
69
- "eslint-plugin-import": "^2.29.0",
70
- "eslint-plugin-unused-imports": "^3.0.0",
71
- "jest": "^26.6.3",
68
+ "eslint": "^8.57.0",
69
+ "eslint-plugin-import": "^2.29.1",
70
+ "eslint-plugin-unused-imports": "^3.1.0",
71
+ "jest": "^29.7.0",
72
+ "jest-environment-jsdom": "^29.7.0",
72
73
  "prettier": "^3.1.0",
73
74
  "rollup": "^2.45.2",
74
75
  "rollup-plugin-peer-deps-external": "^2.2.4",
75
- "semantic-release": "^22.0.10",
76
- "ts-jest": "^26.5.1",
76
+ "semantic-release": "^23.0.2",
77
+ "ts-jest": "^29.1.2",
77
78
  "ts-loader": "^8.0.17",
78
79
  "ts-node": "^9.1.1",
79
- "typescript": "^4.8.2"
80
+ "typescript": "^5.3.3"
80
81
  },
81
- "packageManager": "yarn@4.0.2"
82
+ "packageManager": "yarn@4.1.0"
82
83
  }