@tstdl/base 0.90.90 → 0.90.91

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.
Files changed (64) hide show
  1. package/api/client/client.js +0 -1
  2. package/api/server/gateway.js +1 -1
  3. package/application/application.js +0 -1
  4. package/authentication/server/mongo/mongo-authentication-credentials.repository.js +1 -1
  5. package/authentication/server/mongo/mongo-authentication-session.repository.js +1 -1
  6. package/browser/browser-context-controller.js +1 -1
  7. package/browser/browser-controller.js +0 -1
  8. package/browser/browser.service.js +0 -1
  9. package/collections/awaitable/awaitable-set.d.ts +7 -0
  10. package/collections/awaitable/awaitable-set.js +21 -0
  11. package/collections/keyed-set.d.ts +7 -0
  12. package/collections/keyed-set.js +22 -0
  13. package/collections/observable/observable-set.d.ts +9 -2
  14. package/collections/observable/observable-set.js +21 -0
  15. package/context/context.d.ts +5 -16
  16. package/data-structures/distinct-collection.d.ts +10 -1
  17. package/data-structures/distinct-collection.js +26 -1
  18. package/data-structures/multi-key-set.d.ts +2 -1
  19. package/data-structures/multi-key-set.js +3 -0
  20. package/data-structures/set-collection.d.ts +9 -0
  21. package/data-structures/set-collection.js +29 -0
  22. package/database/mongo/classes.js +0 -2
  23. package/distributed-loop/distributed-loop.js +1 -1
  24. package/dom/observation/intersection-observer.d.ts +1 -1
  25. package/dom/observation/intersection-observer.js +30 -17
  26. package/http/client/adapters/undici.adapter.js +1 -1
  27. package/http/client/http-client.js +1 -1
  28. package/http/server/node/node-http-server.d.ts +0 -1
  29. package/image-service/imgproxy/imgproxy-image-service.js +1 -1
  30. package/import.js +1 -1
  31. package/intl/number-parser.d.ts +1 -1
  32. package/key-value-store/key-value.store.js +0 -1
  33. package/key-value-store/mongo/mongo-key-value.repository.js +1 -1
  34. package/lock/lock.js +0 -1
  35. package/lock/mongo/mongo-lock-repository.js +1 -1
  36. package/lock/provider.js +0 -1
  37. package/logger/logger.js +0 -1
  38. package/mail/mail.client.js +0 -1
  39. package/mail/repositories/mongo/mongo-mail-log.repository.js +1 -1
  40. package/message-bus/message-bus.js +0 -1
  41. package/migration/mongo/migration-state-repository.js +1 -1
  42. package/module/modules/web-server.module.js +0 -1
  43. package/object-storage/object-storage.js +0 -1
  44. package/openid-connect/mongo-oidc-state.repository.js +1 -1
  45. package/package.json +6 -6
  46. package/password/password-check.localization.d.ts +2 -2
  47. package/pdf/pdf.service.js +4 -2
  48. package/queue/mongo/mongo-job.repository.js +1 -1
  49. package/queue/mongo/queue.provider.js +0 -1
  50. package/queue/queue.js +0 -1
  51. package/rpc/endpoints/message-port.rpc-endpoint.d.ts +0 -1
  52. package/rpc/rpc.d.ts +5 -5
  53. package/schema/schema.d.ts +4 -4
  54. package/search-index/elastic/config.js +0 -1
  55. package/serializer/handlers/binary.d.ts +0 -1
  56. package/signals/to-lazy-signal.d.ts +2 -1
  57. package/templates/providers/file.template-provider.js +0 -1
  58. package/templates/resolvers/file.template-resolver.js +0 -1
  59. package/threading/thread-pool.d.ts +0 -1
  60. package/utils/compression.d.ts +0 -3
  61. package/utils/factory-map.d.ts +1 -1
  62. package/utils/object/forward-ref.d.ts +5 -5
  63. package/utils/repl.d.ts +0 -1
  64. package/utils/stream/stream-helper-types.d.ts +0 -1
@@ -2,7 +2,6 @@ import { HttpClient, HttpClientRequest } from '../../http/client/index.js';
2
2
  import { normalizeSingleHttpValue } from '../../http/types.js';
3
3
  import { inject } from '../../injector/inject.js';
4
4
  import { Injector } from '../../injector/injector.js';
5
- import { resolveArgumentType } from '../../injector/interfaces.js';
6
5
  import { Schema } from '../../schema/index.js';
7
6
  import { ServerSentEvents } from '../../sse/server-sent-events.js';
8
7
  import { toArray } from '../../utils/array/array.js';
@@ -15,7 +15,7 @@ import { BadRequestError } from '../../errors/bad-request.error.js';
15
15
  import { NotFoundError } from '../../errors/not-found.error.js';
16
16
  import { NotImplementedError } from '../../errors/not-implemented.error.js';
17
17
  import { HttpServerResponse } from '../../http/server/index.js';
18
- import { InjectArg, ResolveArg, Singleton, resolveArgumentType } from '../../injector/index.js';
18
+ import { InjectArg, ResolveArg, Singleton } from '../../injector/index.js';
19
19
  import { Logger } from '../../logger/index.js';
20
20
  import { Schema } from '../../schema/index.js';
21
21
  import { ServerSentEventsSource } from '../../sse/server-sent-events-source.js';
@@ -9,7 +9,6 @@ import { getGlobalInjector } from '../core.js';
9
9
  import { Singleton } from '../injector/decorators.js';
10
10
  import { inject, injectArgument, runInInjectionContext } from '../injector/inject.js';
11
11
  import { Injector } from '../injector/injector.js';
12
- import { resolveArgumentType } from '../injector/interfaces.js';
13
12
  import { Logger } from '../logger/index.js';
14
13
  import { ModuleBase } from '../module/module-base.js';
15
14
  import { ModuleState } from '../module/module.js';
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  };
13
13
  import { getNewId } from '../../../database/index.js';
14
14
  import { Collection, MongoEntityRepository, noopTransformer } from '../../../database/mongo/index.js';
15
- import { ForwardArg, Singleton, resolveArgumentType } from '../../../injector/index.js';
15
+ import { ForwardArg, Singleton } from '../../../injector/index.js';
16
16
  import { Logger } from '../../../logger/index.js';
17
17
  import { isUndefined } from '../../../utils/type-guards.js';
18
18
  import { AuthenticationCredentialsRepository } from '../authentication-credentials.repository.js';
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
13
  import { Collection, MongoEntityRepository, noopTransformer } from '../../../database/mongo/index.js';
14
- import { ForwardArg, Singleton, resolveArgumentType } from '../../../injector/index.js';
14
+ import { ForwardArg, Singleton } from '../../../injector/index.js';
15
15
  import { Logger } from '../../../logger/index.js';
16
16
  import { AuthenticationSessionRepository } from '../authentication-session.repository.js';
17
17
  let defaultArgument;
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { disposeAsync } from '../disposable/disposable.js';
11
11
  import { Injectable } from '../injector/decorators.js';
12
- import { afterResolve, resolveArgumentType } from '../injector/interfaces.js';
12
+ import { afterResolve } from '../injector/interfaces.js';
13
13
  import { filterUndefinedFromRecord } from '../utils/object/object.js';
14
14
  import { isDefined } from '../utils/type-guards.js';
15
15
  import { BrowserController } from './browser-controller.js';
@@ -10,7 +10,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  import { disposeAsync } from '../disposable/disposable.js';
11
11
  import { Injectable } from '../injector/decorators.js';
12
12
  import { inject } from '../injector/inject.js';
13
- import { resolveArgumentType } from '../injector/interfaces.js';
14
13
  import { filterUndefinedFromRecord } from '../utils/object/object.js';
15
14
  import { isDefined } from '../utils/type-guards.js';
16
15
  import { BrowserContextController } from './browser-context-controller.js';
@@ -12,7 +12,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  };
13
13
  import { disposeAsync } from '../disposable/disposable.js';
14
14
  import { InjectArg, Singleton } from '../injector/decorators.js';
15
- import { resolveArgumentType } from '../injector/interfaces.js';
16
15
  import { filterUndefinedFromRecord } from '../utils/object/object.js';
17
16
  import { isDefined } from '../utils/type-guards.js';
18
17
  import { BrowserContextController } from './browser-context-controller.js';
@@ -12,6 +12,13 @@ export declare class AwaitableSet<T> implements Set<T> {
12
12
  add(value: T): this;
13
13
  clear(): void;
14
14
  delete(value: T): boolean;
15
+ union<U>(other: ReadonlySetLike<U>): Set<T | U>;
16
+ intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
17
+ difference<U>(other: ReadonlySetLike<U>): Set<T>;
18
+ symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
19
+ isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
20
+ isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
21
+ isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
15
22
  forEach(callback: (value: T, value2: T, set: AwaitableSet<T>) => void, thisArg?: any): void;
16
23
  has(value: T): boolean;
17
24
  entries(): IterableIterator<[T, T]>;
@@ -43,6 +43,27 @@ export class AwaitableSet {
43
43
  }
44
44
  return success;
45
45
  }
46
+ union(other) {
47
+ return this.backingSet.union(other);
48
+ }
49
+ intersection(other) {
50
+ return this.backingSet.intersection(other);
51
+ }
52
+ difference(other) {
53
+ return this.backingSet.difference(other);
54
+ }
55
+ symmetricDifference(other) {
56
+ return this.backingSet.symmetricDifference(other);
57
+ }
58
+ isSubsetOf(other) {
59
+ return this.backingSet.isSubsetOf(other);
60
+ }
61
+ isSupersetOf(other) {
62
+ return this.backingSet.isSupersetOf(other);
63
+ }
64
+ isDisjointFrom(other) {
65
+ return this.backingSet.isDisjointFrom(other);
66
+ }
46
67
  forEach(callback, thisArg) {
47
68
  const boundCallback = callback.bind(thisArg);
48
69
  this.backingSet.forEach((value, value2) => boundCallback(value, value2, this));
@@ -13,6 +13,13 @@ export declare class KeyedSet<T> implements Set<T> {
13
13
  add(value: T): this;
14
14
  clear(): void;
15
15
  delete(value: T): boolean;
16
+ union<U>(_other: ReadonlySetLike<U>): Set<T | U>;
17
+ intersection<U>(_other: ReadonlySetLike<U>): Set<T & U>;
18
+ difference<U>(_other: ReadonlySetLike<U>): Set<T>;
19
+ symmetricDifference<U>(_other: ReadonlySetLike<U>): Set<T | U>;
20
+ isSubsetOf(_other: ReadonlySetLike<unknown>): boolean;
21
+ isSupersetOf(_other: ReadonlySetLike<unknown>): boolean;
22
+ isDisjointFrom(_other: ReadonlySetLike<unknown>): boolean;
16
23
  forEach(callback: (value: T, value2: T, set: KeyedSet<T>) => void, thisArg?: any): void;
17
24
  has(value: T): boolean;
18
25
  [Symbol.iterator](): IterableIterator<T>;
@@ -1,3 +1,4 @@
1
+ import { NotSupportedError } from '../errors/not-supported.error.js';
1
2
  import { map } from '../utils/iterable-helpers/map.js';
2
3
  export var KeyedSetMode;
3
4
  (function (KeyedSetMode) {
@@ -33,6 +34,27 @@ export class KeyedSet {
33
34
  const key = this.selector(value);
34
35
  return this.backingMap.delete(key);
35
36
  }
37
+ union(_other) {
38
+ throw new NotSupportedError();
39
+ }
40
+ intersection(_other) {
41
+ throw new NotSupportedError();
42
+ }
43
+ difference(_other) {
44
+ throw new NotSupportedError();
45
+ }
46
+ symmetricDifference(_other) {
47
+ throw new NotSupportedError();
48
+ }
49
+ isSubsetOf(_other) {
50
+ throw new NotSupportedError();
51
+ }
52
+ isSupersetOf(_other) {
53
+ throw new NotSupportedError();
54
+ }
55
+ isDisjointFrom(_other) {
56
+ throw new NotSupportedError();
57
+ }
36
58
  forEach(callback, thisArg) {
37
59
  const boundCallback = callback.bind(thisArg);
38
60
  this.backingMap.forEach((value) => boundCallback(value, value, this));
@@ -1,9 +1,9 @@
1
- import type { ObservableCollection } from './observable-collection.js';
2
1
  import { ObservableCollectionBase } from './observable-collection-base.js';
2
+ import type { ObservableCollection } from './observable-collection.js';
3
3
  export declare class ObservableSet<T> extends ObservableCollectionBase<T, ObservableSet<T>> implements Set<T>, ObservableCollection<T> {
4
4
  private readonly backingSet;
5
5
  readonly [Symbol.toStringTag]: 'ObservableSet';
6
- get self(): ObservableSet<T>;
6
+ get self(): this;
7
7
  get length(): number;
8
8
  get size(): number;
9
9
  constructor(values?: Iterable<T> | null);
@@ -13,6 +13,13 @@ export declare class ObservableSet<T> extends ObservableCollectionBase<T, Observ
13
13
  remove(value: T): boolean;
14
14
  removeMany(values: T[]): number;
15
15
  delete(value: T): boolean;
16
+ union<U>(other: ReadonlySetLike<U>): Set<T | U>;
17
+ intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
18
+ difference<U>(other: ReadonlySetLike<U>): Set<T>;
19
+ symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
20
+ isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
21
+ isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
22
+ isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
16
23
  forEach(callback: (value: T, value2: T, set: ObservableSet<T>) => void, thisArg?: any): void;
17
24
  has(value: T): boolean;
18
25
  entries(): IterableIterator<[T, T]>;
@@ -54,6 +54,27 @@ export class ObservableSet extends ObservableCollectionBase {
54
54
  delete(value) {
55
55
  return this.remove(value);
56
56
  }
57
+ union(other) {
58
+ return this.backingSet.union(other);
59
+ }
60
+ intersection(other) {
61
+ return this.backingSet.intersection(other);
62
+ }
63
+ difference(other) {
64
+ return this.backingSet.difference(other);
65
+ }
66
+ symmetricDifference(other) {
67
+ return this.backingSet.symmetricDifference(other);
68
+ }
69
+ isSubsetOf(other) {
70
+ return this.backingSet.isSubsetOf(other);
71
+ }
72
+ isSupersetOf(other) {
73
+ return this.backingSet.isSupersetOf(other);
74
+ }
75
+ isDisjointFrom(other) {
76
+ return this.backingSet.isDisjointFrom(other);
77
+ }
57
78
  forEach(callback, thisArg) {
58
79
  const boundCallback = callback.bind(thisArg);
59
80
  this.backingSet.forEach((value, value2) => boundCallback(value, value2, this));
@@ -1,29 +1,18 @@
1
+ import type { SimplifyObject } from '../types.js';
1
2
  /**
2
3
  * Creates a new context provider
3
4
  * @param name name of of the context used for function names
4
5
  */
5
- export declare function createContextProvider<Context, const Name extends string>(name: Name): { [P in `getCurrent${Name}Context`]: {
6
+ export declare function createContextProvider<Context, const Name extends string>(name: Name): SimplifyObject<{ [P in `getCurrent${Name}Context`]: {
6
7
  (required: true, debugFn: Function): Context;
7
8
  (required?: false | undefined, debugFn?: Function): Context | null;
8
9
  (required: boolean, debugFn: Function): Context | null;
9
- }; } & { [P_1 in `setCurrent${Name}Context`]: (context: Context | null) => Context | null; } & { [P_2 in `runIn${Name}Context`]: <ReturnT>(context: Context, fn: () => ReturnT) => ReturnT; } & { [P_3 in `isIn${Name}Context`]: {
10
+ }; } & { [P in `setCurrent${Name}Context`]: (context: Context | null) => Context | null; } & { [P in `runIn${Name}Context`]: <ReturnT>(context: Context, fn: () => ReturnT) => ReturnT; } & { [P in `isIn${Name}Context`]: {
10
11
  (required: true, debugFn: Function): Context;
11
12
  (required?: false | undefined, debugFn?: Function): Context | null;
12
13
  (required: boolean, debugFn: Function): Context | null;
13
- }; } & { [P_4 in `assertIn${Name}Context`]: {
14
+ }; } & { [P in `assertIn${Name}Context`]: {
14
15
  (required: true, debugFn: Function): Context;
15
16
  (required?: false | undefined, debugFn?: Function): Context | null;
16
17
  (required: boolean, debugFn: Function): Context | null;
17
- }; } extends infer T extends import("../types.js").Record<PropertyKey, any> ? { [K in keyof T]: ({ [P in `getCurrent${Name}Context`]: {
18
- (required: true, debugFn: Function): Context;
19
- (required?: false | undefined, debugFn?: Function): Context | null;
20
- (required: boolean, debugFn: Function): Context | null;
21
- }; } & { [P_1 in `setCurrent${Name}Context`]: (context: Context | null) => Context | null; } & { [P_2 in `runIn${Name}Context`]: <ReturnT>(context: Context, fn: () => ReturnT) => ReturnT; } & { [P_3 in `isIn${Name}Context`]: {
22
- (required: true, debugFn: Function): Context;
23
- (required?: false | undefined, debugFn?: Function): Context | null;
24
- (required: boolean, debugFn: Function): Context | null;
25
- }; } & { [P_4 in `assertIn${Name}Context`]: {
26
- (required: true, debugFn: Function): Context;
27
- (required?: false | undefined, debugFn?: Function): Context | null;
28
- (required: boolean, debugFn: Function): Context | null;
29
- }; })[K]; } : never;
18
+ }; }>;
@@ -1,20 +1,29 @@
1
1
  import { Collection } from './collection.js';
2
2
  export declare abstract class DistinctCollection<T, TThis extends DistinctCollection<T, TThis> = DistinctCollection<T, any>> extends Collection<T, TThis> {
3
- /** Creates a new map and copies the items */
3
+ /** Creates a new set and copies the items */
4
4
  toSet(): Set<T>;
5
5
  /** Returns an adapter that has the same interface as {@link Set}. No copying of data involved. */
6
6
  asSet(): Set<T>;
7
7
  abstract has(value: T): boolean;
8
8
  abstract delete(value: T): boolean;
9
+ protected abstract _getBackingSet(): ReadonlySet<T> | undefined;
9
10
  }
10
11
  export declare class SetAdapter<T> implements Set<T> {
11
12
  private readonly collection;
12
13
  readonly [Symbol.toStringTag] = "SetAdapter";
14
+ private get fastestBackingSet();
13
15
  get size(): number;
14
16
  constructor(set: DistinctCollection<T, any>);
15
17
  add(value: T): this;
16
18
  clear(): void;
17
19
  delete(value: T): boolean;
20
+ union<U>(other: ReadonlySetLike<U>): Set<T | U>;
21
+ intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
22
+ difference<U>(other: ReadonlySetLike<U>): Set<T>;
23
+ symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
24
+ isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
25
+ isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
26
+ isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
18
27
  forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
19
28
  has(value: T): boolean;
20
29
  entries(): IterableIterator<[T, T]>;
@@ -1,6 +1,7 @@
1
1
  import { Collection } from './collection.js';
2
+ ;
2
3
  export class DistinctCollection extends Collection {
3
- /** Creates a new map and copies the items */
4
+ /** Creates a new set and copies the items */
4
5
  toSet() {
5
6
  return new Set(this);
6
7
  }
@@ -12,6 +13,9 @@ export class DistinctCollection extends Collection {
12
13
  export class SetAdapter {
13
14
  collection;
14
15
  [Symbol.toStringTag] = 'SetAdapter';
16
+ get fastestBackingSet() {
17
+ return this.collection._backingSet ?? this.collection.toSet();
18
+ }
15
19
  get size() {
16
20
  return this.collection.size;
17
21
  }
@@ -28,6 +32,27 @@ export class SetAdapter {
28
32
  delete(value) {
29
33
  return this.collection.delete(value);
30
34
  }
35
+ union(other) {
36
+ return this.fastestBackingSet.union(other);
37
+ }
38
+ intersection(other) {
39
+ return this.fastestBackingSet.intersection(other);
40
+ }
41
+ difference(other) {
42
+ return this.fastestBackingSet.difference(other);
43
+ }
44
+ symmetricDifference(other) {
45
+ return this.fastestBackingSet.symmetricDifference(other);
46
+ }
47
+ isSubsetOf(other) {
48
+ return this.fastestBackingSet.isSubsetOf(other);
49
+ }
50
+ isSupersetOf(other) {
51
+ return this.fastestBackingSet.isSupersetOf(other);
52
+ }
53
+ isDisjointFrom(other) {
54
+ return this.fastestBackingSet.isDisjointFrom(other);
55
+ }
31
56
  forEach(callbackfn, thisArg) {
32
57
  for (const value of this.collection) {
33
58
  callbackfn.call(thisArg, value, value, this);
@@ -1,5 +1,5 @@
1
1
  import { DistinctCollection } from './distinct-collection.js';
2
- import { NewMapProvider } from './multi-key-map.js';
2
+ import { type NewMapProvider } from './multi-key-map.js';
3
3
  export declare class MultiKeySet<T extends any[]> extends DistinctCollection<T> {
4
4
  #private;
5
5
  readonly [Symbol.toStringTag]: string;
@@ -15,5 +15,6 @@ export declare class MultiKeySet<T extends any[]> extends DistinctCollection<T>
15
15
  clone(): MultiKeySet<T>;
16
16
  items(): IterableIterator<T>;
17
17
  protected _clear(): void;
18
+ protected _getBackingSet(): ReadonlySet<T> | undefined;
18
19
  private updateSize;
19
20
  }
@@ -52,6 +52,9 @@ export class MultiKeySet extends DistinctCollection {
52
52
  this.#map.clear();
53
53
  this.updateSize();
54
54
  }
55
+ _getBackingSet() {
56
+ return undefined;
57
+ }
55
58
  updateSize() {
56
59
  this.setSize(this.#map.size);
57
60
  }
@@ -3,17 +3,26 @@ export declare class SetCollection<T> extends DistinctCollection<T, SetCollectio
3
3
  private readonly backingSet;
4
4
  readonly [Symbol.toStringTag]: string;
5
5
  constructor(items?: Iterable<T>);
6
+ private static withBackingSet;
6
7
  includes(item: T): boolean;
7
8
  add(item: T): this;
8
9
  addMany(items: Iterable<T>): void;
9
10
  clone(): SetCollection<T>;
10
11
  items(): IterableIterator<T>;
11
12
  delete(item: T): boolean;
13
+ union<U>(other: ReadonlySetLike<U>): SetCollection<T | U>;
14
+ intersection<U>(other: ReadonlySetLike<U>): SetCollection<T & U>;
15
+ difference<U>(other: ReadonlySetLike<U>): SetCollection<T>;
16
+ symmetricDifference<U>(other: ReadonlySetLike<U>): SetCollection<T | U>;
17
+ isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
18
+ isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
19
+ isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
12
20
  forEach(callbackfn: (value: T, value2: T, set: globalThis.Set<T>) => void, thisArg?: any): void;
13
21
  has(item: T): boolean;
14
22
  entries(): IterableIterator<[T, T]>;
15
23
  keys(): IterableIterator<T>;
16
24
  values(): IterableIterator<T>;
17
25
  protected _clear(): void;
26
+ protected _getBackingSet(): ReadonlySet<T> | undefined;
18
27
  private updateSize;
19
28
  }
@@ -7,6 +7,11 @@ export class SetCollection extends DistinctCollection {
7
7
  this.backingSet = new globalThis.Set(items);
8
8
  this.updateSize();
9
9
  }
10
+ static withBackingSet(set) {
11
+ const collection = new SetCollection();
12
+ collection.backingSet = set;
13
+ return collection;
14
+ }
10
15
  includes(item) {
11
16
  return this.has(item);
12
17
  }
@@ -32,6 +37,27 @@ export class SetCollection extends DistinctCollection {
32
37
  this.updateSize();
33
38
  return result;
34
39
  }
40
+ union(other) {
41
+ return SetCollection.withBackingSet(this.backingSet.union(other));
42
+ }
43
+ intersection(other) {
44
+ return SetCollection.withBackingSet(this.backingSet.intersection(other));
45
+ }
46
+ difference(other) {
47
+ return SetCollection.withBackingSet(this.backingSet.difference(other));
48
+ }
49
+ symmetricDifference(other) {
50
+ return SetCollection.withBackingSet(this.backingSet.symmetricDifference(other));
51
+ }
52
+ isSubsetOf(other) {
53
+ return this.backingSet.isSubsetOf(other);
54
+ }
55
+ isSupersetOf(other) {
56
+ return this.backingSet.isSupersetOf(other);
57
+ }
58
+ isDisjointFrom(other) {
59
+ return this.backingSet.isDisjointFrom(other);
60
+ }
35
61
  forEach(callbackfn, thisArg) {
36
62
  this.backingSet.forEach(callbackfn, thisArg);
37
63
  }
@@ -50,6 +76,9 @@ export class SetCollection extends DistinctCollection {
50
76
  _clear() {
51
77
  this.backingSet.clear();
52
78
  }
79
+ _getBackingSet() {
80
+ return this.backingSet;
81
+ }
53
82
  updateSize() {
54
83
  this.setSize(this.backingSet.size);
55
84
  }
@@ -4,8 +4,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- /* eslint-disable max-classes-per-file */
8
- import { resolveArgumentType } from '../../injector/interfaces.js';
9
7
  import { ReplaceClass } from '../../injector/decorators.js';
10
8
  import { Db, Collection as MongoCollection, MongoClient as MongoMongoClient } from 'mongodb';
11
9
  let MongoClient = class MongoClient extends MongoMongoClient {
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
13
  import { CancellationToken } from '../cancellation/index.js';
14
- import { InjectArg, Injectable, resolveArgumentType } from '../injector/index.js';
14
+ import { InjectArg, Injectable } from '../injector/index.js';
15
15
  import { LockProvider } from '../lock/index.js';
16
16
  import { DeferredPromise } from '../promise/deferred-promise.js';
17
17
  import { Timer } from '../utils/timer.js';
@@ -1,4 +1,4 @@
1
- import { type Signal } from '../../signals/api.js';
2
1
  import { type Observable } from 'rxjs';
2
+ import { type Signal } from '../../signals/api.js';
3
3
  export declare function observeIntersection$(element: Element, options?: IntersectionObserverInit): Observable<IntersectionObserverEntry>;
4
4
  export declare function observeIntersection(elements: Element, options?: IntersectionObserverInit): Signal<IntersectionObserverEntry | undefined>;
@@ -1,25 +1,38 @@
1
- import { IterableWeakMap } from '../../data-structures/iterable-weak-map.js';
1
+ import { Subject, filter, fromEventPattern, map, shareReplay, startWith } from 'rxjs';
2
2
  import { toSignal } from '../../signals/api.js';
3
3
  import { FactoryMap } from '../../utils/factory-map.js';
4
4
  import { isDefined, isNumber } from '../../utils/type-guards.js';
5
- import { Subject, filter, fromEventPattern, map, shareReplay } from 'rxjs';
6
- const observerMap = new FactoryMap((root) => new FactoryMap((rootMargin) => new FactoryMap((threshold) => {
7
- const observer = new IntersectionObserver((entries) => subject.next(entries), { root, rootMargin, threshold });
8
- const subject = new Subject;
9
- return ({
10
- observer,
11
- subject,
12
- elementObservables: new FactoryMap((element) => fromEventPattern((handler) => {
13
- observer.observe(element);
14
- return subject.pipe(map((entries) => entries.find((entry) => entry.target == element)), filter(isDefined)).subscribe((entry) => handler(entry));
15
- }, (_, subscription) => {
16
- observer.unobserve(element);
17
- subscription.unsubscribe();
18
- }).pipe(shareReplay({ bufferSize: 1, refCount: true })), new IterableWeakMap())
5
+ const nullRoot = { nullRoot: true };
6
+ const rootMap = new FactoryMap((root) => {
7
+ const rootMarginMap = new FactoryMap((rootMargin) => {
8
+ const thresholdMap = new FactoryMap((threshold) => {
9
+ const observer = new IntersectionObserver((entries) => subject.next(entries), { root: root == nullRoot ? null : root, rootMargin, threshold });
10
+ const subject = new Subject();
11
+ const elementObservablesMap = new FactoryMap((element) => fromEventPattern((handler) => {
12
+ observer.observe(element);
13
+ return subject.pipe(startWith(observer.takeRecords()), map((entries) => entries.find((entry) => entry.target == element)), filter(isDefined)).subscribe((entry) => handler(entry));
14
+ }, (_, subscription) => {
15
+ observer.unobserve(element);
16
+ subscription.unsubscribe();
17
+ elementObservablesMap.delete(element);
18
+ if (elementObservablesMap.size == 0) {
19
+ thresholdMap.delete(threshold);
20
+ if (thresholdMap.size == 0) {
21
+ rootMarginMap.delete(rootMargin);
22
+ if (rootMarginMap.size == 0) {
23
+ rootMap.delete(root);
24
+ }
25
+ }
26
+ }
27
+ }).pipe(shareReplay({ bufferSize: 1, refCount: true })));
28
+ return elementObservablesMap;
29
+ }, undefined, (threshold) => isNumber(threshold) ? threshold : threshold?.join(','));
30
+ return thresholdMap;
19
31
  });
20
- }, undefined, (threshold) => isNumber(threshold) ? threshold : threshold?.join(','))));
32
+ return rootMarginMap;
33
+ });
21
34
  export function observeIntersection$(element, options) {
22
- return observerMap.get(options?.root).get(options?.rootMargin).get(options?.threshold).elementObservables.get(element);
35
+ return rootMap.get(options?.root ?? nullRoot).get(options?.rootMargin).get(options?.threshold).get(element);
23
36
  }
24
37
  export function observeIntersection(elements, options) {
25
38
  return toSignal(observeIntersection$(elements, options));
@@ -8,7 +8,7 @@ import { Readable } from 'node:stream';
8
8
  import { request, errors as undiciErrors } from 'undici';
9
9
  import { HttpHeaders } from '../../../http/http-headers.js';
10
10
  import { HttpError, HttpErrorReason } from '../../../http/http.error.js';
11
- import { Singleton, injectArgument, resolveArgumentType } from '../../../injector/index.js';
11
+ import { Singleton, injectArgument } from '../../../injector/index.js';
12
12
  import { Injector } from '../../../injector/injector.js';
13
13
  import { toArray } from '../../../utils/array/array.js';
14
14
  import { isBlob, isDefined, isUint8Array } from '../../../utils/type-guards.js';
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { hasErrorHandler, isErrorResponse, parseErrorResponse } from '../../api/response.js';
11
- import { Singleton, inject, injectAll, injectArgument, resolveArgumentType } from '../../injector/index.js';
11
+ import { Singleton, inject, injectAll, injectArgument } from '../../injector/index.js';
12
12
  import { toArray } from '../../utils/array/array.js';
13
13
  import { encodeBase64 } from '../../utils/base64.js';
14
14
  import { encodeUtf8 } from '../../utils/encoding.js';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import * as Http from 'node:http';
3
2
  import { disposeAsync, type AsyncDisposable } from '../../../disposable/index.js';
4
3
  import { Logger } from '../../../logger/index.js';
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
- import { InjectArg, Singleton, injectionToken, resolveArgumentType } from '../../injector/index.js';
13
+ import { InjectArg, Singleton, injectionToken } from '../../injector/index.js';
14
14
  import { Injector } from '../../injector/injector.js';
15
15
  import { encodeBase64Url } from '../../utils/base64.js';
16
16
  import { concatArrayBufferViews } from '../../utils/binary.js';
package/import.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export async function dynamicImport(id) {
2
- return import(id);
2
+ return import(/* @vite-ignore */ id);
3
3
  }
@@ -14,5 +14,5 @@ export declare class NumberParser {
14
14
  */
15
15
  parse(value: string, loose?: boolean): number;
16
16
  }
17
- export declare const getNumberParser: (locale: string) => NumberParser;
17
+ export declare const getNumberParser: (locale: string) => InstanceType<typeof NumberParser>;
18
18
  export declare function parseNumber(locale: string, value: string, loose?: boolean): number;
@@ -1,4 +1,3 @@
1
- import { resolveArgumentType } from '../injector/interfaces.js';
2
1
  export class KeyValueStore {
3
2
  module;
4
3
  constructor(module) {
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
13
  import { Collection, MongoEntityRepository, noopTransformer } from '../../database/mongo/index.js';
14
- import { ForwardArg, ResolveArg, Singleton, resolveArgumentType } from '../../injector/index.js';
14
+ import { ForwardArg, ResolveArg, Singleton } from '../../injector/index.js';
15
15
  import { Logger } from '../../logger/index.js';
16
16
  import { DEFAULT_KEY_VALUE_REPOSITORY_CONFIG } from './tokens.js';
17
17
  const indexes = [
package/lock/lock.js CHANGED
@@ -1,4 +1,3 @@
1
- import { resolveArgumentType } from '../injector/index.js';
2
1
  export class Lock {
3
2
  resource;
4
3
  constructor(resource) {
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  };
13
13
  import { getNewId } from '../../database/index.js';
14
14
  import { Collection, MongoEntityRepository, noopTransformer } from '../../database/mongo/index.js';
15
- import { ForwardArg, Singleton, resolveArgumentType } from '../../injector/index.js';
15
+ import { ForwardArg, Singleton } from '../../injector/index.js';
16
16
  import { Logger } from '../../logger/index.js';
17
17
  import { now } from '../../utils/date-time.js';
18
18
  import { MongoError } from 'mongodb';
package/lock/provider.js CHANGED
@@ -1,3 +1,2 @@
1
- import { resolveArgumentType } from '../injector/index.js';
2
1
  export class LockProvider {
3
2
  }
package/logger/logger.js CHANGED
@@ -1,4 +1,3 @@
1
- import { resolveArgumentType } from '../injector/index.js';
2
1
  import { toArray } from '../utils/array/array.js';
3
2
  import { isDefined, isFunction } from '../utils/type-guards.js';
4
3
  import { LogLevel } from './level.js';
@@ -7,7 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { resolveArgumentType } from '../injector/index.js';
11
10
  import { Property } from '../schema/decorators/property.js';
12
11
  import { BooleanProperty } from '../schema/schemas/boolean.js';
13
12
  import { Optional } from '../schema/schemas/optional.js';
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
13
  import { Collection, MongoEntityRepository, noopTransformer } from '../../../database/mongo/index.js';
14
- import { ForwardArg, Singleton, resolveArgumentType } from '../../../injector/index.js';
14
+ import { ForwardArg, Singleton } from '../../../injector/index.js';
15
15
  import { Logger } from '../../../logger/index.js';
16
16
  export const mongoMailLogRepositoryConfig = {};
17
17
  const indexes = [];
@@ -1,4 +1,3 @@
1
- import { resolveArgumentType } from '../injector/interfaces.js';
2
1
  import { disposeAsync } from '../disposable/disposable.js';
3
2
  export class MessageBus {
4
3
  async dispose() {
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
- import { ForwardArg, ResolveArg, Singleton, resolveArgumentType } from '../../injector/index.js';
13
+ import { ForwardArg, ResolveArg, Singleton } from '../../injector/index.js';
14
14
  import { Logger } from '../../logger/index.js';
15
15
  import { Collection } from '../../database/mongo/classes.js';
16
16
  import { MongoEntityRepository, noopTransformer } from '../../database/mongo/mongo-entity-repository.js';
@@ -12,7 +12,6 @@ import { disposeAsync } from '../../disposable/disposable.js';
12
12
  import { HttpServer } from '../../http/server/http-server.js';
13
13
  import { Singleton } from '../../injector/decorators.js';
14
14
  import { inject, injectArgument } from '../../injector/inject.js';
15
- import { resolveArgumentType } from '../../injector/interfaces.js';
16
15
  import { ModuleBase } from '../module-base.js';
17
16
  import { ModuleMetricType } from '../module.js';
18
17
  export const webServerModuleConfiguration = {
@@ -1,4 +1,3 @@
1
- import { resolveArgumentType } from '../injector/interfaces.js';
2
1
  export class ObjectStorage {
3
2
  /** Object storage module */
4
3
  module;
@@ -11,7 +11,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
13
  import { Collection, MongoEntityRepository, mapTo } from '../database/mongo/index.js';
14
- import { ForwardArg, ResolveArg, Singleton, resolveArgumentType } from '../injector/index.js';
14
+ import { ForwardArg, ResolveArg, Singleton } from '../injector/index.js';
15
15
  import { Injector } from '../injector/injector.js';
16
16
  import { Logger } from '../logger/index.js';
17
17
  import { OidcStateRepository } from './oidc-state.repository.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.90.90",
3
+ "version": "0.90.91",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -123,15 +123,15 @@
123
123
  "@types/mjml": "4.7",
124
124
  "@types/node": "20",
125
125
  "@types/nodemailer": "6.4",
126
- "@typescript-eslint/eslint-plugin": "7.13",
126
+ "@typescript-eslint/eslint-plugin": "7.14",
127
127
  "concurrently": "8.2",
128
128
  "eslint": "8.57",
129
129
  "eslint-import-resolver-typescript": "3.6",
130
130
  "eslint-plugin-import": "2.29",
131
131
  "tsc-alias": "1.8",
132
- "typedoc": "0.25",
133
- "typedoc-plugin-missing-exports": "2.3",
134
- "typescript": "5.4"
132
+ "typedoc": "0.26",
133
+ "typedoc-plugin-missing-exports": "3.0",
134
+ "typescript": "5.5"
135
135
  },
136
136
  "peerDependencies": {
137
137
  "@elastic/elasticsearch": "^8.14",
@@ -148,7 +148,7 @@
148
148
  "mjml": "^4.15",
149
149
  "mongodb": "^6.7",
150
150
  "nodemailer": "^6.9",
151
- "playwright": "^1.44",
151
+ "playwright": "^1.45",
152
152
  "preact": "^10.22",
153
153
  "preact-render-to-string": "^6.5",
154
154
  "undici": "^6.19",
@@ -11,8 +11,8 @@ export type PasswordCheckLocalization = Localization<{
11
11
  export declare const passwordCheckLocalizationKeys: import("../text/localization.service.js").ProxyLocalizationKeys<{
12
12
  tstdl: {
13
13
  passwordCheck: {
14
- warnings: Record<keyof (typeof zxcvbnTranslationKeys)['default']['warnings'], LocalizeItem>;
15
- suggestions: Record<keyof (typeof zxcvbnTranslationKeys)['default']['suggestions'], LocalizeItem>;
14
+ warnings: Record<keyof (typeof zxcvbnTranslationKeys)["default"]["warnings"], LocalizeItem>;
15
+ suggestions: Record<keyof (typeof zxcvbnTranslationKeys)["default"]["suggestions"], LocalizeItem>;
16
16
  };
17
17
  };
18
18
  }>;
@@ -15,7 +15,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
15
15
  var __addDisposableResource = (this && this.__addDisposableResource) || function (env, value, async) {
16
16
  if (value !== null && value !== void 0) {
17
17
  if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
18
- var dispose;
18
+ var dispose, inner;
19
19
  if (async) {
20
20
  if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
21
21
  dispose = value[Symbol.asyncDispose];
@@ -23,8 +23,10 @@ var __addDisposableResource = (this && this.__addDisposableResource) || function
23
23
  if (dispose === void 0) {
24
24
  if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
25
25
  dispose = value[Symbol.dispose];
26
+ if (async) inner = dispose;
26
27
  }
27
28
  if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
29
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
28
30
  env.stack.push({ value: value, dispose: dispose, async: async });
29
31
  }
30
32
  else if (async) {
@@ -64,7 +66,7 @@ import { tmpdir } from 'node:os';
64
66
  import { BrowserContextController } from '../browser/browser-context-controller.js';
65
67
  import { BrowserController } from '../browser/browser-controller.js';
66
68
  import { PdfRenderOptions } from '../browser/pdf-options.js';
67
- import { Singleton, inject, injectArgument, resolveArgumentType } from '../injector/index.js';
69
+ import { Singleton, inject, injectArgument } from '../injector/index.js';
68
70
  import { LogLevel } from '../logger/level.js';
69
71
  import { Logger } from '../logger/logger.js';
70
72
  import { Optional } from '../schema/index.js';
@@ -12,7 +12,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  };
13
13
  import { getNewId } from '../../database/index.js';
14
14
  import { Collection, MongoEntityRepository, noopTransformer } from '../../database/mongo/index.js';
15
- import { ForwardArg, ResolveArg, Singleton, resolveArgumentType } from '../../injector/index.js';
15
+ import { ForwardArg, ResolveArg, Singleton } from '../../injector/index.js';
16
16
  import { Logger } from '../../logger/index.js';
17
17
  import { UniqueTagStrategy } from '../../queue/index.js';
18
18
  const indexes = [
@@ -12,7 +12,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  };
13
13
  import { ForwardArg, ResolveArg, Singleton } from '../../injector/decorators.js';
14
14
  import { Injector } from '../../injector/injector.js';
15
- import { resolveArgumentType } from '../../injector/interfaces.js';
16
15
  import { LockProvider } from '../../lock/index.js';
17
16
  import { MessageBusProvider } from '../../message-bus/index.js';
18
17
  import { Queue, QueueProvider } from '../../queue/index.js';
package/queue/queue.js CHANGED
@@ -1,4 +1,3 @@
1
- import { resolveArgumentType } from '../injector/interfaces.js';
2
1
  import { millisecondsPerMinute } from '../utils/units.js';
3
2
  import { QueueEnqueueBatch } from './enqueue-batch.js';
4
3
  export const defaultJobPriority = 1000;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type * as NodeWorkerThreads from 'node:worker_threads';
3
2
  import type { Observable } from 'rxjs';
4
3
  import type { RpcChannelMessage } from '../rpc.endpoint.js';
package/rpc/rpc.d.ts CHANGED
@@ -6,16 +6,16 @@ export declare const Rpc: {
6
6
  listen(endpoint: RpcEndpoint): void;
7
7
  connect<T extends RpcRemoteInput>(endpoint: RpcEndpoint, name?: string): Promise<RpcRemote<T>>;
8
8
  expose(object: RpcRemoteInput, name?: string): void;
9
- registerAdapter<T_1 extends object, Data>(adapter: RpcAdapter<T_1, Data, any, any, any>): void;
9
+ registerAdapter<T extends object, Data>(adapter: RpcAdapter<T, Data>): void;
10
10
  /**
11
11
  * mark object for proxy forward
12
12
  * @param object object to forward as proxy
13
13
  * @param root if object is a child of the actual passed value (to function calls, returns or whatever), this must be set to to mark the parent for serialization (required for children proxies)
14
14
  * @returns
15
15
  */
16
- proxy<T_2 extends object>(object: T_2, root?: object): T_2;
17
- transfer<T_3 extends object>(object: T_3, transfer: any[]): T_3;
18
- serialize<T_4 extends object>(object: T_4, options?: SerializationOptions): T_4;
19
- adapt<T_5 extends object>(object: T_5, adapter: RpcAdapter<T_5, any, any, any, any>, root?: object): T_5;
16
+ proxy<T extends object>(object: T, root?: object): T;
17
+ transfer<T extends object>(object: T, transfer: any[]): T;
18
+ serialize<T extends object>(object: T, options?: SerializationOptions): T;
19
+ adapt<T extends object>(object: T, adapter: RpcAdapter<T>, root?: object): T;
20
20
  isProxied(object: object): boolean;
21
21
  };
@@ -6,10 +6,10 @@ export type NormalizedSchema<T = any> = NormalizedObjectSchema<T> | NormalizedVa
6
6
  export declare const Schema: {
7
7
  registerDefaultCoercer(coercer: SchemaValueCoercer): void;
8
8
  test<T>(schemaOrValueType: SchemaTestable<T>, value: unknown, options?: SchemaTestOptions, path?: JsonPath): SchemaTestResult<T>;
9
- validate<T_1>(schemaOrValueType: SchemaTestable<T_1>, value: unknown, options?: SchemaTestOptions): boolean;
10
- parse<T_2>(schemaOrValueType: SchemaTestable<T_2>, value: unknown, options?: SchemaTestOptions): T_2;
11
- function<T_3 extends readonly SchemaTestable<any>[], R extends SchemaTestable<any>, F extends (...args: TupleSchemaOutput<T_3>) => SchemaOutput<R>>(argumentSchemas: T_3, returnSchema: R, handler: F): F;
12
- asyncFunction<T_4 extends readonly SchemaTestable<any>[], R_1 extends SchemaTestable<any>, F_1 extends (...args: TupleSchemaOutput<T_4>) => Promise<SchemaOutput<R_1>>>(argumentSchemas: T_4, returnSchema: R_1, handler: F_1): F_1;
9
+ validate<T>(schemaOrValueType: SchemaTestable<T>, value: unknown, options?: SchemaTestOptions): boolean;
10
+ parse<T>(schemaOrValueType: SchemaTestable<T>, value: unknown, options?: SchemaTestOptions): T;
11
+ function<T extends readonly SchemaTestable[], R extends SchemaTestable, F extends (...args: TupleSchemaOutput<T>) => SchemaOutput<R>>(argumentSchemas: T, returnSchema: R, handler: F): F;
12
+ asyncFunction<T extends readonly SchemaTestable[], R extends SchemaTestable, F extends (...args: TupleSchemaOutput<T>) => Promise<SchemaOutput<R>>>(argumentSchemas: T, returnSchema: R, handler: F): F;
13
13
  };
14
14
  export declare function testSchema<T>(schema: Schema<T>, value: unknown, options?: SchemaTestOptions, path?: JsonPath): SchemaTestResult<T>;
15
15
  export declare function getExpectString(schema: SchemaTestable): string;
@@ -11,7 +11,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
11
  return function (target, key) { decorator(target, key, paramIndex); }
12
12
  };
13
13
  import { InjectArg, Injectable } from '../../injector/decorators.js';
14
- import { resolveArgumentType } from '../../injector/interfaces.js';
15
14
  import { isString } from '../../utils/type-guards.js';
16
15
  let ElasticSearchIndexConfig = class ElasticSearchIndexConfig {
17
16
  indexName;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { TypedArray } from '../../types.js';
3
2
  interface TypedArrayConstructor {
4
3
  readonly BYTES_PER_ELEMENT: number;
@@ -1 +1,2 @@
1
- export declare const toLazySignal: typeof import("./implementation/to-signal.js").toSignal;
1
+ import { toSignal } from './api.js';
2
+ export declare const toLazySignal: typeof toSignal;
@@ -13,7 +13,6 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
13
13
  import * as path from 'node:path';
14
14
  import { BadRequestError } from '../../errors/bad-request.error.js';
15
15
  import { InjectArg, Singleton } from '../../injector/decorators.js';
16
- import { resolveArgumentType } from '../../injector/interfaces.js';
17
16
  import { Schema } from '../../schema/index.js';
18
17
  import { Template } from '../template.model.js';
19
18
  import { TemplateProvider } from '../template.provider.js';
@@ -14,7 +14,6 @@ import * as fs from 'node:fs/promises';
14
14
  import * as path from 'node:path';
15
15
  import { BadRequestError } from '../../errors/bad-request.error.js';
16
16
  import { InjectArg, Singleton } from '../../injector/decorators.js';
17
- import { resolveArgumentType } from '../../injector/interfaces.js';
18
17
  import { Property } from '../../schema/index.js';
19
18
  import { TemplateField } from '../template.model.js';
20
19
  import { TemplateResolver } from '../template.resolver.js';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type * as NodeWorkerThreads from 'node:worker_threads';
3
2
  import type { LiteralUnion } from 'type-fest';
4
3
  import type { AsyncDisposable } from '../disposable/index.js';
@@ -1,6 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
- /// <reference types="node" resolution-mode="require"/>
3
- /// <reference types="node" resolution-mode="require"/>
4
1
  import type { Stream } from 'node:stream';
5
2
  import type * as NodeZlib from 'node:zlib';
6
3
  export interface CompressionResult {
@@ -1,4 +1,4 @@
1
- export type Factory<Key, Value> = (key: Key) => Value;
1
+ export type Factory<K, V> = (key: K) => V;
2
2
  export type FactoryItemIdentityProvider<K, I> = (key: K) => I;
3
3
  /** Same as {@link Map}, except that it will build the value with the provided factory on {@link get} if it doesnt exist */
4
4
  export declare class FactoryMap<K, V, I = K> implements Map<K, V> {
@@ -11,10 +11,10 @@ export type ForwardRef<T extends object = object> = T & {
11
11
  };
12
12
  export declare const ForwardRef: {
13
13
  create<T extends object>(options?: ForwardRefOptions<T>): ForwardRef<T>;
14
- isForwardRef<T_1 extends object = object>(value: any): value is ForwardRef<T_1>;
15
- hasRef<T_2 extends object>(forwardRef: T_2 | ForwardRef<T_2>): boolean;
16
- deref<T_3 extends object>(forwardRef: T_3 | ForwardRef<T_3>): T_3;
17
- tryDeref<T_4 extends object>(forwardRef: T_4 | ForwardRef<T_4>): T_4 | undefined;
18
- setRef<T_5 extends object>(forwardRef: T_5 | ForwardRef<T_5>, reference: T_5 | undefined): void;
14
+ isForwardRef<T extends object = object>(value: any): value is ForwardRef<T>;
15
+ hasRef<T extends object>(forwardRef: ForwardRef<T> | T): boolean;
16
+ deref<T extends object>(forwardRef: ForwardRef<T> | T): T;
17
+ tryDeref<T extends object>(forwardRef: ForwardRef<T> | T): T | undefined;
18
+ setRef<T extends object>(forwardRef: ForwardRef<T> | T, reference: T | undefined): void;
19
19
  };
20
20
  export {};
package/utils/repl.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import type { ReplOptions } from 'node:repl';
3
2
  import type { Record } from '../types.js';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  declare const nonObjectBufferModeSymbol: unique symbol;
3
2
  declare const nonObjectStringModeSymbol: unique symbol;
4
3
  export type NonObjectMode = NonObjectBufferMode | NonObjectStringMode;