@amazon/vinyl-util 1.2.0 → 2.0.4

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 (81) hide show
  1. package/dist/browserTestUtil/index.js +1850 -1850
  2. package/dist/browserTestUtil/index.js.map +4 -4
  3. package/dist/browserTestUtil/types/current/index.d.ts +17 -17
  4. package/dist/browserTestUtil/types/current/index.d.ts.map +1 -1
  5. package/dist/browserTestUtil/types/current/index.js +17 -17
  6. package/dist/browserTestUtil/types/current/tsconfig.tsbuildinfo +1 -1
  7. package/dist/browserTestUtil/types/ts3.7/index.d.ts +17 -17
  8. package/dist/browserTestUtil/types/ts4.1/index.d.ts +17 -17
  9. package/dist/browserTestUtil/types/ts4.7/index.d.ts +17 -17
  10. package/dist/index.cjs +4997 -4967
  11. package/dist/index.cjs.map +4 -4
  12. package/dist/index.js +4997 -4967
  13. package/dist/index.js.map +4 -4
  14. package/dist/polyfill/index.d.ts +1 -0
  15. package/dist/polyfill/index.d.ts.map +1 -1
  16. package/dist/polyfill/index.js +166 -103
  17. package/dist/polyfill/index.js.map +3 -3
  18. package/dist/polyfill/tsconfig.tsbuildinfo +1 -1
  19. package/dist/test/benchmark.es5.js +68 -68
  20. package/dist/test/benchmark.js +1518 -1517
  21. package/dist/test/benchmark.js.map +4 -4
  22. package/dist/testUtil/index.js +418 -418
  23. package/dist/testUtil/index.js.map +4 -4
  24. package/dist/testUtil/types/current/index.d.ts +16 -16
  25. package/dist/testUtil/types/current/index.d.ts.map +1 -1
  26. package/dist/testUtil/types/current/index.js +16 -16
  27. package/dist/testUtil/types/current/reporters/LogReporter.d.ts +1 -0
  28. package/dist/testUtil/types/current/reporters/LogReporter.d.ts.map +1 -1
  29. package/dist/testUtil/types/current/reporters/LogReporter.js +8 -0
  30. package/dist/testUtil/types/current/tsconfig.tsbuildinfo +1 -1
  31. package/dist/testUtil/types/current/util/event/createEventSpy.d.ts.map +1 -1
  32. package/dist/testUtil/types/current/util/event/createEventSpy.js +6 -4
  33. package/dist/testUtil/types/ts3.7/index.d.ts +16 -16
  34. package/dist/testUtil/types/ts3.7/reporters/LogReporter.d.ts +1 -0
  35. package/dist/testUtil/types/ts4.1/index.d.ts +16 -16
  36. package/dist/testUtil/types/ts4.1/reporters/LogReporter.d.ts +1 -0
  37. package/dist/testUtil/types/ts4.7/index.d.ts +16 -16
  38. package/dist/testUtil/types/ts4.7/reporters/LogReporter.d.ts +1 -0
  39. package/dist/types/current/event/nextEventAsPromise.d.ts +14 -4
  40. package/dist/types/current/event/nextEventAsPromise.d.ts.map +1 -1
  41. package/dist/types/current/event/nextEventAsPromise.js +8 -2
  42. package/dist/types/current/index.d.ts +114 -113
  43. package/dist/types/current/index.d.ts.map +1 -1
  44. package/dist/types/current/index.js +114 -113
  45. package/dist/types/current/tsconfig.tsbuildinfo +1 -1
  46. package/dist/types/current/util/async/poll.d.ts +34 -0
  47. package/dist/types/current/util/async/poll.d.ts.map +1 -0
  48. package/dist/types/current/util/async/poll.js +31 -0
  49. package/dist/types/current/util/async/sleep.d.ts +2 -1
  50. package/dist/types/current/util/async/sleep.d.ts.map +1 -1
  51. package/dist/types/current/util/async/timeout.d.ts +32 -10
  52. package/dist/types/current/util/async/timeout.d.ts.map +1 -1
  53. package/dist/types/current/util/async/timeout.js +7 -11
  54. package/dist/types/current/util/map/map.d.ts +1 -2
  55. package/dist/types/current/util/map/map.d.ts.map +1 -1
  56. package/dist/types/current/util/url/resolveUrl.d.ts +2 -1
  57. package/dist/types/current/util/url/resolveUrl.d.ts.map +1 -1
  58. package/dist/types/current/util/url/resolveUrl.js +9 -3
  59. package/dist/types/ts3.7/event/nextEventAsPromise.d.ts +14 -4
  60. package/dist/types/ts3.7/index.d.ts +114 -113
  61. package/dist/types/ts3.7/util/async/poll.d.ts +34 -0
  62. package/dist/types/ts3.7/util/async/sleep.d.ts +2 -1
  63. package/dist/types/ts3.7/util/async/timeout.d.ts +32 -10
  64. package/dist/types/ts3.7/util/map/map.d.ts +1 -2
  65. package/dist/types/ts3.7/util/url/resolveUrl.d.ts +2 -1
  66. package/dist/types/ts4.1/event/nextEventAsPromise.d.ts +14 -4
  67. package/dist/types/ts4.1/index.d.ts +114 -113
  68. package/dist/types/ts4.1/util/async/poll.d.ts +34 -0
  69. package/dist/types/ts4.1/util/async/sleep.d.ts +2 -1
  70. package/dist/types/ts4.1/util/async/timeout.d.ts +32 -10
  71. package/dist/types/ts4.1/util/map/map.d.ts +1 -2
  72. package/dist/types/ts4.1/util/url/resolveUrl.d.ts +2 -1
  73. package/dist/types/ts4.7/event/nextEventAsPromise.d.ts +14 -4
  74. package/dist/types/ts4.7/index.d.ts +114 -113
  75. package/dist/types/ts4.7/util/async/poll.d.ts +34 -0
  76. package/dist/types/ts4.7/util/async/sleep.d.ts +2 -1
  77. package/dist/types/ts4.7/util/async/timeout.d.ts +32 -10
  78. package/dist/types/ts4.7/util/map/map.d.ts +1 -2
  79. package/dist/types/ts4.7/util/url/resolveUrl.d.ts +2 -1
  80. package/dist/unit/types/current/tsconfig.tsbuildinfo +1 -1
  81. package/package.json +13 -15
@@ -1,118 +1,119 @@
1
1
  /** Auto-generated from build scripts */
2
- export * from './util/type';
3
- export * from './util/url/resolveUrl';
4
- export * from './util/string/uid';
5
- export * from './util/string/string';
6
- export * from './util/string/StringReader';
7
- export * from './util/set/set';
8
- export * from './util/serialization/stringifyForPrint';
9
- export * from './util/serialization/primitives';
10
- export * from './util/serialization/json';
11
- export * from './util/serialization/ParseError';
12
- export * from './util/range/timeRanges';
13
- export * from './util/range/UnionRanges';
14
- export * from './util/range/Ranges';
15
- export * from './util/range/IntersectionRanges';
16
- export * from './util/object/readonlyType';
17
- export * from './util/object/object';
18
- export * from './util/object/mutableType';
19
- export * from './util/object/mergeDeep';
20
- export * from './util/object/merge';
21
- export * from './util/object/lazy';
22
- export * from './util/object/equalDeep';
23
- export * from './util/object/clone';
24
- export * from './util/network/request';
25
- export * from './util/mpeg/parseSidxBox';
26
- export * from './util/math/math';
27
- export * from './util/map/map';
28
- export * from './util/iteration/iterable';
29
- export * from './util/fun/throttle';
30
- export * from './util/fun/memoize';
31
- export * from './util/fun/function';
32
- export * from './util/fun/flow';
33
- export * from './util/fun/debounce';
34
- export * from './util/error/stack';
35
- export * from './util/date/date';
36
- export * from './util/config/ValueProvider';
37
- export * from './util/comparison/compare';
38
- export * from './util/collection/typedArray';
39
- export * from './util/collection/array';
40
- export * from './util/collection/LruCache';
41
- export * from './util/collection/LinkedList';
42
- export * from './util/collection/CacheMap';
43
- export * from './util/buffer/buffer';
44
- export * from './util/buffer/BufferWriter';
45
- export * from './util/buffer/BufferReader';
46
- export * from './util/buffer/BufferError';
47
- export * from './util/browser/searchParams';
48
- export * from './util/async/timeout';
49
- export * from './util/async/sleep';
50
- export * from './util/async/promise';
51
- export * from './util/async/never';
52
- export * from './util/async/abortUtils';
53
- export * from './util/async/TimeoutSlot';
54
- export * from './util/async/TimeoutController';
55
- export * from './util/async/TaskQueue';
56
- export * from './util/async/Deferred';
57
- export * from './util/async/Abort';
58
- export * from './persistence/persistenceRef';
59
- export * from './persistence/StoragePersistence';
60
- export * from './persistence/PersistentItem';
61
- export * from './persistence/KeyValuePersistence';
62
- export * from './patch/patchTarget';
63
- export * from './patch/network/fetch';
64
- export * from './network/responseUtil';
65
- export * from './network/requesterUtil';
66
- export * from './network/requesterGlobal';
67
- export * from './network/network';
68
- export * from './network/createRequester';
69
- export * from './network/RequesterImplEventMap';
70
- export * from './network/RequesterImpl';
71
- export * from './network/Requester';
72
- export * from './network/RequestInterceptor';
73
- export * from './network/RequestError';
74
- export * from './network/metrics/networkMetricsModel';
75
- export * from './network/metrics/networkMetricsGlobal';
76
- export * from './network/metrics/NetworkMetricsControllerImpl';
77
- export * from './network/metrics/NetworkMetricsController';
78
- export * from './network/logging/networkLoggingHandler';
79
- export * from './network/browser/NetworkInformation';
80
- export * from './logging/logTimer';
2
+ export * from './client/userAgent/defaultUserAgentRules';
3
+ export * from './client/userAgent/hasBrowser';
4
+ export * from './client/userAgent/parseUserAgent';
5
+ export * from './client/userAgent/tokenizeUserAgent';
6
+ export * from './client/userAgent/UserAgentInfo';
7
+ export * from './client/userAgent/userAgentRuleHelpers';
8
+ export * from './client/Version';
9
+ export * from './core/clearable';
10
+ export * from './core/cloneable';
11
+ export * from './core/disposable';
12
+ export * from './core/Unsubscribe';
13
+ export * from './error/AbortError';
14
+ export * from './error/ErrorOrigin';
15
+ export * from './error/IllegalArgumentError';
16
+ export * from './error/IllegalStateError';
17
+ export * from './error/MediaUnsupportedError';
18
+ export * from './error/ReportableError';
19
+ export * from './error/ServiceResponseError';
20
+ export * from './error/StackOverflowError';
21
+ export * from './error/TimeoutError';
22
+ export * from './error/UnreachableCodeError';
23
+ export * from './error/ValidationError';
24
+ export * from './event/DomEventHost';
25
+ export * from './event/EventHost';
26
+ export * from './event/nextEventAsPromise';
27
+ export * from './event/onAny';
28
+ export * from './event/redispatchEvents';
29
+ export * from './event/Signal';
30
+ export * from './global/environment';
31
+ export * from './global/globalRegistry';
32
+ export * from './global/globalTarget';
33
+ export * from './logging/ConsoleLogHandler';
81
34
  export * from './logging/getLogLevelFromSearch';
82
- export * from './logging/VinylLogging';
35
+ export * from './logging/HistoryLogHandler';
83
36
  export * from './logging/Logger';
84
37
  export * from './logging/LogTarget';
85
- export * from './logging/HistoryLogHandler';
86
- export * from './logging/ConsoleLogHandler';
87
- export * from './global/globalTarget';
88
- export * from './global/globalRegistry';
89
- export * from './global/environment';
90
- export * from './event/redispatchEvents';
91
- export * from './event/onAny';
92
- export * from './event/nextEventAsPromise';
93
- export * from './event/Signal';
94
- export * from './event/EventHost';
95
- export * from './event/DomEventHost';
96
- export * from './error/ValidationError';
97
- export * from './error/UnreachableCodeError';
98
- export * from './error/TimeoutError';
99
- export * from './error/StackOverflowError';
100
- export * from './error/ServiceResponseError';
101
- export * from './error/ReportableError';
102
- export * from './error/MediaUnsupportedError';
103
- export * from './error/IllegalStateError';
104
- export * from './error/IllegalArgumentError';
105
- export * from './error/ErrorOrigin';
106
- export * from './error/AbortError';
107
- export * from './core/disposable';
108
- export * from './core/cloneable';
109
- export * from './core/clearable';
110
- export * from './core/Unsubscribe';
111
- export * from './client/Version';
112
- export * from './client/userAgent/userAgentRuleHelpers';
113
- export * from './client/userAgent/tokenizeUserAgent';
114
- export * from './client/userAgent/parseUserAgent';
115
- export * from './client/userAgent/hasBrowser';
116
- export * from './client/userAgent/defaultUserAgentRules';
117
- export * from './client/userAgent/UserAgentInfo';
38
+ export * from './logging/logTimer';
39
+ export * from './logging/VinylLogging';
40
+ export * from './network/browser/NetworkInformation';
41
+ export * from './network/createRequester';
42
+ export * from './network/logging/networkLoggingHandler';
43
+ export * from './network/metrics/NetworkMetricsController';
44
+ export * from './network/metrics/NetworkMetricsControllerImpl';
45
+ export * from './network/metrics/networkMetricsGlobal';
46
+ export * from './network/metrics/networkMetricsModel';
47
+ export * from './network/network';
48
+ export * from './network/Requester';
49
+ export * from './network/requesterGlobal';
50
+ export * from './network/RequesterImpl';
51
+ export * from './network/RequesterImplEventMap';
52
+ export * from './network/RequestError';
53
+ export * from './network/requesterUtil';
54
+ export * from './network/RequestInterceptor';
55
+ export * from './network/responseUtil';
56
+ export * from './patch/network/fetch';
57
+ export * from './patch/patchTarget';
58
+ export * from './persistence/KeyValuePersistence';
59
+ export * from './persistence/persistenceRef';
60
+ export * from './persistence/PersistentItem';
61
+ export * from './persistence/StoragePersistence';
62
+ export * from './util/async/Abort';
63
+ export * from './util/async/abortUtils';
64
+ export * from './util/async/Deferred';
65
+ export * from './util/async/never';
66
+ export * from './util/async/poll';
67
+ export * from './util/async/promise';
68
+ export * from './util/async/sleep';
69
+ export * from './util/async/TaskQueue';
70
+ export * from './util/async/timeout';
71
+ export * from './util/async/TimeoutController';
72
+ export * from './util/async/TimeoutSlot';
73
+ export * from './util/browser/searchParams';
74
+ export * from './util/buffer/buffer';
75
+ export * from './util/buffer/BufferError';
76
+ export * from './util/buffer/BufferReader';
77
+ export * from './util/buffer/BufferWriter';
78
+ export * from './util/collection/array';
79
+ export * from './util/collection/CacheMap';
80
+ export * from './util/collection/LinkedList';
81
+ export * from './util/collection/LruCache';
82
+ export * from './util/collection/typedArray';
83
+ export * from './util/comparison/compare';
84
+ export * from './util/config/ValueProvider';
85
+ export * from './util/date/date';
86
+ export * from './util/error/stack';
87
+ export * from './util/fun/debounce';
88
+ export * from './util/fun/flow';
89
+ export * from './util/fun/function';
90
+ export * from './util/fun/memoize';
91
+ export * from './util/fun/throttle';
92
+ export * from './util/iteration/iterable';
93
+ export * from './util/map/map';
94
+ export * from './util/math/math';
95
+ export * from './util/mpeg/parseSidxBox';
96
+ export * from './util/network/request';
97
+ export * from './util/object/clone';
98
+ export * from './util/object/equalDeep';
99
+ export * from './util/object/lazy';
100
+ export * from './util/object/merge';
101
+ export * from './util/object/mergeDeep';
102
+ export * from './util/object/mutableType';
103
+ export * from './util/object/object';
104
+ export * from './util/object/readonlyType';
105
+ export * from './util/range/IntersectionRanges';
106
+ export * from './util/range/Ranges';
107
+ export * from './util/range/timeRanges';
108
+ export * from './util/range/UnionRanges';
109
+ export * from './util/serialization/json';
110
+ export * from './util/serialization/ParseError';
111
+ export * from './util/serialization/primitives';
112
+ export * from './util/serialization/stringifyForPrint';
113
+ export * from './util/set/set';
114
+ export * from './util/string/string';
115
+ export * from './util/string/StringReader';
116
+ export * from './util/string/uid';
117
+ export * from './util/type';
118
+ export * from './util/url/resolveUrl';
118
119
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,34 @@
1
+ import type { ReadonlyAbort } from './Abort';
2
+ import type { Maybe } from '../type';
3
+ export interface PollOptions {
4
+ /**
5
+ * How long to keep polling before giving up, in seconds. If omitted,
6
+ * polling continues indefinitely until the predicate returns `true` (or the
7
+ * signal aborts).
8
+ */
9
+ readonly timeout?: number;
10
+ /**
11
+ * If provided, aborting rejects the returned promise with the signal's
12
+ * abort reason, cancelling the poll.
13
+ */
14
+ readonly abort?: Maybe<ReadonlyAbort>;
15
+ /**
16
+ * How often to re-evaluate the predicate, in seconds. Defaults to `0.05`
17
+ * (50ms).
18
+ */
19
+ readonly pollInterval?: number;
20
+ }
21
+ /**
22
+ * Repeatedly evaluates `predicate` until it returns `true` or the timeout
23
+ * elapses, resolving to the predicate's final value. Useful for waiting on
24
+ * asynchronous state to settle without wiring up an event subscription.
25
+ *
26
+ * @param predicate Evaluated immediately and then every `pollInterval` seconds.
27
+ * Polling stops as soon as it returns `true`.
28
+ * @param options Optional {@link PollOptions}. With no `timeout`, polling
29
+ * continues indefinitely until the predicate is `true` or `abort` fires.
30
+ * @returns `true` if the predicate became true within the timeout, otherwise
31
+ * `false`.
32
+ */
33
+ export declare function poll(predicate: () => boolean, options?: PollOptions): Promise<boolean>;
34
+ //# sourceMappingURL=poll.d.ts.map
@@ -1,4 +1,5 @@
1
1
  import type { ReadonlyAbort } from './Abort';
2
+ import type { Maybe } from '../type';
2
3
  /**
3
4
  * Returns a promise that resolves after the given amount of time.
4
5
  *
@@ -23,5 +24,5 @@ import type { ReadonlyAbort } from './Abort';
23
24
  * reason when aborted. If the signal is already aborted and time is less than or equal to zero,
24
25
  * the abort signal takes precedence.
25
26
  */
26
- export declare function sleep(time: number, abort?: ReadonlyAbort | null): Promise<void>;
27
+ export declare function sleep(time: number, abort?: Maybe<ReadonlyAbort>): Promise<void>;
27
28
  //# sourceMappingURL=sleep.d.ts.map
@@ -1,6 +1,24 @@
1
1
  import type { ReadonlyAbort } from './Abort';
2
2
  import { ErrorLevel } from '../../error/ReportableError';
3
3
  export declare const DEFAULT_TIMEOUT_MESSAGE = "Timed out after {time}s";
4
+ /**
5
+ * Options for {@link withTimeout}.
6
+ */
7
+ export interface WithTimeoutOptions {
8
+ /**
9
+ * The message to set in the {@link TimeoutError}. Uses `{time}` token.
10
+ * (default: {@link DEFAULT_TIMEOUT_MESSAGE})
11
+ */
12
+ readonly message?: string | undefined;
13
+ /**
14
+ * The error origin. (default: `ErrorOrigin.INTERNAL`)
15
+ */
16
+ readonly origin?: string | undefined;
17
+ /**
18
+ * The error level. (default: `ErrorLevel.FATAL`)
19
+ */
20
+ readonly level?: ErrorLevel | undefined;
21
+ }
4
22
  /**
5
23
  * Races a promise with a timeout, rejecting with a {@link TimeoutError} if the timeout is
6
24
  * reached before the provided promise.
@@ -8,22 +26,26 @@ export declare const DEFAULT_TIMEOUT_MESSAGE = "Timed out after {time}s";
8
26
  * @param promise The promise to race against a timeout.
9
27
  * @param time The number of seconds to wait. If undefined, the promise is returned without
10
28
  * wrapping.
11
- * @param message The message to set in the {@link TimeoutError}. Uses `{time}` token.
12
- * @param origin The error origin. (default: `ErrorOrigin.INTERNAL`)
13
- * @param level The error level (default: `ErrorLevel.FATAL`)
29
+ * @param options Timeout error options (message, origin, level).
30
+ */
31
+ export declare function withTimeout<T>(promise: PromiseLike<T>, time?: number, options?: WithTimeoutOptions): Promise<T>;
32
+ /**
33
+ * Options for {@link timeout}.
14
34
  */
15
- export declare function withTimeout<T>(promise: PromiseLike<T>, time?: number, message?: string, origin?: string, level?: ErrorLevel): Promise<T>;
35
+ export interface TimeoutOptions extends WithTimeoutOptions {
36
+ /**
37
+ * If provided, when aborted (regardless of reason) will resolve the
38
+ * returned promise rather than rejecting.
39
+ */
40
+ readonly abort?: ReadonlyAbort | undefined;
41
+ }
16
42
  /**
17
43
  * Returns a promise that will reject after the provided number of seconds.
18
44
  * If the optional abort signal is aborted, the timer will be canceled and the promise resolved.
19
45
  * This is the inverse of {@link sleep}
20
46
  *
21
47
  * @param time The number of seconds to wait.
22
- * @param abort If provided, when aborted (regardless of reason) will resolve the returned
23
- * promise.
24
- * @param message The message to be used in the TimeoutError in case of timeout. Uses `{time}` token.
25
- * @param origin The error origin. (default: `ErrorOrigin.INTERNAL`)
26
- * @param level The error level (default: `ErrorLevel.FATAL`)
48
+ * @param options Timeout options (abort, message, origin, level).
27
49
  */
28
- export declare function timeout(time: number, abort?: ReadonlyAbort, message?: string, origin?: string, level?: ErrorLevel): Promise<void>;
50
+ export declare function timeout(time: number, options?: TimeoutOptions): Promise<void>;
29
51
  //# sourceMappingURL=timeout.d.ts.map
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * The minimal `Map`-shaped interface that {@link getOrSet} needs.
3
3
  */
4
- interface GetOrSetMap<K, V> {
4
+ export interface GetOrSetMap<K, V> {
5
5
  has(key: K): boolean;
6
6
  get(key: K): V | undefined;
7
7
  set(key: K, value: V): unknown;
@@ -25,5 +25,4 @@ export declare function flipMap<K, V>(map: Iterable<readonly [
25
25
  K,
26
26
  V
27
27
  ]>): Map<V, K>;
28
- export {};
29
28
  //# sourceMappingURL=map.d.ts.map
@@ -3,7 +3,8 @@
3
3
  * avoiding the overhead of constructing `URL` objects.
4
4
  *
5
5
  * Handles the same cases as `new URL(relative, base)`:
6
- * - Absolute URIs (with scheme) are returned as-is.
6
+ * - Absolute URIs (with any scheme, including `data:` / `blob:`) are returned
7
+ * as-is.
7
8
  * - Protocol-relative URIs (`//host/path`) inherit the base scheme.
8
9
  * - Absolute paths (`/path`) replace the base path.
9
10
  * - Relative paths are resolved against the base directory.
@@ -1,23 +1,33 @@
1
1
  import type { ReadonlyEventHost } from './EventHost';
2
2
  import type { ReadonlyAbort } from '../util/async/Abort';
3
3
  import type { Maybe } from '../util/type';
4
+ import { ErrorLevel } from '../error/ReportableError';
4
5
  export interface NextEventAsPromiseOptions<EventMap, K extends keyof EventMap> {
5
6
  /**
6
7
  * (Optional) If provided, will only resolve if the event passes this predicate.
7
8
  */
8
- filter?: ((event: EventMap[K]) => boolean) | undefined | null;
9
+ readonly filter?: ((event: EventMap[K]) => boolean) | undefined | null;
9
10
  /**
10
11
  * (Optional) If provided, will reject the promise if the signal is aborted.
11
12
  */
12
- abort?: Maybe<ReadonlyAbort>;
13
+ readonly abort?: Maybe<ReadonlyAbort>;
13
14
  /**
14
15
  * If provided, the promise will reject after this duration, in seconds, if not resolved.
15
16
  */
16
- timeout?: number;
17
+ readonly timeout?: number;
17
18
  /**
18
19
  * The timeout message. If not provided will use `DEFAULT_TIMEOUT_MESSAGE`.
19
20
  */
20
- timeoutMessage?: string;
21
+ readonly timeoutMessage?: string;
22
+ /**
23
+ * The error origin if the next event times out.
24
+ * Default: `ErrorOrigin.INTERNAL`
25
+ */
26
+ readonly timeoutOrigin?: string;
27
+ /**
28
+ * The error level on a timeout.
29
+ */
30
+ readonly timeoutLevel?: ErrorLevel;
21
31
  }
22
32
  /**
23
33
  * Promisifies the next event.