@idlebox/common 1.3.7 → 1.3.10

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 (120) hide show
  1. package/dist/common-alpha.d.ts +987 -0
  2. package/dist/common-beta.d.ts +977 -0
  3. package/dist/common-public.d.ts +975 -0
  4. package/dist/common.d.ts +987 -0
  5. package/dist/tsdoc-metadata.json +11 -0
  6. package/docs/common.api.json +21737 -0
  7. package/docs/common.api.md +1139 -0
  8. package/docs/package-public.d.ts +8 -0
  9. package/docs/tsdoc-metadata.json +11 -0
  10. package/lib/array/arrayDiff.cjs.map +1 -10
  11. package/lib/array/arraySame.cjs.map +1 -10
  12. package/lib/array/arrayUnique.cjs.map +1 -10
  13. package/lib/array/normalizeArray.cjs.map +1 -10
  14. package/lib/array/sortAlpha.cjs.map +1 -10
  15. package/lib/date/consts.cjs.map +1 -10
  16. package/lib/date/isInvalid.cjs.map +1 -10
  17. package/lib/date/sibling.cjs.map +1 -10
  18. package/lib/date/timeString.cjs +4 -4
  19. package/lib/date/timeString.cjs.map +1 -10
  20. package/lib/date/unix.cjs.map +1 -10
  21. package/lib/debugging/serializable.cjs +125 -0
  22. package/lib/debugging/serializable.cjs.map +1 -0
  23. package/lib/debugging/serializable.js +118 -0
  24. package/lib/debugging/serializable.js.map +1 -0
  25. package/lib/debugging/tryInspect.cjs +1 -1
  26. package/lib/debugging/tryInspect.cjs.map +1 -10
  27. package/lib/error/convertUnknown.cjs +2 -2
  28. package/lib/error/convertUnknown.cjs.map +1 -10
  29. package/lib/error/getFrame.cjs.map +1 -10
  30. package/lib/function/asyncCallbackList.cjs +4 -14
  31. package/lib/function/asyncCallbackList.cjs.map +1 -10
  32. package/lib/function/callbackList.cjs +5 -20
  33. package/lib/function/callbackList.cjs.map +1 -10
  34. package/lib/function/delayCallbackList.cjs +6 -24
  35. package/lib/function/delayCallbackList.cjs.map +1 -10
  36. package/lib/function/functionName.cjs.map +1 -10
  37. package/lib/lifecycle/dispose/bridges/rxjs.cjs.map +1 -10
  38. package/lib/lifecycle/dispose/disposableEvent.cjs.map +1 -10
  39. package/lib/lifecycle/dispose/disposedError.cjs +3 -3
  40. package/lib/lifecycle/dispose/disposedError.cjs.map +1 -10
  41. package/lib/lifecycle/dispose/lifecycle.async.cjs +12 -44
  42. package/lib/lifecycle/dispose/lifecycle.async.cjs.map +1 -10
  43. package/lib/lifecycle/dispose/lifecycle.cjs.map +1 -10
  44. package/lib/lifecycle/dispose/lifecycle.global.cjs +9 -9
  45. package/lib/lifecycle/dispose/lifecycle.global.cjs.map +1 -10
  46. package/lib/lifecycle/dispose/lifecycle.sync.cjs +12 -51
  47. package/lib/lifecycle/dispose/lifecycle.sync.cjs.map +1 -10
  48. package/lib/lifecycle/event/event.cjs +1 -6
  49. package/lib/lifecycle/event/event.cjs.map +1 -10
  50. package/lib/lifecycle/promise/cancel.cjs.map +1 -10
  51. package/lib/lifecycle/promise/cancellationToken/driver.browser.cjs +3 -18
  52. package/lib/lifecycle/promise/cancellationToken/driver.browser.cjs.map +1 -10
  53. package/lib/lifecycle/promise/cancellationToken/driver.common.cjs +5 -20
  54. package/lib/lifecycle/promise/cancellationToken/driver.common.cjs.map +1 -10
  55. package/lib/lifecycle/promise/cancellationToken/source.cjs +10 -20
  56. package/lib/lifecycle/promise/cancellationToken/source.cjs.map +1 -10
  57. package/lib/lifecycle/promise/deferredPromise.cjs +5 -20
  58. package/lib/lifecycle/promise/deferredPromise.cjs.map +1 -10
  59. package/lib/lifecycle/timeout/timeout.cjs +4 -4
  60. package/lib/lifecycle/timeout/timeout.cjs.map +1 -10
  61. package/lib/lifecycle/timeout/timeoutError.cjs +2 -2
  62. package/lib/lifecycle/timeout/timeoutError.cjs.map +1 -10
  63. package/lib/log/logger.cjs +9 -24
  64. package/lib/log/logger.cjs.map +1 -10
  65. package/lib/mapSet/customSet.cjs +2 -12
  66. package/lib/mapSet/customSet.cjs.map +1 -10
  67. package/lib/mapSet/extendMap.cjs.map +1 -10
  68. package/lib/misc/assertNotNull.cjs.map +1 -10
  69. package/lib/object/definePublicConstant.cjs.map +1 -10
  70. package/lib/object/initOnRead.cjs.map +1 -10
  71. package/lib/object/objectPath.cjs.map +1 -10
  72. package/lib/object/objectSame.cjs +4 -4
  73. package/lib/object/objectSame.cjs.map +1 -10
  74. package/lib/path/isAbsolute.cjs.map +1 -10
  75. package/lib/path/normalizePath.cjs.map +1 -10
  76. package/lib/path/pathArray.cjs +7 -11
  77. package/lib/path/pathArray.cjs.map +1 -10
  78. package/lib/platform/globalObject.cjs +5 -1
  79. package/lib/platform/globalObject.cjs.map +1 -10
  80. package/lib/platform/globalObject.js +3 -0
  81. package/lib/platform/globalObject.js.map +1 -1
  82. package/lib/platform/globalSingleton.cjs +5 -5
  83. package/lib/platform/globalSingleton.cjs.map +1 -10
  84. package/lib/platform/globalSymbol.cjs +2 -2
  85. package/lib/platform/globalSymbol.cjs.map +1 -10
  86. package/lib/platform/os.cjs.map +1 -10
  87. package/lib/promise/awaitIterator.cjs.map +1 -10
  88. package/lib/promise/finishAllPromise.cjs.map +1 -10
  89. package/lib/promise/promiseBool.cjs.map +1 -10
  90. package/lib/promise/promisePool.cjs +5 -12
  91. package/lib/promise/promisePool.cjs.map +1 -10
  92. package/lib/promise/timeoutPromisePool.cjs +6 -10
  93. package/lib/promise/timeoutPromisePool.cjs.map +1 -10
  94. package/lib/reflection/classes/hookClass.cjs.map +1 -10
  95. package/lib/reflection/classes/singleton.cjs +2 -2
  96. package/lib/reflection/classes/singleton.cjs.map +1 -10
  97. package/lib/reflection/methods/bind.cjs.map +1 -10
  98. package/lib/reflection/methods/initOnRead.cjs +2 -2
  99. package/lib/reflection/methods/initOnRead.cjs.map +1 -10
  100. package/lib/reflection/methods/memorize.cjs.map +1 -10
  101. package/lib/string/castCase.cjs.map +1 -10
  102. package/lib/string/concatType.generated.cjs +1 -1
  103. package/lib/string/concatType.generated.cjs.map +1 -10
  104. package/lib/string/concatType.generated.js +1 -1
  105. package/lib/string/concatType.generated.js.map +1 -1
  106. package/lib/string/escapeRegexp.cjs.map +1 -10
  107. package/lib/string/pad2.cjs.map +1 -10
  108. package/lib/string/sizeString.cjs.map +1 -10
  109. package/lib/typingHeler/deep.cjs +4 -0
  110. package/lib/typingHeler/deep.cjs.map +1 -0
  111. package/lib/typingHeler/deep.js +3 -0
  112. package/lib/typingHeler/deep.js.map +1 -0
  113. package/package.json +42 -42
  114. package/generate/main.ts +0 -56
  115. package/generate/package.json +0 -3
  116. package/generate/tsconfig.json +0 -9
  117. package/lib/_export_all_in_one_index.cjs +0 -176
  118. package/lib/_export_all_in_one_index.cjs.map +0 -10
  119. package/lib/_export_all_in_one_index.js +0 -61
  120. package/lib/_export_all_in_one_index.js.map +0 -1
@@ -0,0 +1,975 @@
1
+ export declare function addDisposableEventListener<T extends Function>(target: IEventHostObject<T> | IEventEmitterObject<T>, type: string, options: IEventListenerOptions, handler: T): IDisposable;
2
+
3
+ export declare function addDisposableEventListener<T extends Function>(target: IEventHostObject<T> | IEventEmitterObject<T>, type: string, handler: T): IDisposable;
4
+
5
+ /**
6
+ * Compare two array, returns the difference from `before` to `after`
7
+ * @public
8
+ */
9
+ export declare function arrayDiff<T>(before: T[], after: T[]): {
10
+ add: T[];
11
+ del: T[];
12
+ same: T[];
13
+ };
14
+
15
+ /**
16
+ * Returns a new array without duplicate values
17
+ * @public
18
+ */
19
+ export declare function arrayUnique<T>(arr: T[]): T[];
20
+
21
+ /**
22
+ * Removes duplicate values from an array
23
+ * @public
24
+ */
25
+ export declare function arrayUniqueReference(arr: any[]): void;
26
+
27
+ /**
28
+ * Assert function must have oneof displayName/name property
29
+ */
30
+ export declare function assertFunctionHasName(func: MaybeNamedFunction): void;
31
+
32
+ /**
33
+ * assert value is not null or undefined or NaN
34
+ * @public
35
+ */
36
+ export declare function assertNotNull<T>(val: T | null | undefined): T;
37
+
38
+ export declare function assertSerializable(value: any): void;
39
+
40
+ /**
41
+ * like CallbackList, but async
42
+ */
43
+ export declare class AsyncCallbackList<Argument extends unknown[]> {
44
+ protected list: MyAsyncCallback<Argument>[];
45
+ protected running: boolean;
46
+ constructor();
47
+ count(): number;
48
+ reset(): void;
49
+ /**
50
+ * @param name optional name of `item` (will assign displayName to `item`)
51
+ * @returns function list length
52
+ */
53
+ add(item: MyAsyncCallback<Argument>, name?: string): number;
54
+ /**
55
+ * @returns if removed: return `item`; if did not exists: return null
56
+ */
57
+ remove(item: MyAsyncCallback<Argument>): null | MyAsyncCallback<Argument>;
58
+ /**
59
+ * Stop run if one callback return `true`
60
+ * @returns {boolean} true if one callback return true
61
+ */
62
+ run(...argument: Argument): Promise<boolean>;
63
+ }
64
+
65
+ /**
66
+ * Async version of Disposable
67
+ * @public
68
+ */
69
+ export declare class AsyncDisposable implements IAsyncDisposable, IDisposableBaseInternal {
70
+ private readonly _disposables;
71
+ protected readonly _onDisposeError: Emitter<Error>;
72
+ readonly onDisposeError: EventRegister<Error>;
73
+ protected readonly _onBeforeDispose: Emitter<void>;
74
+ readonly onBeforeDispose: EventRegister<void>;
75
+ private _disposed?;
76
+ get hasDisposed(): boolean;
77
+ /**
78
+ * @throws if already disposed
79
+ */
80
+ assertNotDisposed(): void;
81
+ /**
82
+ * register a disposable object
83
+ */
84
+ _register<T extends IAsyncDisposable>(d: T): T;
85
+ dispose(): Promise<void>;
86
+ }
87
+
88
+ /**
89
+ * Convert Iterator into Promise, resolve with the last value from Iterator
90
+ */
91
+ export declare function awaitIterator<T>(generator: Iterator<T>): Promise<T>;
92
+
93
+ /**
94
+ * Auto bind `this` to class method
95
+ */
96
+ export declare const bindThis: MethodDecorator;
97
+
98
+ /**
99
+ * Manage a list of callback
100
+ */
101
+ export declare class CallbackList<Argument extends unknown[]> {
102
+ protected list: MyCallback<Argument>[];
103
+ protected running: boolean;
104
+ protected stop: boolean;
105
+ constructor();
106
+ count(): number;
107
+ reset(): void;
108
+ /**
109
+ * @param name optional name of `item` (will assign displayName to `item`)
110
+ * @returns function list length
111
+ */
112
+ add(item: MyCallback<Argument>, name?: string): number;
113
+ /**
114
+ * @returns if removed: return `item`; if did not exists: return null
115
+ */
116
+ remove(item: MyCallback<Argument>): null | MyCallback<Argument>;
117
+ /**
118
+ * @returns {boolean} true if every callback called, false if stop in middle
119
+ */
120
+ run(...argument: Argument): boolean;
121
+ stopRun(): void;
122
+ }
123
+
124
+ /** @public */
125
+ export declare function camelCase(str: string): string;
126
+
127
+ /**
128
+ * Error when cancel() is called
129
+ * @public
130
+ */
131
+ export declare class CanceledError extends Error {
132
+ constructor();
133
+ }
134
+
135
+ /** @public */
136
+ export declare interface CancellationToken {
137
+ readonly isCancellationRequested: boolean;
138
+ onCancellationRequested(callback: EventHandler<void>): IDisposable;
139
+ }
140
+
141
+ /** @public */
142
+ export declare class CancellationTokenSource extends DisposableOnce implements IDisposable {
143
+ private readonly driver;
144
+ readonly token: CancellationToken;
145
+ constructor();
146
+ cancel(): void;
147
+ _dispose(): void;
148
+ }
149
+
150
+ export declare enum ColorKind {
151
+ DISABLE = 0,
152
+ TERMINAL = 1,
153
+ WEB = 2,
154
+ DETECT = 3
155
+ }
156
+
157
+ export declare function concatStringType<T0 extends string>(t0: T0): `${T0}`;
158
+
159
+ export declare function concatStringType<T0 extends string, T1 extends string>(t0: T0, t1: T1): `${T0}${T1}`;
160
+
161
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string>(t0: T0, t1: T1, t2: T2): `${T0}${T1}${T2}`;
162
+
163
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string>(t0: T0, t1: T1, t2: T2, t3: T3): `${T0}${T1}${T2}${T3}`;
164
+
165
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4): `${T0}${T1}${T2}${T3}${T4}`;
166
+
167
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5): `${T0}${T1}${T2}${T3}${T4}${T5}`;
168
+
169
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}`;
170
+
171
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}`;
172
+
173
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}`;
174
+
175
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string, T9 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}${T9}`;
176
+
177
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string, T9 extends string, T10 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9, t10: T10): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}${T9}${T10}`;
178
+
179
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string, T9 extends string, T10 extends string, T11 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9, t10: T10, t11: T11): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}${T9}${T10}${T11}`;
180
+
181
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string, T9 extends string, T10 extends string, T11 extends string, T12 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9, t10: T10, t11: T11, t12: T12): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}${T9}${T10}${T11}${T12}`;
182
+
183
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string, T9 extends string, T10 extends string, T11 extends string, T12 extends string, T13 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9, t10: T10, t11: T11, t12: T12, t13: T13): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}${T9}${T10}${T11}${T12}${T13}`;
184
+
185
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string, T9 extends string, T10 extends string, T11 extends string, T12 extends string, T13 extends string, T14 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9, t10: T10, t11: T11, t12: T12, t13: T13, t14: T14): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}${T9}${T10}${T11}${T12}${T13}${T14}`;
186
+
187
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string, T9 extends string, T10 extends string, T11 extends string, T12 extends string, T13 extends string, T14 extends string, T15 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9, t10: T10, t11: T11, t12: T12, t13: T13, t14: T14, t15: T15): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}${T9}${T10}${T11}${T12}${T13}${T14}${T15}`;
188
+
189
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string, T9 extends string, T10 extends string, T11 extends string, T12 extends string, T13 extends string, T14 extends string, T15 extends string, T16 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9, t10: T10, t11: T11, t12: T12, t13: T13, t14: T14, t15: T15, t16: T16): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}${T9}${T10}${T11}${T12}${T13}${T14}${T15}${T16}`;
190
+
191
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string, T9 extends string, T10 extends string, T11 extends string, T12 extends string, T13 extends string, T14 extends string, T15 extends string, T16 extends string, T17 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9, t10: T10, t11: T11, t12: T12, t13: T13, t14: T14, t15: T15, t16: T16, t17: T17): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}${T9}${T10}${T11}${T12}${T13}${T14}${T15}${T16}${T17}`;
192
+
193
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string, T9 extends string, T10 extends string, T11 extends string, T12 extends string, T13 extends string, T14 extends string, T15 extends string, T16 extends string, T17 extends string, T18 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9, t10: T10, t11: T11, t12: T12, t13: T13, t14: T14, t15: T15, t16: T16, t17: T17, t18: T18): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}${T9}${T10}${T11}${T12}${T13}${T14}${T15}${T16}${T17}${T18}`;
194
+
195
+ export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string, T3 extends string, T4 extends string, T5 extends string, T6 extends string, T7 extends string, T8 extends string, T9 extends string, T10 extends string, T11 extends string, T12 extends string, T13 extends string, T14 extends string, T15 extends string, T16 extends string, T17 extends string, T18 extends string, T19 extends string>(t0: T0, t1: T1, t2: T2, t3: T3, t4: T4, t5: T5, t6: T6, t7: T7, t8: T8, t9: T9, t10: T10, t11: T11, t12: T12, t13: T13, t14: T14, t15: T15, t16: T16, t17: T17, t18: T18, t19: T19): `${T0}${T1}${T2}${T3}${T4}${T5}${T6}${T7}${T8}${T9}${T10}${T11}${T12}${T13}${T14}${T15}${T16}${T17}${T18}${T19}`;
196
+
197
+ export declare function convertCatchedError(e: unknown): Error;
198
+
199
+ /**
200
+ * Get a symbol singleton, if not exists, create it
201
+ *
202
+ * this is very like Symbol.for, but not real global symbol
203
+ * @public
204
+ */
205
+ export declare function createSymbol(category: string, name: string): symbol;
206
+
207
+ /**
208
+ * Like a Set, but use custom compare function insteadof ===
209
+ */
210
+ export declare class CustomSet<Type = string> {
211
+ protected registry: Type[];
212
+ private finder;
213
+ constructor(finder?: Finder<Type>);
214
+ setFinder(finder: Finder<Type>): void;
215
+ has(item: Type): boolean;
216
+ add(item: Type): boolean;
217
+ /**
218
+ * @returns all added values
219
+ */
220
+ addAll(items: Type[]): Type[];
221
+ delete(item: Type): boolean;
222
+ /**
223
+ * @returns all deleted values
224
+ */
225
+ deleteAll(items: Type[]): Type[];
226
+ clear(): void;
227
+ get length(): number;
228
+ get size(): number;
229
+ [Symbol.iterator](): Iterator<Type>;
230
+ keys(): Iterator<Type>;
231
+ values(): Iterator<Type>;
232
+ toArray(): Type[];
233
+ }
234
+
235
+ export declare type DeepPartial<T> = {
236
+ [P in keyof T]?: DeepPartial<T[P]>;
237
+ };
238
+
239
+ export declare type DeepReadonly<T> = {
240
+ readonly [P in keyof T]: DeepReadonly<T[P]>;
241
+ };
242
+
243
+ export declare type DeepWriteable<T> = {
244
+ -readonly [P in keyof T]: DeepWriteable<T[P]>;
245
+ };
246
+
247
+ /**
248
+ * a promise can resolve or reject later
249
+ * @public
250
+ */
251
+ export declare class DeferredPromise<T, PT = any> {
252
+ readonly p: Promise<T> & IProgressHolder<T, PT>;
253
+ private _completeCallback;
254
+ private _errorCallback;
255
+ private _state;
256
+ private _progressList?;
257
+ constructor();
258
+ notify(progress: PT): this;
259
+ progress(fn: ProgressCallback<PT>): void;
260
+ get completed(): boolean;
261
+ get resolved(): boolean;
262
+ get rejected(): boolean;
263
+ /**
264
+ * resolve the promise
265
+ */
266
+ complete(value: T): void;
267
+ /**
268
+ * reject the promise
269
+ */
270
+ error(err: any): void;
271
+ /**
272
+ * reject the promise with CancelError
273
+ */
274
+ cancel(): void;
275
+ /**
276
+ * Convert promise into deferred
277
+ * returns a DeferredPromise, resolve when prev resolve, reject when prev reject
278
+ */
279
+ static wrap(prev: Promise<any>): DeferredPromise<unknown, any>;
280
+ }
281
+
282
+ export declare function definePublicConstant(object: any, propertyKey: string | symbol, value: any): void;
283
+
284
+ /**
285
+ * remember arguments after run
286
+ * run all later added function with memorized argument
287
+ */
288
+ export declare class DelayCallbackList<Argument extends unknown[]> {
289
+ private delayArgument?;
290
+ private delayComplete;
291
+ protected list?: MyDelayCallback<Argument>[];
292
+ count(): number;
293
+ add(item: MyDelayCallback<Argument>, name?: string): void;
294
+ run(argument: Argument): void;
295
+ }
296
+
297
+ /**
298
+ * Delete a symbol from window/global object
299
+ * @public
300
+ */
301
+ export declare function deleteSymbol(category: string, name: string): void;
302
+
303
+ /**
304
+ * Standalone disposable class, can use as instance or base class.
305
+ */
306
+ export declare class Disposable implements IDisposable, IDisposableBaseInternal {
307
+ private readonly _disposables;
308
+ protected readonly _onDisposeError: Emitter<Error>;
309
+ readonly onDisposeError: EventRegister<Error>;
310
+ protected readonly _onBeforeDispose: Emitter<void>;
311
+ readonly onBeforeDispose: EventRegister<void>;
312
+ private _disposed?;
313
+ get hasDisposed(): boolean;
314
+ /**
315
+ * @throws if already disposed
316
+ */
317
+ assertNotDisposed(): void;
318
+ _register<T extends IDisposable>(d: T): T;
319
+ dispose(): void;
320
+ }
321
+
322
+ export declare abstract class DisposableOnce implements IDisposable {
323
+ private _disposed?;
324
+ get hasDisposed(): boolean;
325
+ dispose(): void;
326
+ protected abstract _dispose(): void;
327
+ }
328
+
329
+ /**
330
+ * Error when call dispose() twice
331
+ */
332
+ export declare class DisposedError extends Error {
333
+ constructor(object: any, previous: Error);
334
+ }
335
+
336
+ /**
337
+ * Dispose the global disposable store
338
+ * this function must be manually called by user, when registerGlobalLifecycle is used
339
+ *
340
+ * @throws when call twice
341
+ */
342
+ export declare function disposeGlobal(): Promise<void>;
343
+
344
+ export declare class Emitter<T> implements IDisposable {
345
+ private readonly _callbacks;
346
+ constructor();
347
+ listenerCount(): number;
348
+ fire(data: T): void;
349
+ /**
350
+ * Same with `fire`, but do not stop run when catch error
351
+ */
352
+ fireNoError(data: T): void;
353
+ get register(): EventRegister<T>;
354
+ handle(callback: EventHandler<T>): IDisposable;
355
+ dispose(): void;
356
+ }
357
+
358
+ /**
359
+ * Same as disposeGlobal, but do not throw by duplicate call
360
+ */
361
+ export declare function ensureDisposeGlobal(): Promise<void>;
362
+
363
+ export declare function ensureGlobalObject<T>(symbol: string, constructor: () => T): T;
364
+
365
+ /** @public */
366
+ export declare function escapeRegExp(str: string): string;
367
+
368
+ export declare interface EventHandler<T> {
369
+ (data: T): void;
370
+ }
371
+
372
+ export declare interface EventRegister<T> {
373
+ (callback: EventHandler<T>): IDisposable;
374
+ }
375
+
376
+ /**
377
+ * A map, will throw error when try to get not exists key
378
+ */
379
+ export declare class ExtendMap<K, V> extends Map<K, V> {
380
+ /**
381
+ * Get value from map, if not exists, throw an error
382
+ */
383
+ get(id: K): V;
384
+ /**
385
+ * Get value from map, if not exists, return def instead (not insert it into map)
386
+ */
387
+ get(id: K, def: V): V;
388
+ /**
389
+ * Get a value, if not exists, call init() and set to map
390
+ */
391
+ entry(id: K, init: (id: K) => V): V;
392
+ }
393
+
394
+ /** Find the index of given item */
395
+ export declare interface Finder<Type> {
396
+ (this: Type[], item: Type): number;
397
+ }
398
+
399
+ /**
400
+ * @deprecated Use Promise.allSettled instead
401
+ */
402
+ export declare function finishAllPromise<T>(ps: Promise<T>[]): Promise<PromiseResultArray<T>>;
403
+
404
+ /**
405
+ * Takes ms
406
+ */
407
+ export declare function fromTimeStamp(timestamp: number): Date;
408
+
409
+ /**
410
+ * Get displayName/name of a function
411
+ */
412
+ export declare function functionName(func: Function): string;
413
+
414
+ /**
415
+ * Get nth line of Error.stack
416
+ * @returns {string} if frame greater than max, return ''
417
+ */
418
+ export declare function getErrorFrame(e: Error, frame: number): string;
419
+
420
+ /**
421
+ * Returns ms
422
+ */
423
+ export declare function getTimeStamp(date: Date): number;
424
+
425
+ export declare function getTypeOf(value: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "function" | "null" | "Promise" | "Error" | "DOM" | "EventTarget" | "unknown";
426
+
427
+ /**
428
+ * globalThis when supported.
429
+ * if not, window in browser, global in nodejs
430
+ * @public
431
+ */
432
+ export declare const globalObject: any;
433
+
434
+ /**
435
+ * Same with globalSingletonStrong, but save instance in a WeakMap, so it maybe delete by gc if no reference
436
+ * @public
437
+ */
438
+ export declare function globalSingleton<T>(symbol: symbol | string, constructor: () => T): T;
439
+
440
+ /**
441
+ * Same with globalSingletonStrong, but save instance in a WeakMap, so it maybe delete by gc if no reference
442
+ * @public
443
+ */
444
+ export declare function globalSingleton<T>(symbol: symbol | string): T | undefined;
445
+
446
+ /**
447
+ * Delete a key from window/global space
448
+ * use with care
449
+ * @public
450
+ */
451
+ export declare function globalSingletonDelete(symbol: symbol | string): void;
452
+
453
+ /**
454
+ * Get an singleton instance from window/global space
455
+ * if symbol did not exists, create it and assign to window/global
456
+ * @public
457
+ */
458
+ export declare function globalSingletonStrong<T>(symbol: symbol | string, constructor: () => T): T;
459
+
460
+ /**
461
+ * Get an singleton instance from window/global space
462
+ * @public
463
+ */
464
+ export declare function globalSingletonStrong<T>(symbol: symbol | string): T | undefined;
465
+
466
+ export declare function hookClass<TC extends IConstructorOf<T>, T>(target: TC): IHooks<T, TC>;
467
+
468
+ export declare const hookClassSymbol: unique symbol;
469
+
470
+ export declare namespace humanDate {
471
+ /**
472
+ * Format: HH:mm:ss
473
+ */
474
+ export function time(date: Date | string | number): string;
475
+ /**
476
+ * Format: YYYY-MM-dd
477
+ *
478
+ * separator can change
479
+ */
480
+ export function date(date: Date | string | number, sp?: string): string;
481
+ /**
482
+ * Format: YYYY-MM-dd HH:mm:ss
483
+ */
484
+ export function datetime(date: Date | string | number): string;
485
+ export interface ITimeFormatter {
486
+ (s: number): string;
487
+ }
488
+ export interface IFormatters {
489
+ s: ITimeFormatter;
490
+ m: ITimeFormatter;
491
+ h: ITimeFormatter;
492
+ d: ITimeFormatter;
493
+ }
494
+ /**
495
+ * set format for time delta
496
+ */
497
+ export function setLocaleFormatter(formatter: Partial<IFormatters>): void;
498
+ /**
499
+ * format time delta (in ms) to string, like: '1d'
500
+ * when ms<=0, returns '0s'
501
+ *
502
+ * format can set by `setLocaleFormatter`
503
+ * day is the largest unit
504
+ */
505
+ export function deltaTiny(ms: number): string;
506
+ /**
507
+ * format time delta (in ms) to string, like: '1d10m42s'
508
+ * when ms<=0, returns '0s'
509
+ *
510
+ * format can set by `setLocaleFormatter`
511
+ * day is the largest unit
512
+ */
513
+ export function delta(ms: number): string;
514
+ }
515
+
516
+ /**
517
+ * Convert bytes to largest unit, with binary prefix unit (1024), eg: 211.293GiB
518
+ * @public
519
+ */
520
+ export declare function humanSize(bytes: number, fixed?: number): string;
521
+
522
+ /**
523
+ * Convert bytes to largest unit, with SI prefix unit (1000), eg: 211.293GB
524
+ * @public
525
+ */
526
+ export declare function humanSizeSI(bytes: number, fixed?: number): string;
527
+
528
+ /** @deprecated */
529
+ export declare function humanSpeed(bps: number): string;
530
+
531
+ /**
532
+ * @public
533
+ */
534
+ export declare interface IArrayUpdate<T> {
535
+ add: T[];
536
+ del: T[];
537
+ same: T[];
538
+ }
539
+
540
+ /** @public */
541
+ export declare interface IAsyncDisposable {
542
+ dispose(): void | Promise<void>;
543
+ }
544
+
545
+ declare interface IConstructorOf<T> extends Object {
546
+ new (...args: any[]): T;
547
+ }
548
+
549
+ /** @public */
550
+ export declare interface IDisposable {
551
+ dispose(): void;
552
+ }
553
+
554
+ /**
555
+ * @private
556
+ */
557
+ export declare interface IDisposableBaseInternal {
558
+ onDisposeError: EventRegister<Error>;
559
+ onBeforeDispose: EventRegister<void>;
560
+ readonly hasDisposed: boolean;
561
+ }
562
+
563
+ export declare interface IEventEmitterObject<T extends Function> {
564
+ addListener(type: string, handler: T): any;
565
+ removeListener(type: string, handler: T): any;
566
+ }
567
+
568
+ export declare interface IEventHostObject<T extends Function> {
569
+ addEventListener(type: string, handler: T, options?: IEventListenerOptions): any;
570
+ removeEventListener(type: string, handler: T, options?: IEventListenerOptions): any;
571
+ }
572
+
573
+ export declare interface IEventListenerOptions {
574
+ capture?: boolean;
575
+ once?: boolean;
576
+ passive?: boolean;
577
+ }
578
+
579
+ declare interface IHooks<T, TC> {
580
+ afterConstruct?: ((obj: T) => void)[];
581
+ beforeConstruct?: ((obj: TC) => T | void)[];
582
+ }
583
+
584
+ /**
585
+ * Decorater version of `initOnRead`
586
+ * @see initOnRead
587
+ */
588
+ export declare function init<O, T extends keyof O>(init: InitFunc<O, O[T]>): PropertyDecorator;
589
+
590
+ /** @public */
591
+ export declare interface InitFunc<O, T> {
592
+ (this: O): T;
593
+ }
594
+
595
+ /**
596
+ * Define property on target, call init it when first use, them memorize
597
+ * @public
598
+ */
599
+ export declare function initOnRead<O, T extends keyof O>(target: any, propertyKey: T, init: InitFunc<O, O[T]>): void;
600
+
601
+ export declare interface IProgressHolder<T, PT> {
602
+ progress(fn: ProgressCallback<PT>): Promise<T> & IProgressHolder<T, PT>;
603
+ }
604
+
605
+ /**
606
+ * return true if a path is absolute:
607
+ * - /xxxx
608
+ * - \xxxx
609
+ * - c:/
610
+ * - c:\
611
+ * - http://
612
+ */
613
+ export declare function isAbsolute(path: string): boolean;
614
+
615
+ /**
616
+ * is the two array EXACTLY same
617
+ * @public
618
+ */
619
+ export declare function isArraySame<T>(a1: T[], a2: T[]): boolean;
620
+
621
+ /** @public */
622
+ export declare function isCanceledError(error: any): boolean;
623
+
624
+ /**
625
+ * Check if a date is NaN
626
+ */
627
+ export declare function isDateInvalid(date: Date): boolean;
628
+
629
+ export declare function isDisposedError(error: any): boolean;
630
+
631
+ export declare const isElectron: boolean;
632
+
633
+ export declare const isElectronMain: boolean;
634
+
635
+ export declare const isElectronRenderer: boolean;
636
+
637
+ export declare const isLinux: boolean;
638
+
639
+ export declare const isMacintosh: boolean;
640
+
641
+ export declare const isNative: boolean;
642
+
643
+ /**
644
+ * Should ensure a and b is none-null before call this
645
+ * @returns true when a and b has EXACTLY same keys and values
646
+ */
647
+ export declare function isObjectSame(a: any, b: any): boolean;
648
+
649
+ /**
650
+ * Should ensure a and b is none-null before call this
651
+ * @returns true when a and b has EXACTLY same keys and values, recursive compare all object values
652
+ */
653
+ export declare function isObjectSameRecursive(a: any, b: any): boolean;
654
+
655
+ export declare function isScalar(value: any): value is bigint | number | boolean | string | symbol | undefined | null | Date;
656
+
657
+ export declare function isSerializable(value: any): SerializableKind;
658
+
659
+ /** @public */
660
+ export declare function isTimeoutError(error: Error): error is TimeoutError;
661
+
662
+ export declare const isWeb: boolean;
663
+
664
+ export declare const isWindows: boolean;
665
+
666
+ export declare interface IUniqueIdFactory<T> {
667
+ (item: T): string;
668
+ }
669
+
670
+ /**
671
+ * lowercase first char
672
+ * @public
673
+ */
674
+ export declare function lcfirst<T extends string>(str: T): Uncapitalize<T>;
675
+
676
+ /** @public */
677
+ export declare function linux_case(str: string): string;
678
+
679
+ /** @public */
680
+ export declare function linux_case_hyphen(str: string): string;
681
+
682
+ export declare interface MapLike<V> {
683
+ [id: string]: V;
684
+ }
685
+
686
+ export declare interface MaybeNamedFunction extends Function {
687
+ displayName?: string;
688
+ }
689
+
690
+ /**
691
+ * Decorate class method/getter
692
+ *
693
+ * remember first return value of method/getter, directlly return memorized value when call it again
694
+ */
695
+ export declare const memo: MethodDecorator;
696
+
697
+ export declare const memorizeValueSymbol: unique symbol;
698
+
699
+ export declare interface MyAsyncCallback<Argument extends unknown[]> {
700
+ displayName?: string;
701
+ (...param: Argument): Promise<void | undefined | boolean> | void | undefined | boolean;
702
+ }
703
+
704
+ export declare interface MyCallback<Argument extends unknown[]> {
705
+ displayName?: string;
706
+ (...param: Argument): any;
707
+ }
708
+
709
+ export declare interface MyDelayCallback<Argument extends unknown[]> {
710
+ displayName?: string;
711
+ (...param: Argument): void;
712
+ }
713
+
714
+ /**
715
+ * Function with displayName
716
+ */
717
+ export declare interface NamedFunction extends Function {
718
+ displayName: string;
719
+ }
720
+
721
+ /**
722
+ * Set displayName of a function
723
+ */
724
+ export declare function nameFunction<T extends Function>(name: string, func: T): T & NamedFunction;
725
+
726
+ export declare function nextDay(d: Date, n?: number): Date;
727
+
728
+ export declare function nextHour(d: Date, n?: number): Date;
729
+
730
+ export declare function nextMinute(d: Date, n?: number): Date;
731
+
732
+ export declare function nextMonth(d: Date, n?: number): Date;
733
+
734
+ export declare function nextSecond(d: Date, n?: number): Date;
735
+
736
+ export declare function nextWeek(d: Date, n?: number): Date;
737
+
738
+ export declare function nextYear(d: Date, n?: number): Date;
739
+
740
+ /**
741
+ * ensure a value is an array
742
+ * @public
743
+ */
744
+ export declare function normalizeArray<T>(input: T | T[]): T[];
745
+
746
+ /**
747
+ * replace // to /
748
+ * replace \ to /
749
+ * remove ending /
750
+ */
751
+ export declare function normalizePath(p: string): string;
752
+
753
+ /**
754
+ * Get deep child property of an object
755
+ * @param path object path seprate by "."
756
+ */
757
+ export declare function objectPath(obj: object, path: string): any;
758
+
759
+ export declare const oneDay = 86400000;
760
+
761
+ export declare const oneHour = 1440000;
762
+
763
+ export declare const oneMinute = 60000;
764
+
765
+ export declare const oneSecond = 1000;
766
+
767
+ export declare const oneWeek = 604800000;
768
+
769
+ /**
770
+ * Pad number to two digits string, used in time format
771
+ * @public
772
+ */
773
+ export declare function pad2(s: number): string;
774
+
775
+ /**
776
+ * Work on "PATH"-like values
777
+ */
778
+ export declare class PathArray extends Set<string> {
779
+ private readonly sep;
780
+ constructor(init: string, sep: ':' | ';');
781
+ add(paths: string): this;
782
+ delete(paths: string): boolean;
783
+ has(path: string): boolean;
784
+ toString(): string;
785
+ /**
786
+ * @returns an array with `part` append to every element
787
+ */
788
+ join(part: string): string[];
789
+ }
790
+
791
+ export declare type ProgressCallback<T = any> = (value: T) => void;
792
+
793
+ /**
794
+ * resolve with true when `p` resolve
795
+ * resolve with false when `p` reject (and drop error)
796
+ */
797
+ export declare function promiseBool(p: Promise<any>): Promise<boolean>;
798
+
799
+ export declare class PromisePool {
800
+ protected readonly promiseList: Record<string, DeferredPromise<any>>;
801
+ size(): number;
802
+ create(id: string): Promise<any> & IProgressHolder<any, any>;
803
+ has(id: string): boolean;
804
+ done(id: string, data: any): void;
805
+ error(id: string, e: Error): void;
806
+ dispose(): void;
807
+ }
808
+
809
+ /** @deprecated */
810
+ export declare interface PromiseResultArray<T> {
811
+ count: number;
812
+ fulfilledResult: T[];
813
+ fulfilled: number[];
814
+ rejectedResult: Error[];
815
+ rejected: number[];
816
+ }
817
+
818
+ export declare function RegexpFinder(this: RegExp[], item: RegExp): number;
819
+
820
+ /**
821
+ * Add object into global disposable store, it will be dispose when call to `disposeGlobal`
822
+ */
823
+ export declare function registerGlobalLifecycle(object: IDisposable): void;
824
+
825
+ export declare enum SerializableKind {
826
+ Invalid = 0,
827
+ Primitive = 1,
828
+ Manual = 2,
829
+ Other = 3
830
+ }
831
+
832
+ export declare function singleton(type?: SingletonType): ClassDecorator;
833
+
834
+ export declare const singletonSymbol: unique symbol;
835
+
836
+ export declare enum SingletonType {
837
+ Throw = 0,
838
+ Return = 1
839
+ }
840
+
841
+ /**
842
+ * @returns promise resolve after specific time
843
+ */
844
+ export declare function sleep(ms: number): Promise<void>;
845
+
846
+ /**
847
+ * Sort string array alphabet order
848
+ *
849
+ * to be used in <arr>.sort()
850
+ * @public
851
+ */
852
+ export declare function sortByString(a: string, b: string): number;
853
+
854
+ /**
855
+ * assert value is not null or undefined or NaN
856
+ * @throws Value is null or undefined
857
+ * @public
858
+ */
859
+ export declare function throwNull<T>(val: T): NonNullable<T>;
860
+
861
+ /**
862
+ * @returns promise reject with TimeoutError after specific time
863
+ */
864
+ export declare function timeout(ms: number, error?: string): Promise<never>;
865
+
866
+ /**
867
+ * Error when timeout() done
868
+ * @public
869
+ */
870
+ export declare class TimeoutError extends Error {
871
+ constructor(time: number, what?: string);
872
+ }
873
+
874
+ export declare function timeoutPromise<T>(ms: number, p: Promise<T>): Promise<T>;
875
+
876
+ export declare function timeoutPromise<T>(ms: number, message: string, p: Promise<T>): Promise<T>;
877
+
878
+ export declare function timeoutPromise<T, PT = any>(ms: number, p: DeferredPromise<T, PT>): DeferredPromise<T, PT>;
879
+
880
+ export declare function timeoutPromise<T, PT = any>(ms: number, message: string, p: DeferredPromise<T, PT>): DeferredPromise<T, PT>;
881
+
882
+ export declare class TimeoutPromisePool extends PromisePool {
883
+ private readonly defaultTimeoutMs;
884
+ constructor(defaultTimeoutMs?: number);
885
+ create(id: string, timeoutMs?: number, timeoutMsg?: string): Promise<any> & IProgressHolder<any, any>;
886
+ }
887
+
888
+ /**
889
+ * Convert "dispose function" to disposable object
890
+ * @public
891
+ */
892
+ export declare function toDisposable(fn: () => void): IDisposable;
893
+
894
+ /**
895
+ * try to call `inspect` method of an object, if not exists, call `toString`.
896
+ * @returns {string}
897
+ */
898
+ export declare function tryInspect(object: any): any;
899
+
900
+ /**
901
+ * Uppercase first char
902
+ * @public
903
+ */
904
+ export declare function ucfirst<T extends string>(str: T): Capitalize<T>;
905
+
906
+ /**
907
+ * Returns a function to be used in <arr>.filter()
908
+ *
909
+ * the returned function can use multiple times, it will remember all values inter multiple arrays
910
+ *
911
+ * @param {IUniqueIdFactory} idFactory function takes an array element, return it's id to be compare with each other
912
+ * @public
913
+ */
914
+ export declare function uniqueFilter<T>(idFactory?: IUniqueIdFactory<T>): (item: T) => boolean;
915
+
916
+ declare interface Unsubscribable {
917
+ unsubscribe(): void;
918
+ }
919
+
920
+ export declare function unsubscribableToDisposable(subscription: Unsubscribable): {
921
+ dispose: () => void;
922
+ };
923
+
924
+ export declare const userAgent: string;
925
+
926
+ export declare type ValueCallback<T = any> = (value: T | Promise<T>) => void;
927
+
928
+ export declare abstract class WrappedConsole {
929
+ info: Console['info'];
930
+ log: Console['log'];
931
+ success: Console['log'];
932
+ debug: Console['debug'];
933
+ error: Console['error'];
934
+ trace: Console['trace'];
935
+ warn: Console['warn'];
936
+ assert: Console['assert'];
937
+ time: Console['time'];
938
+ timeEnd: Console['timeEnd'];
939
+ timeLog: Console['timeLog'];
940
+ count: Console['count'];
941
+ countReset: Console['countReset'];
942
+ group: Console['group'];
943
+ groupCollapsed: Console['groupCollapsed'];
944
+ groupEnd: Console['groupEnd'];
945
+ table: Console['table'];
946
+ dir: Console['dir'];
947
+ clear: Console['clear'];
948
+ protected readonly title: string;
949
+ protected readonly parent: Console;
950
+ protected readonly bind: boolean;
951
+ constructor(title: string, { parent, bind }?: WrappedConsoleOptions);
952
+ protected wrap<T extends keyof Omit<Console & {
953
+ Console: any;
954
+ }, 'Console'>>(original: T): Function;
955
+ private wrapSimple;
956
+ private wrapExtra;
957
+ protected createPrefix(message: string): string;
958
+ private wrapMessageAt;
959
+ private convertObjectArg;
960
+ protected abstract processColorLabel(normalizedArguments: any[], messageLoc: number, level: string, prefix: string): void;
961
+ protected uncolor(args: any[], pos: number, prefix: string, postfix: string): void;
962
+ }
963
+
964
+ export declare interface WrappedConsoleOptions {
965
+ parent?: Console;
966
+ bind?: boolean;
967
+ }
968
+
969
+ export declare type Writeable<T> = {
970
+ -readonly [P in keyof T]: T[P];
971
+ };
972
+
973
+ export declare function x(): number;
974
+
975
+ export { }