@idlebox/common 1.3.14 → 1.3.16

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 (121) hide show
  1. package/lib/array/arrayDiff.cjs +2 -2
  2. package/lib/array/arrayDiff.cjs.map +1 -1
  3. package/lib/array/arrayDiff.js +2 -2
  4. package/lib/array/arrayDiff.js.map +1 -1
  5. package/lib/array/arraySame.cjs.map +1 -1
  6. package/lib/array/arraySame.js.map +1 -1
  7. package/lib/array/arrayUnique.cjs.map +1 -1
  8. package/lib/array/arrayUnique.js.map +1 -1
  9. package/{dist → lib}/common-alpha.d.ts +57 -13
  10. package/{dist → lib}/common-beta.d.ts +57 -13
  11. package/{dist → lib}/common-public.d.ts +57 -13
  12. package/{dist → lib}/common.d.ts +57 -13
  13. package/lib/function/callbackList.cjs +4 -0
  14. package/lib/function/callbackList.cjs.map +1 -1
  15. package/lib/function/callbackList.js +4 -0
  16. package/lib/function/callbackList.js.map +1 -1
  17. package/lib/string/concatType.generated.cjs +8 -0
  18. package/lib/string/concatType.generated.cjs.map +1 -1
  19. package/lib/string/concatType.generated.js +8 -0
  20. package/lib/string/concatType.generated.js.map +1 -1
  21. package/{dist → lib}/tsdoc-metadata.json +1 -1
  22. package/lib/{typingHeler/deep.cjs → typingHelper/deep.partial.cjs} +1 -2
  23. package/lib/typingHelper/deep.partial.cjs.map +1 -0
  24. package/lib/typingHelper/deep.partial.js +2 -0
  25. package/lib/typingHelper/deep.partial.js.map +1 -0
  26. package/lib/typingHelper/deep.readonly.cjs +3 -0
  27. package/lib/typingHelper/deep.readonly.cjs.map +1 -0
  28. package/lib/typingHelper/deep.readonly.js +2 -0
  29. package/lib/typingHelper/deep.readonly.js.map +1 -0
  30. package/lib/typingHelper/deep.required.cjs +3 -0
  31. package/lib/typingHelper/deep.required.cjs.map +1 -0
  32. package/lib/typingHelper/deep.required.js +2 -0
  33. package/lib/typingHelper/deep.required.js.map +1 -0
  34. package/lib/typingHelper/deep.writable.cjs +3 -0
  35. package/lib/typingHelper/deep.writable.cjs.map +1 -0
  36. package/lib/typingHelper/deep.writable.js +2 -0
  37. package/lib/typingHelper/deep.writable.js.map +1 -0
  38. package/lib/typingHelper/literal.cjs +3 -0
  39. package/lib/typingHelper/literal.cjs.map +1 -0
  40. package/lib/typingHelper/literal.js +2 -0
  41. package/lib/typingHelper/literal.js.map +1 -0
  42. package/package.json +12 -12
  43. package/src/array/arrayDiff.ts +31 -0
  44. package/src/array/arraySame.ts +15 -0
  45. package/src/array/arrayUnique.ts +50 -0
  46. package/src/array/normalizeArray.ts +13 -0
  47. package/src/array/sortAlpha.ts +15 -0
  48. package/src/date/consts.ts +5 -0
  49. package/src/date/isInvalid.ts +6 -0
  50. package/src/date/sibling.ts +28 -0
  51. package/src/date/timeString.ts +150 -0
  52. package/src/date/unix.ts +13 -0
  53. package/src/debugging/serializable.ts +146 -0
  54. package/src/debugging/tryInspect.ts +37 -0
  55. package/src/error/convertUnknown.ts +10 -0
  56. package/src/error/getFrame.ts +13 -0
  57. package/src/function/asyncCallbackList.ts +75 -0
  58. package/src/function/callbackList.ts +88 -0
  59. package/src/function/delayCallbackList.ts +45 -0
  60. package/src/function/functionName.ts +39 -0
  61. package/src/index.generated.ts +289 -0
  62. package/src/lifecycle/dispose/bridges/rxjs.ts +6 -0
  63. package/src/lifecycle/dispose/disposableEvent.ts +117 -0
  64. package/src/lifecycle/dispose/disposedError.ts +16 -0
  65. package/src/lifecycle/dispose/lifecycle.async.ts +61 -0
  66. package/src/lifecycle/dispose/lifecycle.global.ts +61 -0
  67. package/src/lifecycle/dispose/lifecycle.sync.ts +79 -0
  68. package/src/lifecycle/dispose/lifecycle.ts +28 -0
  69. package/src/lifecycle/event/event.ts +81 -0
  70. package/src/lifecycle/event/memorized.ts +39 -0
  71. package/src/lifecycle/promise/cancel.ts +16 -0
  72. package/src/lifecycle/promise/cancellationToken/driver.browser.ts +55 -0
  73. package/src/lifecycle/promise/cancellationToken/driver.common.ts +43 -0
  74. package/src/lifecycle/promise/cancellationToken/source.ts +48 -0
  75. package/src/lifecycle/promise/deferredPromise.ts +104 -0
  76. package/src/lifecycle/timeout/timeout.ts +48 -0
  77. package/src/lifecycle/timeout/timeoutError.ts +16 -0
  78. package/src/log/logger.ts +148 -0
  79. package/src/mapSet/customSet.ts +91 -0
  80. package/src/mapSet/extendMap.ts +40 -0
  81. package/src/misc/assertNotNull.ts +21 -0
  82. package/src/object/definePublicConstant.ts +10 -0
  83. package/src/object/initOnRead.ts +27 -0
  84. package/src/object/objectPath.ts +10 -0
  85. package/src/object/objectSame.ts +52 -0
  86. package/src/path/isAbsolute.ts +11 -0
  87. package/src/path/normalizePath.ts +8 -0
  88. package/src/path/pathArray.ts +42 -0
  89. package/src/platform/globalObject.ts +22 -0
  90. package/src/platform/globalSingleton.ts +82 -0
  91. package/src/platform/globalSymbol.ts +36 -0
  92. package/src/platform/os.ts +46 -0
  93. package/src/promise/awaitIterator.ts +19 -0
  94. package/src/promise/finishAllPromise.ts +50 -0
  95. package/src/promise/promiseBool.ts +10 -0
  96. package/src/promise/promisePool.ts +40 -0
  97. package/src/promise/timeoutPromisePool.ts +22 -0
  98. package/src/reflection/classes/hookClass.ts +47 -0
  99. package/src/reflection/classes/singleton.ts +33 -0
  100. package/src/reflection/methods/bind.ts +30 -0
  101. package/src/reflection/methods/initOnRead.ts +11 -0
  102. package/src/reflection/methods/memorize.ts +33 -0
  103. package/src/string/castCase.ts +44 -0
  104. package/src/string/concatType.generated.ts +265 -0
  105. package/src/string/concatType.generator.ts +31 -0
  106. package/src/string/escapeRegexp.ts +4 -0
  107. package/src/string/pad2.ts +11 -0
  108. package/src/string/sizeString.ts +52 -0
  109. package/src/tsconfig.json +14 -0
  110. package/src/typingHelper/deep.partial.ts +16 -0
  111. package/src/typingHelper/deep.readonly.ts +16 -0
  112. package/src/typingHelper/deep.required.ts +16 -0
  113. package/src/typingHelper/deep.writable.ts +16 -0
  114. package/src/typingHelper/literal.ts +1 -0
  115. package/docs/common.api.json +0 -21737
  116. package/docs/common.api.md +0 -1139
  117. package/docs/package-public.d.ts +0 -952
  118. package/docs/tsdoc-metadata.json +0 -11
  119. package/lib/typingHeler/deep.cjs.map +0 -1
  120. package/lib/typingHeler/deep.js +0 -3
  121. package/lib/typingHeler/deep.js.map +0 -1
@@ -0,0 +1,37 @@
1
+ const inspect = Symbol.for('nodejs.util.inspect.custom'); // high version node
2
+ const inspectOld = tryGetSymbol();
3
+
4
+ declare const global: any;
5
+
6
+ function tryGetSymbol() {
7
+ try {
8
+ const r = global.require;
9
+ return r('util').inspect.custom;
10
+ } catch {
11
+ return undefined;
12
+ }
13
+ }
14
+
15
+ /**
16
+ * try to call `inspect` method of an object, if not exists, call `toString`.
17
+ * @returns {string}
18
+ */
19
+ export function tryInspect(object: any) {
20
+ if (!object || typeof object !== 'object') {
21
+ return JSON.stringify(object);
22
+ }
23
+
24
+ if (object[inspect]) {
25
+ return object[inspect]();
26
+ } else if (inspectOld && object[inspectOld]) {
27
+ return object[inspectOld]();
28
+ } else if (object['inspect']) {
29
+ return object['inspect']();
30
+ } else if (object[Symbol.toStringTag]) {
31
+ return object[Symbol.toStringTag]();
32
+ } else if (object.toJSON) {
33
+ return object.toJSON();
34
+ } else {
35
+ return '' + object;
36
+ }
37
+ }
@@ -0,0 +1,10 @@
1
+ import { getErrorFrame } from './getFrame';
2
+
3
+ export function convertCatchedError(e: unknown): Error {
4
+ if (e instanceof Error) {
5
+ return e;
6
+ } else {
7
+ console.error('Catched invalid error at %s, type %s, value %s.', getErrorFrame(new Error(), 1), typeof e, e);
8
+ return new Error('Invalid: ' + e);
9
+ }
10
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Get nth line of Error.stack
3
+ * @returns {string} if frame greater than max, return ''
4
+ */
5
+ export function getErrorFrame(e: Error, frame: number): string {
6
+ if (e && e.stack) {
7
+ const stackArr = e.stack.split('\n');
8
+ if (stackArr.length > frame + 1) {
9
+ return stackArr[frame + 1].trim();
10
+ }
11
+ }
12
+ return '';
13
+ }
@@ -0,0 +1,75 @@
1
+ import { nameFunction } from './functionName';
2
+
3
+ export interface MyAsyncCallback<Argument extends unknown[]> {
4
+ displayName?: string;
5
+
6
+ (...param: Argument): Promise<void | undefined | boolean> | void | undefined | boolean;
7
+ }
8
+
9
+ /**
10
+ * like CallbackList, but async
11
+ */
12
+ export class AsyncCallbackList<Argument extends unknown[]> {
13
+ protected list: MyAsyncCallback<Argument>[] = [];
14
+ protected running: boolean = false;
15
+
16
+ constructor() {
17
+ this.run = (this.run as any).bind(this);
18
+ }
19
+
20
+ count() {
21
+ return this.list.length;
22
+ }
23
+
24
+ reset() {
25
+ if (this.running) {
26
+ throw new Error("Can not reset when it's running.");
27
+ }
28
+ this.list.length = 0;
29
+ }
30
+
31
+ /**
32
+ * @param name optional name of `item` (will assign displayName to `item`)
33
+ * @returns function list length
34
+ */
35
+ add(item: MyAsyncCallback<Argument>, name?: string): number {
36
+ if (this.running) {
37
+ throw new Error("Can not add callback when it's running.");
38
+ }
39
+ if (name) {
40
+ nameFunction(name, item);
41
+ }
42
+ return this.list.push(item);
43
+ }
44
+
45
+ /**
46
+ * @returns if removed: return `item`; if did not exists: return null
47
+ */
48
+ remove(item: MyAsyncCallback<Argument>): null | MyAsyncCallback<Argument> {
49
+ if (this.running) {
50
+ throw new Error("Can not remove callback when it's running.");
51
+ }
52
+ const found = this.list.indexOf(item);
53
+ if (found !== -1) {
54
+ return this.list.splice(found, 1)[0];
55
+ }
56
+ return null;
57
+ }
58
+
59
+ /**
60
+ * Stop run if one callback return `true`
61
+ * @returns {boolean} true if one callback return true
62
+ */
63
+ async run(...argument: Argument): Promise<boolean> {
64
+ this.running = true;
65
+ let ret: boolean | undefined | void;
66
+ for (const cb of this.list) {
67
+ ret = await cb(...argument);
68
+ if (ret === true) {
69
+ break;
70
+ }
71
+ }
72
+ this.running = false;
73
+ return ret || false;
74
+ }
75
+ }
@@ -0,0 +1,88 @@
1
+ import { nameFunction } from './functionName';
2
+
3
+ export interface MyCallback<Argument extends unknown[]> {
4
+ displayName?: string;
5
+
6
+ (...param: Argument): any;
7
+ }
8
+
9
+ /**
10
+ * Manage a list of callback
11
+ */
12
+ export class CallbackList<Argument extends unknown[]> {
13
+ protected list: MyCallback<Argument>[] = [];
14
+ protected running: boolean = false;
15
+ protected stop: boolean = false;
16
+
17
+ constructor() {
18
+ this.run = (this.run as any).bind(this);
19
+ }
20
+
21
+ count() {
22
+ return this.list.length;
23
+ }
24
+
25
+ /**
26
+ * remove all callback
27
+ */
28
+ reset() {
29
+ if (this.running) {
30
+ throw new Error("Can not reset when it's running.");
31
+ }
32
+ this.list.length = 0;
33
+ }
34
+
35
+ /**
36
+ * @param name optional name of `item` (will assign displayName to `item`)
37
+ * @returns function list length
38
+ */
39
+ add(item: MyCallback<Argument>, name?: string): number {
40
+ if (this.running) {
41
+ throw new Error("Can not add callback when it's running.");
42
+ }
43
+ if (name) {
44
+ nameFunction(name, item);
45
+ }
46
+ return this.list.push(item);
47
+ }
48
+
49
+ /**
50
+ * @returns if removed: return `item`; if did not exists: return null
51
+ */
52
+ remove(item: MyCallback<Argument>): null | MyCallback<Argument> {
53
+ if (this.running) {
54
+ throw new Error("Can not remove callback when it's running.");
55
+ }
56
+ const found = this.list.indexOf(item);
57
+ if (found !== -1) {
58
+ return this.list.splice(found, 1)[0];
59
+ }
60
+ return null;
61
+ }
62
+
63
+ /**
64
+ * in a callback, call this.stopRun() to stop remain callbacks (not by return false)
65
+ * @returns {boolean} true if every callback called, false if stop in middle
66
+ */
67
+ run(...argument: Argument): boolean {
68
+ if (this.running) {
69
+ throw new Error("can not run CallbackList in it's callback.");
70
+ }
71
+ this.stop = false;
72
+
73
+ this.running = true;
74
+ for (const cb of this.list) {
75
+ if (this.stop) break;
76
+ cb(...argument);
77
+ }
78
+ this.running = false;
79
+
80
+ const ret = !this.stop;
81
+ this.stop = false;
82
+ return ret;
83
+ }
84
+
85
+ stopRun() {
86
+ this.stop = true;
87
+ }
88
+ }
@@ -0,0 +1,45 @@
1
+ import { nameFunction } from './functionName';
2
+
3
+ export interface MyDelayCallback<Argument extends unknown[]> {
4
+ displayName?: string;
5
+
6
+ (...param: Argument): void;
7
+ }
8
+
9
+ /**
10
+ * remember arguments after run
11
+ * run all later added function with memorized argument
12
+ */
13
+ export class DelayCallbackList<Argument extends unknown[]> {
14
+ private delayArgument?: Argument;
15
+ private delayComplete: boolean = false;
16
+
17
+ protected list?: MyDelayCallback<Argument>[] = [];
18
+
19
+ count() {
20
+ return this.list?.length ?? 0;
21
+ }
22
+
23
+ add(item: MyDelayCallback<Argument>, name?: string) {
24
+ if (name) {
25
+ nameFunction(name, item);
26
+ }
27
+ if (this.delayComplete) {
28
+ item(...this.delayArgument!);
29
+ } else {
30
+ this.list!.push(item);
31
+ }
32
+ }
33
+
34
+ run(argument: Argument) {
35
+ if (this.delayComplete) {
36
+ throw new Error('call to delay callback twice!');
37
+ }
38
+ this.delayComplete = true;
39
+ this.delayArgument = argument;
40
+ this.list!.forEach((cb) => {
41
+ cb(...argument);
42
+ });
43
+ delete this.list;
44
+ }
45
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Function with displayName
3
+ */
4
+ export interface NamedFunction extends Function {
5
+ displayName: string;
6
+ }
7
+
8
+ /**
9
+ * Get displayName/name of a function
10
+ */
11
+ export function functionName(func: Function) {
12
+ return (func as NamedFunction).displayName || func.name;
13
+ }
14
+
15
+ /**
16
+ * Set displayName of a function
17
+ */
18
+ export function nameFunction<T extends Function>(name: string, func: T): T & NamedFunction {
19
+ return Object.assign(func, {
20
+ displayName: name,
21
+ inspect() {
22
+ return `[Function: ${name}]`;
23
+ },
24
+ });
25
+ }
26
+
27
+ export interface MaybeNamedFunction extends Function {
28
+ displayName?: string;
29
+ }
30
+
31
+ /**
32
+ * Assert function must have oneof displayName/name property
33
+ */
34
+ export function assertFunctionHasName(func: MaybeNamedFunction) {
35
+ if (!func.displayName && !func.name) {
36
+ console.error(func);
37
+ throw new TypeError('function must have name!');
38
+ }
39
+ }
@@ -0,0 +1,289 @@
1
+ // DO NOT EDIT THIS FILE
2
+ // @ts-ignore
3
+ /* eslint-disable */
4
+
5
+ /* array/arrayDiff.ts */
6
+ // Identifiers
7
+ export {IArrayUpdate} from "./array/arrayDiff";
8
+ export {arrayDiff} from "./array/arrayDiff";
9
+ /* array/arraySame.ts */
10
+ // Identifiers
11
+ export {isArraySame} from "./array/arraySame";
12
+ /* array/arrayUnique.ts */
13
+ // Identifiers
14
+ export {arrayUnique} from "./array/arrayUnique";
15
+ export {arrayUniqueReference} from "./array/arrayUnique";
16
+ export {IUniqueIdFactory} from "./array/arrayUnique";
17
+ export {uniqueFilter} from "./array/arrayUnique";
18
+ /* array/normalizeArray.ts */
19
+ // Identifiers
20
+ export {normalizeArray} from "./array/normalizeArray";
21
+ /* array/sortAlpha.ts */
22
+ // Identifiers
23
+ export {sortByString} from "./array/sortAlpha";
24
+ /* date/consts.ts */
25
+ // Identifiers
26
+ export {oneSecond} from "./date/consts";
27
+ export {oneMinute} from "./date/consts";
28
+ export {oneHour} from "./date/consts";
29
+ export {oneDay} from "./date/consts";
30
+ export {oneWeek} from "./date/consts";
31
+ /* date/isInvalid.ts */
32
+ // Identifiers
33
+ export {isDateInvalid} from "./date/isInvalid";
34
+ /* date/sibling.ts */
35
+ // Identifiers
36
+ export {nextSecond} from "./date/sibling";
37
+ export {nextMinute} from "./date/sibling";
38
+ export {nextHour} from "./date/sibling";
39
+ export {nextDay} from "./date/sibling";
40
+ export {nextWeek} from "./date/sibling";
41
+ export {nextMonth} from "./date/sibling";
42
+ export {nextYear} from "./date/sibling";
43
+ /* string/pad2.ts */
44
+ // Identifiers
45
+ export {pad2} from "./string/pad2";
46
+ /* date/timeString.ts */
47
+ // Identifiers
48
+ export {humanDate} from "./date/timeString";
49
+ /* date/unix.ts */
50
+ // Identifiers
51
+ export {getTimeStamp} from "./date/unix";
52
+ export {fromTimeStamp} from "./date/unix";
53
+ /* debugging/serializable.ts */
54
+ // Identifiers
55
+ export {isScalar} from "./debugging/serializable";
56
+ export {SerializableKind} from "./debugging/serializable";
57
+ export {isSerializable} from "./debugging/serializable";
58
+ export {getTypeOf} from "./debugging/serializable";
59
+ export {assertSerializable} from "./debugging/serializable";
60
+ /* debugging/tryInspect.ts */
61
+ // Identifiers
62
+ export {tryInspect} from "./debugging/tryInspect";
63
+ /* error/getFrame.ts */
64
+ // Identifiers
65
+ export {getErrorFrame} from "./error/getFrame";
66
+ /* error/convertUnknown.ts */
67
+ // Identifiers
68
+ export {convertCatchedError} from "./error/convertUnknown";
69
+ /* function/functionName.ts */
70
+ // Identifiers
71
+ export {NamedFunction} from "./function/functionName";
72
+ export {functionName} from "./function/functionName";
73
+ export {nameFunction} from "./function/functionName";
74
+ export {MaybeNamedFunction} from "./function/functionName";
75
+ export {assertFunctionHasName} from "./function/functionName";
76
+ /* function/asyncCallbackList.ts */
77
+ // Identifiers
78
+ export {MyAsyncCallback} from "./function/asyncCallbackList";
79
+ export {AsyncCallbackList} from "./function/asyncCallbackList";
80
+ /* function/callbackList.ts */
81
+ // Identifiers
82
+ export {MyCallback} from "./function/callbackList";
83
+ export {CallbackList} from "./function/callbackList";
84
+ /* function/delayCallbackList.ts */
85
+ // Identifiers
86
+ export {MyDelayCallback} from "./function/delayCallbackList";
87
+ export {DelayCallbackList} from "./function/delayCallbackList";
88
+ /* lifecycle/event/event.ts */
89
+ // Identifiers
90
+ export {EventHandler} from "./lifecycle/event/event";
91
+ export {EventRegister} from "./lifecycle/event/event";
92
+ export {Emitter} from "./lifecycle/event/event";
93
+ /* lifecycle/dispose/lifecycle.ts */
94
+ // Identifiers
95
+ export {IDisposableBaseInternal} from "./lifecycle/dispose/lifecycle";
96
+ export {IDisposable} from "./lifecycle/dispose/lifecycle";
97
+ export {IAsyncDisposable} from "./lifecycle/dispose/lifecycle";
98
+ export {toDisposable} from "./lifecycle/dispose/lifecycle";
99
+ /* lifecycle/dispose/disposableEvent.ts */
100
+ // Identifiers
101
+ export {IEventListenerOptions} from "./lifecycle/dispose/disposableEvent";
102
+ export {IEventHostObject} from "./lifecycle/dispose/disposableEvent";
103
+ export {IEventEmitterObject} from "./lifecycle/dispose/disposableEvent";
104
+ export {addDisposableEventListener} from "./lifecycle/dispose/disposableEvent";
105
+ /* lifecycle/dispose/disposedError.ts */
106
+ // Identifiers
107
+ export {DisposedError} from "./lifecycle/dispose/disposedError";
108
+ export {isDisposedError} from "./lifecycle/dispose/disposedError";
109
+ /* lifecycle/dispose/lifecycle.async.ts */
110
+ // Identifiers
111
+ export {AsyncDisposable} from "./lifecycle/dispose/lifecycle.async";
112
+ /* platform/globalObject.ts */
113
+ // Identifiers
114
+ export {globalObject} from "./platform/globalObject";
115
+ export {ensureGlobalObject} from "./platform/globalObject";
116
+ export {x} from "./platform/globalObject";
117
+ /* platform/globalSingleton.ts */
118
+ // Identifiers
119
+ export {globalSingletonStrong} from "./platform/globalSingleton";
120
+ export {globalSingletonDelete} from "./platform/globalSingleton";
121
+ export {globalSingleton} from "./platform/globalSingleton";
122
+ /* platform/globalSymbol.ts */
123
+ // Identifiers
124
+ export {createSymbol} from "./platform/globalSymbol";
125
+ export {deleteSymbol} from "./platform/globalSymbol";
126
+ /* lifecycle/dispose/lifecycle.global.ts */
127
+ // Identifiers
128
+ export {registerGlobalLifecycle} from "./lifecycle/dispose/lifecycle.global";
129
+ export {ensureDisposeGlobal} from "./lifecycle/dispose/lifecycle.global";
130
+ export {disposeGlobal} from "./lifecycle/dispose/lifecycle.global";
131
+ export {LifecycleObject} from "./lifecycle/dispose/lifecycle.global";
132
+ /* lifecycle/dispose/lifecycle.sync.ts */
133
+ // Identifiers
134
+ export {DisposableOnce} from "./lifecycle/dispose/lifecycle.sync";
135
+ export {Disposable} from "./lifecycle/dispose/lifecycle.sync";
136
+ /* lifecycle/dispose/bridges/rxjs.ts */
137
+ // Identifiers
138
+ export {unsubscribableToDisposable} from "./lifecycle/dispose/bridges/rxjs";
139
+ /* lifecycle/event/memorized.ts */
140
+ // Identifiers
141
+ export {MemorizedEmitter} from "./lifecycle/event/memorized";
142
+ /* lifecycle/promise/cancel.ts */
143
+ // Identifiers
144
+ export {CanceledError} from "./lifecycle/promise/cancel";
145
+ export {isCanceledError} from "./lifecycle/promise/cancel";
146
+ /* lifecycle/promise/deferredPromise.ts */
147
+ // Identifiers
148
+ export {ValueCallback} from "./lifecycle/promise/deferredPromise";
149
+ export {ProgressCallback} from "./lifecycle/promise/deferredPromise";
150
+ export {IProgressHolder} from "./lifecycle/promise/deferredPromise";
151
+ export {DeferredPromise} from "./lifecycle/promise/deferredPromise";
152
+ /* lifecycle/promise/cancellationToken/driver.common.ts */
153
+ // Identifiers
154
+ /* lifecycle/promise/cancellationToken/source.ts */
155
+ // Identifiers
156
+ export {CancellationToken} from "./lifecycle/promise/cancellationToken/source";
157
+ export {CancellationTokenSource} from "./lifecycle/promise/cancellationToken/source";
158
+ /* lifecycle/promise/cancellationToken/driver.browser.ts */
159
+ // Identifiers
160
+ /* lifecycle/timeout/timeoutError.ts */
161
+ // Identifiers
162
+ export {TimeoutError} from "./lifecycle/timeout/timeoutError";
163
+ export {isTimeoutError} from "./lifecycle/timeout/timeoutError";
164
+ /* lifecycle/timeout/timeout.ts */
165
+ // Identifiers
166
+ export {timeout} from "./lifecycle/timeout/timeout";
167
+ export {sleep} from "./lifecycle/timeout/timeout";
168
+ export {timeoutPromise} from "./lifecycle/timeout/timeout";
169
+ /* platform/os.ts */
170
+ // Identifiers
171
+ export {isElectron} from "./platform/os";
172
+ export {isElectronRenderer} from "./platform/os";
173
+ export {isElectronMain} from "./platform/os";
174
+ export {isWindows} from "./platform/os";
175
+ export {isMacintosh} from "./platform/os";
176
+ export {isLinux} from "./platform/os";
177
+ export {isNative} from "./platform/os";
178
+ export {isWeb} from "./platform/os";
179
+ export {userAgent} from "./platform/os";
180
+ export {sepList} from "./platform/os";
181
+ /* log/logger.ts */
182
+ // Identifiers
183
+ export {ColorKind} from "./log/logger";
184
+ export {WrappedConsoleOptions} from "./log/logger";
185
+ export {WrappedConsole} from "./log/logger";
186
+ /* mapSet/customSet.ts */
187
+ // Identifiers
188
+ export {Finder} from "./mapSet/customSet";
189
+ export {RegexpFinder} from "./mapSet/customSet";
190
+ export {CustomSet} from "./mapSet/customSet";
191
+ /* mapSet/extendMap.ts */
192
+ // Identifiers
193
+ export {MapLike} from "./mapSet/extendMap";
194
+ export {ExtendMap} from "./mapSet/extendMap";
195
+ /* misc/assertNotNull.ts */
196
+ // Identifiers
197
+ export {assertNotNull} from "./misc/assertNotNull";
198
+ export {throwNull} from "./misc/assertNotNull";
199
+ /* object/definePublicConstant.ts */
200
+ // Identifiers
201
+ export {definePublicConstant} from "./object/definePublicConstant";
202
+ /* object/initOnRead.ts */
203
+ // Identifiers
204
+ export {InitFunc} from "./object/initOnRead";
205
+ export {initOnRead} from "./object/initOnRead";
206
+ /* object/objectPath.ts */
207
+ // Identifiers
208
+ export {objectPath} from "./object/objectPath";
209
+ /* object/objectSame.ts */
210
+ // Identifiers
211
+ export {isObjectSame} from "./object/objectSame";
212
+ export {isObjectSameRecursive} from "./object/objectSame";
213
+ /* path/isAbsolute.ts */
214
+ // Identifiers
215
+ export {isAbsolute} from "./path/isAbsolute";
216
+ /* path/normalizePath.ts */
217
+ // Identifiers
218
+ export {normalizePath} from "./path/normalizePath";
219
+ /* path/pathArray.ts */
220
+ // Identifiers
221
+ export {PathArray} from "./path/pathArray";
222
+ /* promise/awaitIterator.ts */
223
+ // Identifiers
224
+ export {awaitIterator} from "./promise/awaitIterator";
225
+ /* promise/finishAllPromise.ts */
226
+ // Identifiers
227
+ export {PromiseResultArray} from "./promise/finishAllPromise";
228
+ export {finishAllPromise} from "./promise/finishAllPromise";
229
+ /* promise/promiseBool.ts */
230
+ // Identifiers
231
+ export {promiseBool} from "./promise/promiseBool";
232
+ /* promise/promisePool.ts */
233
+ // Identifiers
234
+ export {PromisePool} from "./promise/promisePool";
235
+ /* promise/timeoutPromisePool.ts */
236
+ // Identifiers
237
+ export {TimeoutPromisePool} from "./promise/timeoutPromisePool";
238
+ /* reflection/classes/hookClass.ts */
239
+ // Identifiers
240
+ export {hookClassSymbol} from "./reflection/classes/hookClass";
241
+ export {hookClass} from "./reflection/classes/hookClass";
242
+ /* reflection/classes/singleton.ts */
243
+ // Identifiers
244
+ export {singletonSymbol} from "./reflection/classes/singleton";
245
+ export {SingletonType} from "./reflection/classes/singleton";
246
+ export {singleton} from "./reflection/classes/singleton";
247
+ /* reflection/methods/bind.ts */
248
+ // Identifiers
249
+ export {bindThis} from "./reflection/methods/bind";
250
+ /* reflection/methods/initOnRead.ts */
251
+ // Identifiers
252
+ export {init} from "./reflection/methods/initOnRead";
253
+ /* reflection/methods/memorize.ts */
254
+ // Identifiers
255
+ export {memorizeValueSymbol} from "./reflection/methods/memorize";
256
+ export {memo} from "./reflection/methods/memorize";
257
+ /* string/castCase.ts */
258
+ // Identifiers
259
+ export {camelCase} from "./string/castCase";
260
+ export {ucfirst} from "./string/castCase";
261
+ export {lcfirst} from "./string/castCase";
262
+ export {linux_case} from "./string/castCase";
263
+ export {linux_case_hyphen} from "./string/castCase";
264
+ /* string/concatType.generated.ts */
265
+ // Identifiers
266
+ export {concatStringType} from "./string/concatType.generated";
267
+ /* string/escapeRegexp.ts */
268
+ // Identifiers
269
+ export {escapeRegExp} from "./string/escapeRegexp";
270
+ /* string/sizeString.ts */
271
+ // Identifiers
272
+ export {humanSizeSI} from "./string/sizeString";
273
+ export {humanSize} from "./string/sizeString";
274
+ export {humanSpeed} from "./string/sizeString";
275
+ /* typingHelper/literal.ts */
276
+ // Identifiers
277
+ export {Primitive} from "./typingHelper/literal";
278
+ /* typingHelper/deep.partial.ts */
279
+ // Identifiers
280
+ export {DeepPartial} from "./typingHelper/deep.partial";
281
+ /* typingHelper/deep.readonly.ts */
282
+ // Identifiers
283
+ export {DeepReadonly} from "./typingHelper/deep.readonly";
284
+ /* typingHelper/deep.required.ts */
285
+ // Identifiers
286
+ export {DeepNonNullable} from "./typingHelper/deep.required";
287
+ /* typingHelper/deep.writable.ts */
288
+ // Identifiers
289
+ export {DeepWriteable} from "./typingHelper/deep.writable";
@@ -0,0 +1,6 @@
1
+ interface Unsubscribable {
2
+ unsubscribe(): void;
3
+ }
4
+ export function unsubscribableToDisposable(subscription: Unsubscribable) {
5
+ return { dispose: () => subscription.unsubscribe() };
6
+ }