@idlebox/common 1.3.35 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/path/pathArray.cjs +11 -0
- package/lib/cjs/path/pathArray.cjs.map +1 -1
- package/lib/esm/__create_index.generated.d.ts +167 -0
- package/lib/esm/__create_index.generated.d.ts.map +10 -0
- package/lib/esm/__create_index.generated.js +239 -0
- package/lib/esm/__create_index.generated.js.map +10 -0
- package/lib/esm/__virtual_tsconfig.tsbuildinfo +1 -0
- package/lib/esm/array/arrayDiff.d.ts +18 -0
- package/lib/esm/array/arrayDiff.d.ts.map +10 -0
- package/lib/esm/array/{arrayDiff.mjs → arrayDiff.js} +1 -1
- package/lib/esm/array/{arrayDiff.mjs.map → arrayDiff.js.map} +1 -1
- package/lib/esm/array/arraySame.d.ts +6 -0
- package/lib/esm/array/arraySame.d.ts.map +10 -0
- package/lib/esm/array/{arraySame.mjs → arraySame.js} +1 -1
- package/lib/esm/array/{arraySame.mjs.map → arraySame.js.map} +1 -1
- package/lib/esm/array/arrayUnique.d.ts +23 -0
- package/lib/esm/array/arrayUnique.d.ts.map +10 -0
- package/lib/esm/array/{arrayUnique.mjs → arrayUnique.js} +1 -1
- package/lib/esm/array/{arrayUnique.mjs.map → arrayUnique.js.map} +1 -1
- package/lib/esm/array/normalizeArray.d.ts +6 -0
- package/lib/esm/array/normalizeArray.d.ts.map +10 -0
- package/lib/esm/array/{normalizeArray.mjs → normalizeArray.js} +1 -1
- package/lib/esm/array/{normalizeArray.mjs.map → normalizeArray.js.map} +1 -1
- package/lib/esm/array/sortAlpha.d.ts +8 -0
- package/lib/esm/array/sortAlpha.d.ts.map +10 -0
- package/lib/esm/array/{sortAlpha.mjs → sortAlpha.js} +1 -1
- package/lib/esm/array/{sortAlpha.mjs.map → sortAlpha.js.map} +1 -1
- package/lib/esm/date/consts.d.ts +6 -0
- package/lib/esm/date/consts.d.ts.map +10 -0
- package/lib/esm/date/{consts.mjs → consts.js} +1 -1
- package/lib/esm/date/{consts.mjs.map → consts.js.map} +1 -1
- package/lib/esm/date/isInvalid.d.ts +5 -0
- package/lib/esm/date/isInvalid.d.ts.map +10 -0
- package/lib/esm/date/{isInvalid.mjs → isInvalid.js} +1 -1
- package/lib/esm/date/{isInvalid.mjs.map → isInvalid.js.map} +1 -1
- package/lib/esm/date/sibling.d.ts +8 -0
- package/lib/esm/date/sibling.d.ts.map +10 -0
- package/lib/esm/date/{sibling.mjs → sibling.js} +1 -1
- package/lib/esm/date/{sibling.mjs.map → sibling.js.map} +1 -1
- package/lib/esm/date/timeString.d.ts +46 -0
- package/lib/esm/date/timeString.d.ts.map +10 -0
- package/lib/esm/date/{timeString.mjs → timeString.js} +2 -2
- package/lib/esm/date/{timeString.mjs.map → timeString.js.map} +2 -2
- package/lib/esm/date/unix.d.ts +9 -0
- package/lib/esm/date/unix.d.ts.map +10 -0
- package/lib/esm/date/{unix.mjs → unix.js} +1 -1
- package/lib/esm/date/{unix.mjs.map → unix.js.map} +1 -1
- package/lib/esm/debugging/serializable.d.ts +13 -0
- package/lib/esm/debugging/serializable.d.ts.map +10 -0
- package/lib/esm/debugging/{serializable.mjs → serializable.js} +1 -1
- package/lib/esm/debugging/{serializable.mjs.map → serializable.js.map} +1 -1
- package/lib/esm/debugging/tryInspect.d.ts +6 -0
- package/lib/esm/debugging/tryInspect.d.ts.map +10 -0
- package/lib/esm/debugging/{tryInspect.mjs → tryInspect.js} +1 -1
- package/lib/esm/debugging/{tryInspect.mjs.map → tryInspect.js.map} +1 -1
- package/lib/esm/error/convertUnknown.d.ts +2 -0
- package/lib/esm/error/convertUnknown.d.ts.map +10 -0
- package/lib/esm/error/{convertUnknown.mjs → convertUnknown.js} +2 -2
- package/lib/esm/error/{convertUnknown.mjs.map → convertUnknown.js.map} +2 -2
- package/lib/esm/error/getFrame.d.ts +6 -0
- package/lib/esm/error/getFrame.d.ts.map +10 -0
- package/lib/esm/error/{getFrame.mjs → getFrame.js} +1 -1
- package/lib/esm/error/{getFrame.mjs.map → getFrame.js.map} +1 -1
- package/lib/esm/error/known.d.ts +14 -0
- package/lib/esm/error/known.d.ts.map +10 -0
- package/lib/esm/error/{known.mjs → known.js} +2 -2
- package/lib/esm/error/{known.mjs.map → known.js.map} +2 -2
- package/lib/esm/error/pretty.d.ts +4 -0
- package/lib/esm/error/pretty.d.ts.map +10 -0
- package/lib/esm/error/{pretty.mjs → pretty.js} +5 -5
- package/lib/esm/error/{pretty.mjs.map → pretty.js.map} +2 -2
- package/lib/esm/function/asyncCallbackList.d.ts +29 -0
- package/lib/esm/function/asyncCallbackList.d.ts.map +10 -0
- package/lib/esm/function/{asyncCallbackList.mjs → asyncCallbackList.js} +2 -2
- package/lib/esm/function/{asyncCallbackList.mjs.map → asyncCallbackList.js.map} +2 -2
- package/lib/esm/function/callbackList.d.ts +34 -0
- package/lib/esm/function/callbackList.d.ts.map +10 -0
- package/lib/esm/function/{callbackList.mjs → callbackList.js} +2 -2
- package/lib/esm/function/{callbackList.mjs.map → callbackList.js.map} +2 -2
- package/lib/esm/function/delayCallbackList.d.ts +17 -0
- package/lib/esm/function/delayCallbackList.d.ts.map +10 -0
- package/lib/esm/function/{delayCallbackList.mjs → delayCallbackList.js} +2 -2
- package/lib/esm/function/{delayCallbackList.mjs.map → delayCallbackList.js.map} +2 -2
- package/lib/esm/function/functionName.d.ts +22 -0
- package/lib/esm/function/functionName.d.ts.map +10 -0
- package/lib/esm/function/{functionName.mjs → functionName.js} +1 -1
- package/lib/esm/function/{functionName.mjs.map → functionName.js.map} +1 -1
- package/lib/esm/lifecycle/dispose/bridges/rxjs.d.ts +8 -0
- package/lib/esm/lifecycle/dispose/bridges/rxjs.d.ts.map +10 -0
- package/lib/esm/lifecycle/dispose/bridges/{rxjs.mjs → rxjs.js} +1 -1
- package/lib/esm/lifecycle/dispose/bridges/{rxjs.mjs.map → rxjs.js.map} +1 -1
- package/lib/esm/lifecycle/dispose/disposableEvent.d.ts +17 -0
- package/lib/esm/lifecycle/dispose/disposableEvent.d.ts.map +10 -0
- package/lib/esm/lifecycle/dispose/{disposableEvent.mjs → disposableEvent.js} +1 -1
- package/lib/esm/lifecycle/dispose/{disposableEvent.mjs.map → disposableEvent.js.map} +1 -1
- package/lib/esm/lifecycle/dispose/disposedError.d.ts +11 -0
- package/lib/esm/lifecycle/dispose/disposedError.d.ts.map +10 -0
- package/lib/esm/lifecycle/dispose/{disposedError.mjs → disposedError.js} +4 -4
- package/lib/esm/lifecycle/dispose/{disposedError.mjs.map → disposedError.js.map} +2 -2
- package/lib/esm/lifecycle/dispose/lifecycle.async.d.ts +27 -0
- package/lib/esm/lifecycle/dispose/lifecycle.async.d.ts.map +10 -0
- package/lib/esm/lifecycle/dispose/{lifecycle.async.mjs → lifecycle.async.js} +4 -4
- package/lib/esm/lifecycle/dispose/{lifecycle.async.mjs.map → lifecycle.async.js.map} +2 -2
- package/lib/esm/lifecycle/dispose/lifecycle.d.ts +23 -0
- package/lib/esm/lifecycle/dispose/lifecycle.d.ts.map +10 -0
- package/lib/esm/lifecycle/dispose/lifecycle.global.d.ts +27 -0
- package/lib/esm/lifecycle/dispose/lifecycle.global.d.ts.map +10 -0
- package/lib/esm/lifecycle/dispose/{lifecycle.global.mjs → lifecycle.global.js} +4 -4
- package/lib/esm/lifecycle/dispose/{lifecycle.global.mjs.map → lifecycle.global.js.map} +2 -2
- package/lib/esm/lifecycle/dispose/{lifecycle.mjs → lifecycle.js} +1 -1
- package/lib/esm/lifecycle/dispose/{lifecycle.mjs.map → lifecycle.js.map} +1 -1
- package/lib/esm/lifecycle/dispose/lifecycle.sync.d.ts +32 -0
- package/lib/esm/lifecycle/dispose/lifecycle.sync.d.ts.map +10 -0
- package/lib/esm/lifecycle/dispose/{lifecycle.sync.mjs → lifecycle.sync.js} +3 -3
- package/lib/esm/lifecycle/dispose/{lifecycle.sync.mjs.map → lifecycle.sync.js.map} +2 -2
- package/lib/esm/lifecycle/event/event.d.ts +39 -0
- package/lib/esm/lifecycle/event/event.d.ts.map +10 -0
- package/lib/esm/lifecycle/event/{event.mjs → event.js} +1 -1
- package/lib/esm/lifecycle/event/{event.mjs.map → event.js.map} +1 -1
- package/lib/esm/lifecycle/event/memorized.d.ts +17 -0
- package/lib/esm/lifecycle/event/memorized.d.ts.map +10 -0
- package/lib/esm/lifecycle/event/{memorized.mjs → memorized.js} +2 -2
- package/lib/esm/lifecycle/event/{memorized.mjs.map → memorized.js.map} +2 -2
- package/lib/esm/lifecycle/promise/cancel.d.ts +10 -0
- package/lib/esm/lifecycle/promise/cancel.d.ts.map +10 -0
- package/lib/esm/lifecycle/promise/{cancel.mjs → cancel.js} +1 -1
- package/lib/esm/lifecycle/promise/{cancel.mjs.map → cancel.js.map} +1 -1
- package/lib/esm/lifecycle/promise/cancellationToken/driver.browser.d.ts +11 -0
- package/lib/esm/lifecycle/promise/cancellationToken/driver.browser.d.ts.map +10 -0
- package/lib/esm/lifecycle/promise/cancellationToken/{driver.browser.mjs → driver.browser.js} +1 -1
- package/lib/esm/lifecycle/promise/cancellationToken/{driver.browser.mjs.map → driver.browser.js.map} +1 -1
- package/lib/esm/lifecycle/promise/cancellationToken/driver.common.d.ts +11 -0
- package/lib/esm/lifecycle/promise/cancellationToken/driver.common.d.ts.map +10 -0
- package/lib/esm/lifecycle/promise/cancellationToken/{driver.common.mjs → driver.common.js} +2 -2
- package/lib/esm/lifecycle/promise/cancellationToken/{driver.common.mjs.map → driver.common.js.map} +2 -2
- package/lib/esm/lifecycle/promise/cancellationToken/source.d.ts +27 -0
- package/lib/esm/lifecycle/promise/cancellationToken/source.d.ts.map +10 -0
- package/lib/esm/lifecycle/promise/cancellationToken/{source.mjs → source.js} +5 -5
- package/lib/esm/lifecycle/promise/cancellationToken/{source.mjs.map → source.js.map} +2 -2
- package/lib/esm/lifecycle/promise/deferredPromise.d.ts +40 -0
- package/lib/esm/lifecycle/promise/deferredPromise.d.ts.map +10 -0
- package/lib/esm/lifecycle/promise/{deferredPromise.mjs → deferredPromise.js} +2 -2
- package/lib/esm/lifecycle/promise/{deferredPromise.mjs.map → deferredPromise.js.map} +2 -2
- package/lib/esm/lifecycle/timeout/timeout.d.ts +14 -0
- package/lib/esm/lifecycle/timeout/timeout.d.ts.map +10 -0
- package/lib/esm/lifecycle/timeout/{timeout.mjs → timeout.js} +3 -3
- package/lib/esm/lifecycle/timeout/{timeout.mjs.map → timeout.js.map} +2 -2
- package/lib/esm/lifecycle/timeout/timeoutError.d.ts +10 -0
- package/lib/esm/lifecycle/timeout/timeoutError.d.ts.map +10 -0
- package/lib/esm/lifecycle/timeout/{timeoutError.mjs → timeoutError.js} +2 -2
- package/lib/esm/lifecycle/timeout/{timeoutError.mjs.map → timeoutError.js.map} +2 -2
- package/lib/esm/log/logger.d.ts +46 -0
- package/lib/esm/log/logger.d.ts.map +10 -0
- package/lib/esm/log/{logger.mjs → logger.js} +3 -3
- package/lib/esm/log/{logger.mjs.map → logger.js.map} +2 -2
- package/lib/esm/mapSet/customSet.d.ts +33 -0
- package/lib/esm/mapSet/customSet.d.ts.map +10 -0
- package/lib/esm/mapSet/{customSet.mjs → customSet.js} +1 -1
- package/lib/esm/mapSet/{customSet.mjs.map → customSet.js.map} +1 -1
- package/lib/esm/mapSet/extendMap.d.ts +21 -0
- package/lib/esm/mapSet/extendMap.d.ts.map +10 -0
- package/lib/esm/mapSet/{extendMap.mjs → extendMap.js} +1 -1
- package/lib/esm/mapSet/{extendMap.mjs.map → extendMap.js.map} +1 -1
- package/lib/esm/misc/assertNotNull.d.ts +12 -0
- package/lib/esm/misc/assertNotNull.d.ts.map +10 -0
- package/lib/esm/misc/{assertNotNull.mjs → assertNotNull.js} +1 -1
- package/lib/esm/misc/{assertNotNull.mjs.map → assertNotNull.js.map} +1 -1
- package/lib/esm/misc/package.json.d.ts +68 -0
- package/lib/esm/misc/package.json.d.ts.map +10 -0
- package/lib/esm/misc/package.json.js +2 -0
- package/lib/esm/misc/{package.json.mjs.map → package.json.js.map} +1 -1
- package/lib/esm/object/definePublicConstant.d.ts +2 -0
- package/lib/esm/object/definePublicConstant.d.ts.map +10 -0
- package/lib/esm/object/{definePublicConstant.mjs → definePublicConstant.js} +1 -1
- package/lib/esm/object/{definePublicConstant.mjs.map → definePublicConstant.js.map} +1 -1
- package/lib/esm/object/initOnRead.d.ts +10 -0
- package/lib/esm/object/initOnRead.d.ts.map +10 -0
- package/lib/esm/object/{initOnRead.mjs → initOnRead.js} +1 -1
- package/lib/esm/object/{initOnRead.mjs.map → initOnRead.js.map} +1 -1
- package/lib/esm/object/objectPath.d.ts +6 -0
- package/lib/esm/object/objectPath.d.ts.map +10 -0
- package/lib/esm/object/{objectPath.mjs → objectPath.js} +1 -1
- package/lib/esm/object/{objectPath.mjs.map → objectPath.js.map} +1 -1
- package/lib/esm/object/objectSame.d.ts +11 -0
- package/lib/esm/object/objectSame.d.ts.map +10 -0
- package/lib/esm/object/{objectSame.mjs → objectSame.js} +2 -2
- package/lib/esm/object/{objectSame.mjs.map → objectSame.js.map} +2 -2
- package/lib/esm/path/isAbsolute.d.ts +10 -0
- package/lib/esm/path/isAbsolute.d.ts.map +10 -0
- package/lib/esm/path/{isAbsolute.mjs → isAbsolute.js} +1 -1
- package/lib/esm/path/{isAbsolute.mjs.map → isAbsolute.js.map} +1 -1
- package/lib/esm/path/normalizePath.d.ts +23 -0
- package/lib/esm/path/normalizePath.d.ts.map +10 -0
- package/lib/esm/path/{normalizePath.mjs → normalizePath.js} +1 -1
- package/lib/esm/path/{normalizePath.mjs.map → normalizePath.js.map} +1 -1
- package/lib/esm/path/pathArray.d.ts +34 -0
- package/lib/esm/path/pathArray.d.ts.map +10 -0
- package/lib/esm/path/{pathArray.mjs → pathArray.js} +15 -4
- package/lib/esm/path/pathArray.js.map +10 -0
- package/lib/esm/platform/globalObject.d.ts +9 -0
- package/lib/esm/platform/globalObject.d.ts.map +10 -0
- package/lib/esm/platform/{globalObject.mjs → globalObject.js} +1 -1
- package/lib/esm/platform/{globalObject.mjs.map → globalObject.js.map} +1 -1
- package/lib/esm/platform/globalSingleton.d.ts +28 -0
- package/lib/esm/platform/globalSingleton.d.ts.map +10 -0
- package/lib/esm/platform/{globalSingleton.mjs → globalSingleton.js} +3 -3
- package/lib/esm/platform/{globalSingleton.mjs.map → globalSingleton.js.map} +2 -2
- package/lib/esm/platform/globalSymbol.d.ts +13 -0
- package/lib/esm/platform/globalSymbol.d.ts.map +10 -0
- package/lib/esm/platform/{globalSymbol.mjs → globalSymbol.js} +2 -2
- package/lib/esm/platform/{globalSymbol.mjs.map → globalSymbol.js.map} +2 -2
- package/lib/esm/platform/os.d.ts +13 -0
- package/lib/esm/platform/os.d.ts.map +10 -0
- package/lib/esm/platform/{os.mjs → os.js} +1 -1
- package/lib/esm/platform/{os.mjs.map → os.js.map} +1 -1
- package/lib/esm/promise/awaitIterator.d.ts +5 -0
- package/lib/esm/promise/awaitIterator.d.ts.map +10 -0
- package/lib/esm/promise/{awaitIterator.mjs → awaitIterator.js} +1 -1
- package/lib/esm/promise/{awaitIterator.mjs.map → awaitIterator.js.map} +1 -1
- package/lib/esm/promise/finishAllPromise.d.ts +13 -0
- package/lib/esm/promise/finishAllPromise.d.ts.map +10 -0
- package/lib/esm/promise/{finishAllPromise.mjs → finishAllPromise.js} +1 -1
- package/lib/esm/promise/{finishAllPromise.mjs.map → finishAllPromise.js.map} +1 -1
- package/lib/esm/promise/promiseBool.d.ts +6 -0
- package/lib/esm/promise/promiseBool.d.ts.map +10 -0
- package/lib/esm/promise/{promiseBool.mjs → promiseBool.js} +1 -1
- package/lib/esm/promise/{promiseBool.mjs.map → promiseBool.js.map} +1 -1
- package/lib/esm/promise/promiseCollection.d.ts +11 -0
- package/lib/esm/promise/promiseCollection.d.ts.map +10 -0
- package/lib/esm/promise/{promiseCollection.mjs → promiseCollection.js} +3 -3
- package/lib/esm/promise/{promiseCollection.mjs.map → promiseCollection.js.map} +2 -2
- package/lib/esm/promise/timeoutPromiseCollection.d.ts +7 -0
- package/lib/esm/promise/timeoutPromiseCollection.d.ts.map +10 -0
- package/lib/esm/promise/{timeoutPromiseCollection.mjs → timeoutPromiseCollection.js} +3 -3
- package/lib/esm/promise/{timeoutPromiseCollection.mjs.map → timeoutPromiseCollection.js.map} +2 -2
- package/lib/esm/reflection/classes/hookClass.d.ts +11 -0
- package/lib/esm/reflection/classes/hookClass.d.ts.map +10 -0
- package/lib/esm/reflection/classes/{hookClass.mjs → hookClass.js} +1 -1
- package/lib/esm/reflection/classes/{hookClass.mjs.map → hookClass.js.map} +1 -1
- package/lib/esm/reflection/classes/singleton.d.ts +7 -0
- package/lib/esm/reflection/classes/singleton.d.ts.map +10 -0
- package/lib/esm/reflection/classes/{singleton.mjs → singleton.js} +2 -2
- package/lib/esm/reflection/classes/{singleton.mjs.map → singleton.js.map} +2 -2
- package/lib/esm/reflection/methods/bind.d.ts +5 -0
- package/lib/esm/reflection/methods/bind.d.ts.map +10 -0
- package/lib/esm/reflection/methods/{bind.mjs → bind.js} +1 -1
- package/lib/esm/reflection/methods/{bind.mjs.map → bind.js.map} +1 -1
- package/lib/esm/reflection/methods/initOnRead.d.ts +7 -0
- package/lib/esm/reflection/methods/initOnRead.d.ts.map +10 -0
- package/lib/esm/reflection/methods/{initOnRead.mjs → initOnRead.js} +2 -2
- package/lib/esm/reflection/methods/{initOnRead.mjs.map → initOnRead.js.map} +2 -2
- package/lib/esm/reflection/methods/memorize.d.ts +8 -0
- package/lib/esm/reflection/methods/memorize.d.ts.map +10 -0
- package/lib/esm/reflection/methods/{memorize.mjs → memorize.js} +1 -1
- package/lib/esm/reflection/methods/{memorize.mjs.map → memorize.js.map} +1 -1
- package/lib/esm/state/StateMachine.d.ts +19 -0
- package/lib/esm/state/StateMachine.d.ts.map +10 -0
- package/lib/esm/state/{StateMachine.mjs → StateMachine.js} +2 -2
- package/lib/esm/state/{StateMachine.mjs.map → StateMachine.js.map} +2 -2
- package/lib/esm/string/castCase.d.ts +17 -0
- package/lib/esm/string/castCase.d.ts.map +10 -0
- package/lib/esm/string/{castCase.mjs → castCase.js} +1 -1
- package/lib/esm/string/{castCase.mjs.map → castCase.js.map} +1 -1
- package/lib/esm/string/concatType.generated.d.ts +21 -0
- package/lib/esm/string/concatType.generated.d.ts.map +10 -0
- package/lib/esm/string/{concatType.generated.mjs → concatType.generated.js} +1 -1
- package/lib/esm/string/{concatType.generated.mjs.map → concatType.generated.js.map} +1 -1
- package/lib/esm/string/escapeRegexp.d.ts +3 -0
- package/lib/esm/string/escapeRegexp.d.ts.map +10 -0
- package/lib/esm/string/{escapeRegexp.mjs → escapeRegexp.js} +1 -1
- package/lib/esm/string/{escapeRegexp.mjs.map → escapeRegexp.js.map} +1 -1
- package/lib/esm/string/pad2.d.ts +6 -0
- package/lib/esm/string/pad2.d.ts.map +10 -0
- package/lib/esm/string/{pad2.mjs → pad2.js} +1 -1
- package/lib/esm/string/{pad2.mjs.map → pad2.js.map} +1 -1
- package/lib/esm/string/sizeString.d.ts +13 -0
- package/lib/esm/string/sizeString.d.ts.map +10 -0
- package/lib/esm/string/{sizeString.mjs → sizeString.js} +1 -1
- package/lib/esm/string/{sizeString.mjs.map → sizeString.js.map} +1 -1
- package/lib/esm/typingHelper/deep.partial.d.ts +10 -0
- package/lib/esm/typingHelper/deep.partial.d.ts.map +10 -0
- package/lib/esm/typingHelper/deep.partial.js +2 -0
- package/lib/esm/typingHelper/{deep.partial.mjs.map → deep.partial.js.map} +1 -1
- package/lib/esm/typingHelper/deep.readonly.d.ts +10 -0
- package/lib/esm/typingHelper/deep.readonly.d.ts.map +10 -0
- package/lib/esm/typingHelper/deep.readonly.js +2 -0
- package/lib/esm/typingHelper/{deep.readonly.mjs.map → deep.readonly.js.map} +1 -1
- package/lib/esm/typingHelper/deep.required.d.ts +10 -0
- package/lib/esm/typingHelper/deep.required.d.ts.map +10 -0
- package/lib/esm/typingHelper/deep.required.js +2 -0
- package/lib/esm/typingHelper/{deep.required.mjs.map → deep.required.js.map} +1 -1
- package/lib/esm/typingHelper/deep.writable.d.ts +10 -0
- package/lib/esm/typingHelper/deep.writable.d.ts.map +10 -0
- package/lib/esm/typingHelper/deep.writable.js +2 -0
- package/lib/esm/typingHelper/{deep.writable.mjs.map → deep.writable.js.map} +1 -1
- package/lib/esm/typingHelper/literal.d.ts +2 -0
- package/lib/esm/typingHelper/literal.d.ts.map +10 -0
- package/lib/esm/typingHelper/literal.js +2 -0
- package/lib/esm/typingHelper/{literal.mjs.map → literal.js.map} +1 -1
- package/package.json +9 -8
- package/src/path/pathArray.ts +14 -0
- package/src/tsconfig.json +3 -5
- package/heft-plugin.json +0 -9
- package/lib/cjs/__create_index.generated.d.cts +0 -1229
- package/lib/esm/__create_index.generated.d.mts +0 -1229
- package/lib/esm/__create_index.generated.mjs +0 -239
- package/lib/esm/__create_index.generated.mjs.map +0 -10
- package/lib/esm/misc/package.json.mjs +0 -2
- package/lib/esm/path/pathArray.mjs.map +0 -10
- package/lib/esm/typingHelper/deep.partial.mjs +0 -2
- package/lib/esm/typingHelper/deep.readonly.mjs +0 -2
- package/lib/esm/typingHelper/deep.required.mjs +0 -2
- package/lib/esm/typingHelper/deep.writable.mjs +0 -2
- package/lib/esm/typingHelper/literal.mjs +0 -2
|
@@ -1,1229 +0,0 @@
|
|
|
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
|
-
export declare function analyzePath(p: string): IPathInfo;
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Compare two array, returns the difference from `before` to `after`
|
|
9
|
-
* @public
|
|
10
|
-
*/
|
|
11
|
-
export declare function arrayDiff<T>(_before: readonly T[], after: readonly T[]): {
|
|
12
|
-
add: T[];
|
|
13
|
-
del: T[];
|
|
14
|
-
same: T[];
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Returns a new array without duplicate values
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
export declare function arrayUnique<T>(arr: readonly T[]): T[];
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Removes duplicate values from an array
|
|
25
|
-
* @public
|
|
26
|
-
*/
|
|
27
|
-
export declare function arrayUniqueReference(arr: any[]): void;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Assert function must have oneof displayName/name property
|
|
31
|
-
*/
|
|
32
|
-
export declare function assertFunctionHasName(func: MaybeNamedFunction): void;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* assert value is not null or undefined or NaN
|
|
36
|
-
* @public
|
|
37
|
-
*/
|
|
38
|
-
export declare function assertNotNull<T>(val: T | null | undefined): T;
|
|
39
|
-
|
|
40
|
-
export declare function assertSerializable(value: any): void;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* like CallbackList, but async
|
|
44
|
-
*/
|
|
45
|
-
export declare class AsyncCallbackList<Argument extends unknown[]> {
|
|
46
|
-
protected list: MyAsyncCallback<Argument>[];
|
|
47
|
-
protected running: boolean;
|
|
48
|
-
constructor();
|
|
49
|
-
count(): number;
|
|
50
|
-
reset(): void;
|
|
51
|
-
/**
|
|
52
|
-
* @param name optional name of `item` (will assign displayName to `item`)
|
|
53
|
-
* @returns function list length
|
|
54
|
-
*/
|
|
55
|
-
add(item: MyAsyncCallback<Argument>, name?: string): number;
|
|
56
|
-
/**
|
|
57
|
-
* @returns if removed: return `item`; if did not exists: return null
|
|
58
|
-
*/
|
|
59
|
-
remove(item: MyAsyncCallback<Argument>): null | MyAsyncCallback<Argument>;
|
|
60
|
-
/**
|
|
61
|
-
* Stop run if one callback return `true`
|
|
62
|
-
* @returns {boolean} true if one callback return true
|
|
63
|
-
*/
|
|
64
|
-
run(...argument: Argument): Promise<boolean>;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Async version of Disposable
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
71
|
-
declare class AsyncDisposable_2 implements IAsyncDisposable, IDisposableEvents {
|
|
72
|
-
private readonly _disposables;
|
|
73
|
-
protected readonly _onDisposeError: Emitter<Error>;
|
|
74
|
-
readonly onDisposeError: EventRegister<Error>;
|
|
75
|
-
protected readonly _onBeforeDispose: Emitter<void>;
|
|
76
|
-
readonly onBeforeDispose: EventRegister<void>;
|
|
77
|
-
private _disposed?;
|
|
78
|
-
get hasDisposed(): boolean;
|
|
79
|
-
/**
|
|
80
|
-
* @throws if already disposed
|
|
81
|
-
*/
|
|
82
|
-
assertNotDisposed(): void;
|
|
83
|
-
/**
|
|
84
|
-
* register a disposable object
|
|
85
|
-
*/
|
|
86
|
-
_register<T extends IAsyncDisposable>(d: T): T;
|
|
87
|
-
_register<T extends IAsyncDisposable & IDisposableEvents>(d: T, autoDereference?: boolean): T;
|
|
88
|
-
_unregister(d: IAsyncDisposable): boolean;
|
|
89
|
-
dispose(): Promise<void>;
|
|
90
|
-
}
|
|
91
|
-
export { AsyncDisposable_2 as AsyncDisposable }
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Convert Iterator into Promise, resolve with the last value from Iterator
|
|
95
|
-
*/
|
|
96
|
-
export declare function awaitIterator<T>(generator: Iterator<T>): Promise<T>;
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Auto bind `this` to class method
|
|
100
|
-
*/
|
|
101
|
-
export declare const bindThis: MethodDecorator;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* Manage a list of callback
|
|
105
|
-
*/
|
|
106
|
-
export declare class CallbackList<Argument extends unknown[]> {
|
|
107
|
-
protected list: MyCallback<Argument>[];
|
|
108
|
-
protected running: boolean;
|
|
109
|
-
protected stop: boolean;
|
|
110
|
-
constructor();
|
|
111
|
-
count(): number;
|
|
112
|
-
/**
|
|
113
|
-
* remove all callback
|
|
114
|
-
*/
|
|
115
|
-
reset(): void;
|
|
116
|
-
/**
|
|
117
|
-
* @param name optional name of `item` (will assign displayName to `item`)
|
|
118
|
-
* @returns function list length
|
|
119
|
-
*/
|
|
120
|
-
add(item: MyCallback<Argument>, name?: string): number;
|
|
121
|
-
/**
|
|
122
|
-
* @returns if removed: return `item`; if did not exists: return null
|
|
123
|
-
*/
|
|
124
|
-
remove(item: MyCallback<Argument>): null | MyCallback<Argument>;
|
|
125
|
-
/**
|
|
126
|
-
* in a callback, call this.stopRun() to stop remain callbacks (not by return false)
|
|
127
|
-
* @returns {boolean} true if every callback called, false if stop in middle
|
|
128
|
-
*/
|
|
129
|
-
run(...argument: Argument): boolean;
|
|
130
|
-
stopRun(): void;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
/** @public */
|
|
134
|
-
export declare function camelCase(str: string): string;
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
* Error when cancel() is called
|
|
138
|
-
* @public
|
|
139
|
-
*/
|
|
140
|
-
export declare class CanceledError extends Error {
|
|
141
|
-
constructor();
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/** @public */
|
|
145
|
-
export declare interface CancellationToken {
|
|
146
|
-
readonly isCancellationRequested: boolean;
|
|
147
|
-
onCancellationRequested(callback: EventHandler<void>): IDisposable;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/** @public */
|
|
151
|
-
export declare class CancellationTokenSource extends DisposableOnce implements IDisposable {
|
|
152
|
-
private readonly driver;
|
|
153
|
-
readonly token: CancellationToken;
|
|
154
|
-
constructor();
|
|
155
|
-
cancel(): void;
|
|
156
|
-
_dispose(): void;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export declare enum ColorKind {
|
|
160
|
-
DISABLE = 0,
|
|
161
|
-
TERMINAL = 1,
|
|
162
|
-
WEB = 2,
|
|
163
|
-
DETECT = 3
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export declare function concatStringType<T0 extends string>(t0: T0): `${T0}`;
|
|
167
|
-
|
|
168
|
-
export declare function concatStringType<T0 extends string, T1 extends string>(t0: T0, t1: T1): `${T0}${T1}`;
|
|
169
|
-
|
|
170
|
-
export declare function concatStringType<T0 extends string, T1 extends string, T2 extends string>(t0: T0, t1: T1, t2: T2): `${T0}${T1}${T2}`;
|
|
171
|
-
|
|
172
|
-
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}`;
|
|
173
|
-
|
|
174
|
-
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}`;
|
|
175
|
-
|
|
176
|
-
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}`;
|
|
177
|
-
|
|
178
|
-
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}`;
|
|
179
|
-
|
|
180
|
-
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}`;
|
|
181
|
-
|
|
182
|
-
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}`;
|
|
183
|
-
|
|
184
|
-
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}`;
|
|
185
|
-
|
|
186
|
-
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}`;
|
|
187
|
-
|
|
188
|
-
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}`;
|
|
189
|
-
|
|
190
|
-
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}`;
|
|
191
|
-
|
|
192
|
-
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}`;
|
|
193
|
-
|
|
194
|
-
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}`;
|
|
195
|
-
|
|
196
|
-
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}`;
|
|
197
|
-
|
|
198
|
-
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}`;
|
|
199
|
-
|
|
200
|
-
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}`;
|
|
201
|
-
|
|
202
|
-
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}`;
|
|
203
|
-
|
|
204
|
-
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}`;
|
|
205
|
-
|
|
206
|
-
export declare function convertCatchedError(e: unknown): Error;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Get a symbol singleton, if not exists, create it
|
|
210
|
-
*
|
|
211
|
-
* this is very like Symbol.for, but not real global symbol
|
|
212
|
-
* @public
|
|
213
|
-
*/
|
|
214
|
-
export declare function createSymbol(category: string, name: string): symbol;
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Like a Set, but use custom compare function insteadof ===
|
|
218
|
-
*/
|
|
219
|
-
export declare class CustomSet<Type = string> {
|
|
220
|
-
protected registry: Type[];
|
|
221
|
-
private finder;
|
|
222
|
-
constructor(finder?: Finder<Type>);
|
|
223
|
-
setFinder(finder: Finder<Type>): void;
|
|
224
|
-
has(item: Type): boolean;
|
|
225
|
-
add(item: Type): boolean;
|
|
226
|
-
/**
|
|
227
|
-
* @returns all added values
|
|
228
|
-
*/
|
|
229
|
-
addAll(items: Type[]): Type[];
|
|
230
|
-
delete(item: Type): boolean;
|
|
231
|
-
/**
|
|
232
|
-
* @returns all deleted values
|
|
233
|
-
*/
|
|
234
|
-
deleteAll(items: Type[]): Type[];
|
|
235
|
-
clear(): void;
|
|
236
|
-
get length(): number;
|
|
237
|
-
get size(): number;
|
|
238
|
-
[Symbol.iterator](): Iterator<Type>;
|
|
239
|
-
keys(): Iterator<Type>;
|
|
240
|
-
values(): Iterator<Type>;
|
|
241
|
-
toArray(): Type[];
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
export declare type DeepNonNullable<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> | Array<infer U> ? DeepNonNullableArray<U> : T extends ReadonlyMap<infer K, infer V> | Map<infer K, infer V> ? DeepNonNullableMap<K, V> : T extends ReadonlySet<infer M> ? DeepNonNullableSet<M> : DeepNonNullableObject<T>;
|
|
245
|
-
|
|
246
|
-
declare type DeepNonNullableArray<T> = Array<DeepNonNullable<T>>;
|
|
247
|
-
|
|
248
|
-
declare type DeepNonNullableMap<K, V> = Map<DeepNonNullable<K>, DeepNonNullable<V>>;
|
|
249
|
-
|
|
250
|
-
declare type DeepNonNullableObject<T> = {
|
|
251
|
-
[K in keyof T]-?: NonNullable<T[K]>;
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
declare type DeepNonNullableSet<T> = Set<DeepNonNullable<T>>;
|
|
255
|
-
|
|
256
|
-
export declare type DeepPartial<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> ? DeepPartialArray<U> : T extends ReadonlyMap<infer K, infer V> ? DeepPartialMap<K, V> : T extends ReadonlySet<infer M> ? DeepPartialSet<M> : DeepPartialObject<T>;
|
|
257
|
-
|
|
258
|
-
declare type DeepPartialArray<T> = Array<DeepPartial<T>>;
|
|
259
|
-
|
|
260
|
-
declare type DeepPartialMap<K, V> = Map<DeepPartial<K>, DeepPartial<V>>;
|
|
261
|
-
|
|
262
|
-
declare type DeepPartialObject<T> = {
|
|
263
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
declare type DeepPartialSet<T> = Set<DeepPartial<T>>;
|
|
267
|
-
|
|
268
|
-
export declare type DeepReadonly<T> = T extends Primitive ? T : T extends Array<infer U> ? DeepReadonlyArray<U> : T extends Map<infer K, infer V> ? DeepReadonlyMap<K, V> : T extends Set<infer M> ? DeepReadonlySet<M> : DeepReadonlyObject<T>;
|
|
269
|
-
|
|
270
|
-
declare type DeepReadonlyArray<T> = ReadonlyArray<DeepReadonly<T>>;
|
|
271
|
-
|
|
272
|
-
declare type DeepReadonlyMap<K, V> = ReadonlyMap<DeepReadonly<K>, DeepReadonly<V>>;
|
|
273
|
-
|
|
274
|
-
declare type DeepReadonlyObject<T> = {
|
|
275
|
-
readonly [K in keyof T]: DeepReadonly<T[K]>;
|
|
276
|
-
};
|
|
277
|
-
|
|
278
|
-
declare type DeepReadonlySet<T> = ReadonlySet<DeepReadonly<T>>;
|
|
279
|
-
|
|
280
|
-
export declare type DeepWriteable<T> = T extends Primitive ? T : T extends ReadonlyArray<infer U> ? DeepWriteableArray<U> : T extends ReadonlyMap<infer K, infer V> ? DeepWriteableMap<K, V> : T extends ReadonlySet<infer M> ? DeepWriteableSet<M> : DeepWriteableObject<T>;
|
|
281
|
-
|
|
282
|
-
declare type DeepWriteableArray<T> = Array<DeepWriteable<T>>;
|
|
283
|
-
|
|
284
|
-
declare type DeepWriteableMap<K, V> = Map<DeepWriteable<K>, DeepWriteable<V>>;
|
|
285
|
-
|
|
286
|
-
declare type DeepWriteableObject<T> = {
|
|
287
|
-
-readonly [K in keyof T]: DeepWriteable<T[K]>;
|
|
288
|
-
};
|
|
289
|
-
|
|
290
|
-
declare type DeepWriteableSet<T> = Set<DeepWriteable<T>>;
|
|
291
|
-
|
|
292
|
-
/**
|
|
293
|
-
* a promise can resolve or reject later
|
|
294
|
-
* @public
|
|
295
|
-
*/
|
|
296
|
-
export declare class DeferredPromise<T, PT = any> {
|
|
297
|
-
readonly p: Promise<T> & IProgressHolder<T, PT>;
|
|
298
|
-
private _completeCallback;
|
|
299
|
-
private _errorCallback;
|
|
300
|
-
private _state;
|
|
301
|
-
private _progressList?;
|
|
302
|
-
constructor();
|
|
303
|
-
notify(progress: PT): this;
|
|
304
|
-
progress(fn: ProgressCallback<PT>): void;
|
|
305
|
-
get completed(): boolean;
|
|
306
|
-
get resolved(): boolean;
|
|
307
|
-
get rejected(): boolean;
|
|
308
|
-
/**
|
|
309
|
-
* resolve the promise
|
|
310
|
-
*/
|
|
311
|
-
complete(value: T): void;
|
|
312
|
-
/**
|
|
313
|
-
* reject the promise
|
|
314
|
-
*/
|
|
315
|
-
error(err: any): void;
|
|
316
|
-
/**
|
|
317
|
-
* reject the promise with CancelError
|
|
318
|
-
*/
|
|
319
|
-
cancel(): void;
|
|
320
|
-
/**
|
|
321
|
-
* Convert promise into deferred
|
|
322
|
-
* returns a DeferredPromise, resolve when prev resolve, reject when prev reject
|
|
323
|
-
*/
|
|
324
|
-
static wrap(prev: Promise<any>): DeferredPromise<unknown, any>;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
export declare function definePublicConstant(object: any, propertyKey: string | symbol, value: any): void;
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* remember arguments after run
|
|
331
|
-
* run all later added function with memorized argument
|
|
332
|
-
*/
|
|
333
|
-
export declare class DelayCallbackList<Argument extends unknown[]> {
|
|
334
|
-
private delayArgument?;
|
|
335
|
-
private delayComplete;
|
|
336
|
-
protected list?: MyDelayCallback<Argument>[];
|
|
337
|
-
count(): number;
|
|
338
|
-
add(item: MyDelayCallback<Argument>, name?: string): void;
|
|
339
|
-
run(argument: Argument): void;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Delete a symbol from window/global object
|
|
344
|
-
* @public
|
|
345
|
-
*/
|
|
346
|
-
export declare function deleteSymbol(category: string, name: string): void;
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* Standalone disposable class, can use as instance or base class.
|
|
350
|
-
*/
|
|
351
|
-
declare class Disposable_2 implements IDisposable, IDisposableEvents {
|
|
352
|
-
private readonly _disposables;
|
|
353
|
-
protected readonly _onDisposeError: Emitter<Error>;
|
|
354
|
-
readonly onDisposeError: EventRegister<Error>;
|
|
355
|
-
protected readonly _onBeforeDispose: Emitter<void>;
|
|
356
|
-
readonly onBeforeDispose: EventRegister<void>;
|
|
357
|
-
private _disposed?;
|
|
358
|
-
get hasDisposed(): boolean;
|
|
359
|
-
/**
|
|
360
|
-
* @throws if already disposed
|
|
361
|
-
*/
|
|
362
|
-
assertNotDisposed(): void;
|
|
363
|
-
/**
|
|
364
|
-
* register a disposable object
|
|
365
|
-
*/
|
|
366
|
-
_register<T extends IDisposable>(d: T): T;
|
|
367
|
-
_register<T extends IDisposable & IDisposableEvents>(d: T, autoDereference?: boolean): T;
|
|
368
|
-
_unregister(d: IDisposable): boolean;
|
|
369
|
-
dispose(): void;
|
|
370
|
-
}
|
|
371
|
-
export { Disposable_2 as Disposable }
|
|
372
|
-
|
|
373
|
-
export declare abstract class DisposableOnce implements IDisposable {
|
|
374
|
-
private _disposed?;
|
|
375
|
-
get hasDisposed(): boolean;
|
|
376
|
-
dispose(): void;
|
|
377
|
-
protected abstract _dispose(): void;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
/**
|
|
381
|
-
* Error when call dispose() twice
|
|
382
|
-
*/
|
|
383
|
-
export declare class DisposedError extends Error {
|
|
384
|
-
readonly previous: Error;
|
|
385
|
-
readonly inspectString: string;
|
|
386
|
-
constructor(object: any, previous: Error);
|
|
387
|
-
tryCreateConsoleWarning(): Promise<void>;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Dispose the global disposable store
|
|
392
|
-
* this function must be manually called by user, when registerGlobalLifecycle is used
|
|
393
|
-
*
|
|
394
|
-
* @throws when call twice
|
|
395
|
-
*/
|
|
396
|
-
export declare function disposeGlobal(): Promise<void>;
|
|
397
|
-
|
|
398
|
-
/**
|
|
399
|
-
* 事件注册对象
|
|
400
|
-
* @public
|
|
401
|
-
*/
|
|
402
|
-
export declare class Emitter<T> implements IDisposable {
|
|
403
|
-
protected readonly _callbacks: EventHandler<T>[];
|
|
404
|
-
constructor();
|
|
405
|
-
/**
|
|
406
|
-
* @returns 当前注册回调数量
|
|
407
|
-
*/
|
|
408
|
-
listenerCount(): number;
|
|
409
|
-
/**
|
|
410
|
-
* 触发本事件
|
|
411
|
-
* @param data 回调数据
|
|
412
|
-
*/
|
|
413
|
-
fire(data: T): void;
|
|
414
|
-
/**
|
|
415
|
-
* 与 `fire()`相同,但是忽略任何错误,并且即便出错也继续执行全部callback
|
|
416
|
-
*/
|
|
417
|
-
fireNoError(data: T): void;
|
|
418
|
-
/**
|
|
419
|
-
* 获取handle()方法的引用
|
|
420
|
-
*/
|
|
421
|
-
get register(): EventRegister<T>;
|
|
422
|
-
/**
|
|
423
|
-
* 注册本事件的新回调
|
|
424
|
-
* @param callback 回调函数
|
|
425
|
-
*/
|
|
426
|
-
handle(callback: EventHandler<T>): IDisposable;
|
|
427
|
-
dispose(): void;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Same as disposeGlobal, but do not throw by duplicate call
|
|
432
|
-
*/
|
|
433
|
-
export declare function ensureDisposeGlobal(): Promise<void>;
|
|
434
|
-
|
|
435
|
-
export declare function ensureGlobalObject<T>(symbol: string, constructor: () => T): T;
|
|
436
|
-
|
|
437
|
-
declare interface ErrorOptions_2 {
|
|
438
|
-
cause?: unknown;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
/** @public */
|
|
442
|
-
export declare function escapeRegExp(str: string): string;
|
|
443
|
-
|
|
444
|
-
export declare interface EventHandler<T> {
|
|
445
|
-
(data: T): void;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
export declare interface EventRegister<T> {
|
|
449
|
-
(callback: EventHandler<T>): IDisposable;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* A map, will throw error when try to get not exists key
|
|
454
|
-
*/
|
|
455
|
-
export declare class ExtendMap<K, V> extends Map<K, V> {
|
|
456
|
-
/**
|
|
457
|
-
* Get value from map, if not exists, throw an error
|
|
458
|
-
*/
|
|
459
|
-
get(id: K): V;
|
|
460
|
-
/**
|
|
461
|
-
* Get value from map, if not exists, return def instead (not insert it into map)
|
|
462
|
-
*/
|
|
463
|
-
get(id: K, def: V): V;
|
|
464
|
-
/**
|
|
465
|
-
* Get a value, if not exists, call init() and set to map
|
|
466
|
-
*/
|
|
467
|
-
entry(id: K, init: (id: K) => V): V;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
/** Find the index of given item */
|
|
471
|
-
export declare interface Finder<Type> {
|
|
472
|
-
(this: Type[], item: Type): number;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/**
|
|
476
|
-
* @deprecated Use Promise.allSettled instead
|
|
477
|
-
*/
|
|
478
|
-
export declare function finishAllPromise<T>(ps: Promise<T>[]): Promise<PromiseResultArray<T>>;
|
|
479
|
-
|
|
480
|
-
/**
|
|
481
|
-
* Takes ms
|
|
482
|
-
*/
|
|
483
|
-
export declare function fromTimeStamp(timestamp: number): Date;
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* Get displayName/name of a function
|
|
487
|
-
*/
|
|
488
|
-
export declare function functionName(func: Function): string;
|
|
489
|
-
|
|
490
|
-
/**
|
|
491
|
-
* Get nth line of Error.stack
|
|
492
|
-
* @returns {string} if frame greater than max, return ''
|
|
493
|
-
*/
|
|
494
|
-
export declare function getErrorFrame(e: Error, frame: number): string;
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* Returns ms
|
|
498
|
-
*/
|
|
499
|
-
export declare function getTimeStamp(date: Date): number;
|
|
500
|
-
|
|
501
|
-
export declare function getTypeOf(value: any): "string" | "number" | "bigint" | "boolean" | "symbol" | "undefined" | "function" | "null" | "Promise" | "Error" | "DOM" | "EventTarget" | "datetime" | "regexp" | "unknown";
|
|
502
|
-
|
|
503
|
-
/**
|
|
504
|
-
* globalThis when supported.
|
|
505
|
-
* if not, window in browser, global in nodejs
|
|
506
|
-
* @public
|
|
507
|
-
*/
|
|
508
|
-
export declare const globalObject: any;
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* Same with globalSingletonStrong, but save instance in a WeakMap, so it maybe delete by gc if no reference
|
|
512
|
-
* @public
|
|
513
|
-
*/
|
|
514
|
-
export declare function globalSingleton<T>(symbol: symbol | string, constructor: () => T): T;
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* Same with globalSingletonStrong, but save instance in a WeakMap, so it maybe delete by gc if no reference
|
|
518
|
-
* @public
|
|
519
|
-
*/
|
|
520
|
-
export declare function globalSingleton<T>(symbol: symbol | string): T | undefined;
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
* Delete a key from window/global space
|
|
524
|
-
* use with care
|
|
525
|
-
* @public
|
|
526
|
-
*/
|
|
527
|
-
export declare function globalSingletonDelete(symbol: symbol | string): void;
|
|
528
|
-
|
|
529
|
-
/**
|
|
530
|
-
* Get an singleton instance from window/global space
|
|
531
|
-
* if symbol did not exists, create it and assign to window/global
|
|
532
|
-
* @public
|
|
533
|
-
*/
|
|
534
|
-
export declare function globalSingletonStrong<T>(symbol: symbol | string, constructor: () => T): T;
|
|
535
|
-
|
|
536
|
-
/**
|
|
537
|
-
* Get an singleton instance from window/global space
|
|
538
|
-
* @public
|
|
539
|
-
*/
|
|
540
|
-
export declare function globalSingletonStrong<T>(symbol: symbol | string): T | undefined;
|
|
541
|
-
|
|
542
|
-
export declare const hasGlobal: boolean;
|
|
543
|
-
|
|
544
|
-
export declare const hasProcess: boolean;
|
|
545
|
-
|
|
546
|
-
export declare const hasWindow: boolean;
|
|
547
|
-
|
|
548
|
-
export declare function hookClass<TC extends IConstructorOf<T>, T>(target: TC): IHooks<T, TC>;
|
|
549
|
-
|
|
550
|
-
export declare const hookClassSymbol: unique symbol;
|
|
551
|
-
|
|
552
|
-
export declare namespace humanDate {
|
|
553
|
-
/**
|
|
554
|
-
* Format: HH:mm:ss
|
|
555
|
-
*/
|
|
556
|
-
export function time(date: Date | string | number): string;
|
|
557
|
-
/**
|
|
558
|
-
* Format: YYYY-MM-dd
|
|
559
|
-
*
|
|
560
|
-
* separator can change
|
|
561
|
-
*/
|
|
562
|
-
export function date(date: Date | string | number, sp?: string): string;
|
|
563
|
-
/**
|
|
564
|
-
* Format: YYYY-MM-dd HH:mm:ss
|
|
565
|
-
*/
|
|
566
|
-
export function datetime(date: Date | string | number): string;
|
|
567
|
-
export interface ITimeFormatter {
|
|
568
|
-
(s: number): string;
|
|
569
|
-
}
|
|
570
|
-
export interface IFormatters {
|
|
571
|
-
s: ITimeFormatter;
|
|
572
|
-
m: ITimeFormatter;
|
|
573
|
-
h: ITimeFormatter;
|
|
574
|
-
d: ITimeFormatter;
|
|
575
|
-
}
|
|
576
|
-
/**
|
|
577
|
-
* set format for time delta
|
|
578
|
-
*/
|
|
579
|
-
export function setLocaleFormatter(formatter: Partial<IFormatters>): void;
|
|
580
|
-
/**
|
|
581
|
-
* format time delta (in ms) to string, like: '1d'
|
|
582
|
-
* when ms<=0, returns '0s'
|
|
583
|
-
*
|
|
584
|
-
* format can set by `setLocaleFormatter`
|
|
585
|
-
* day is the largest unit
|
|
586
|
-
*/
|
|
587
|
-
export function deltaTiny(ms: number): string;
|
|
588
|
-
/**
|
|
589
|
-
* format time delta (in ms) to string, like: '1d10m42s'
|
|
590
|
-
* when ms<=0, returns '0s'
|
|
591
|
-
*
|
|
592
|
-
* format can set by `setLocaleFormatter`
|
|
593
|
-
* day is the largest unit
|
|
594
|
-
*/
|
|
595
|
-
export function delta(ms: number): string;
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* Convert bytes to largest unit, with binary prefix unit (1024), eg: 211.293GiB
|
|
600
|
-
* @public
|
|
601
|
-
*/
|
|
602
|
-
export declare function humanSize(bytes: number, fixed?: number): string;
|
|
603
|
-
|
|
604
|
-
/**
|
|
605
|
-
* Convert bytes to largest unit, with SI prefix unit (1000), eg: 211.293GB
|
|
606
|
-
* @public
|
|
607
|
-
*/
|
|
608
|
-
export declare function humanSizeSI(bytes: number, fixed?: number): string;
|
|
609
|
-
|
|
610
|
-
/** @deprecated */
|
|
611
|
-
export declare function humanSpeed(bps: number): string;
|
|
612
|
-
|
|
613
|
-
/**
|
|
614
|
-
* @public
|
|
615
|
-
*/
|
|
616
|
-
export declare interface IArrayUpdate<T> {
|
|
617
|
-
add: T[];
|
|
618
|
-
del: T[];
|
|
619
|
-
same: T[];
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
/** @public */
|
|
623
|
-
export declare interface IAsyncDisposable {
|
|
624
|
-
dispose(): void | Promise<void>;
|
|
625
|
-
}
|
|
626
|
-
|
|
627
|
-
declare interface IConstructorOf<T> extends Object {
|
|
628
|
-
new (...args: any[]): T;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
/** @public */
|
|
632
|
-
export declare interface IDisposable {
|
|
633
|
-
dispose(): void;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
/**
|
|
637
|
-
* @private
|
|
638
|
-
*/
|
|
639
|
-
export declare interface IDisposableEvents {
|
|
640
|
-
onDisposeError: EventRegister<Error>;
|
|
641
|
-
onBeforeDispose: EventRegister<void>;
|
|
642
|
-
readonly hasDisposed: boolean;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
export declare interface IEventEmitterObject<T extends Function> {
|
|
646
|
-
addListener(type: string, handler: T): any;
|
|
647
|
-
removeListener(type: string, handler: T): any;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
export declare interface IEventHostObject<T extends Function> {
|
|
651
|
-
addEventListener(type: string, handler: T, options?: IEventListenerOptions): any;
|
|
652
|
-
removeEventListener(type: string, handler: T, options?: IEventListenerOptions): any;
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
export declare interface IEventListenerOptions {
|
|
656
|
-
capture?: boolean;
|
|
657
|
-
once?: boolean;
|
|
658
|
-
passive?: boolean;
|
|
659
|
-
}
|
|
660
|
-
|
|
661
|
-
export declare type IFsmRuleMap<StateType, EventType> = MapLike_2<StateType, MapLike_2<EventType, StateType>>;
|
|
662
|
-
|
|
663
|
-
declare interface IHooks<T, TC> {
|
|
664
|
-
afterConstruct?: ((obj: T) => void)[];
|
|
665
|
-
beforeConstruct?: ((obj: TC) => T | void)[];
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
/**
|
|
669
|
-
* Decorater version of `initOnRead`
|
|
670
|
-
* @see initOnRead
|
|
671
|
-
*/
|
|
672
|
-
export declare function init<O, T extends keyof O>(init: InitFunc<O, O[T]>): PropertyDecorator;
|
|
673
|
-
|
|
674
|
-
/** @public */
|
|
675
|
-
export declare interface InitFunc<O, T> {
|
|
676
|
-
(this: O): T;
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
/**
|
|
680
|
-
* Define property on target, call init it when first use, them memorize
|
|
681
|
-
* @public
|
|
682
|
-
*/
|
|
683
|
-
export declare function initOnRead<O, T extends keyof O>(target: any, propertyKey: T, init: InitFunc<O, O[T]>): void;
|
|
684
|
-
|
|
685
|
-
declare type IOverrides = Record<string, string | IOverridesObject>;
|
|
686
|
-
|
|
687
|
-
declare interface IOverridesObject {
|
|
688
|
-
[packageName: string]: IOverrides;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
export declare interface IPackageJson {
|
|
692
|
-
name: string;
|
|
693
|
-
version: string;
|
|
694
|
-
main: string;
|
|
695
|
-
module: string;
|
|
696
|
-
browser: string;
|
|
697
|
-
description: string;
|
|
698
|
-
keywords: string[];
|
|
699
|
-
homepage: string;
|
|
700
|
-
bugs: StructString<{
|
|
701
|
-
url: string;
|
|
702
|
-
email: string;
|
|
703
|
-
}>;
|
|
704
|
-
license: string;
|
|
705
|
-
author: Person;
|
|
706
|
-
contributors: Person[];
|
|
707
|
-
funding: MaybeArray<StringOr<{
|
|
708
|
-
type: string;
|
|
709
|
-
url: string;
|
|
710
|
-
}>>;
|
|
711
|
-
files: string[];
|
|
712
|
-
bin: StringOr<Record<string, string>>;
|
|
713
|
-
man: MaybeArray<string>;
|
|
714
|
-
directories: {
|
|
715
|
-
bin: string;
|
|
716
|
-
man: string;
|
|
717
|
-
[name: string]: string;
|
|
718
|
-
};
|
|
719
|
-
repository: StructString<{
|
|
720
|
-
type: string;
|
|
721
|
-
url: string;
|
|
722
|
-
directory: string;
|
|
723
|
-
}>;
|
|
724
|
-
scripts: Record<string, string>;
|
|
725
|
-
config: Record<string, any>;
|
|
726
|
-
overrides: IOverrides;
|
|
727
|
-
engines: Record<string, string>;
|
|
728
|
-
os: string[];
|
|
729
|
-
cpu: string[];
|
|
730
|
-
private: boolean;
|
|
731
|
-
publishConfig: Record<string, any>;
|
|
732
|
-
workspaces: string[];
|
|
733
|
-
exports: string | Record<string, string | Record<string, string>>;
|
|
734
|
-
dependencies: Record<string, string>;
|
|
735
|
-
devDependencies: Record<string, string>;
|
|
736
|
-
optionalDependencies: Record<string, string>;
|
|
737
|
-
bundleDependencies: string[];
|
|
738
|
-
peerDependencies: Record<string, string>;
|
|
739
|
-
peerDependenciesMeta: Record<string, {
|
|
740
|
-
optional: true;
|
|
741
|
-
[option: string]: any;
|
|
742
|
-
}>;
|
|
743
|
-
[field: string]: any;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
export declare interface IPathInfo {
|
|
747
|
-
kind: PathKind;
|
|
748
|
-
prefix?: string;
|
|
749
|
-
path: string;
|
|
750
|
-
url?: URL;
|
|
751
|
-
}
|
|
752
|
-
|
|
753
|
-
export declare interface IProgressHolder<T, PT> {
|
|
754
|
-
progress(fn: ProgressCallback<PT>): Promise<T> & IProgressHolder<T, PT>;
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
export declare const is32Bit: boolean;
|
|
758
|
-
|
|
759
|
-
export declare let is64Bit: boolean;
|
|
760
|
-
|
|
761
|
-
/**
|
|
762
|
-
* return true if a path is absolute:
|
|
763
|
-
* - /xxxx
|
|
764
|
-
* - \xxxx
|
|
765
|
-
* - c:/
|
|
766
|
-
* - c:\
|
|
767
|
-
* - http://
|
|
768
|
-
*/
|
|
769
|
-
export declare function isAbsolute(path: string): boolean;
|
|
770
|
-
|
|
771
|
-
/**
|
|
772
|
-
* is the two array EXACTLY same
|
|
773
|
-
* @public
|
|
774
|
-
*/
|
|
775
|
-
export declare function isArraySame<T>(a1: readonly T[], a2: readonly T[]): boolean;
|
|
776
|
-
|
|
777
|
-
/** @public */
|
|
778
|
-
export declare function isCanceledError(error: any): boolean;
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
* Check if a date is NaN
|
|
782
|
-
*/
|
|
783
|
-
export declare function isDateInvalid(date: Date): boolean;
|
|
784
|
-
|
|
785
|
-
export declare function isDisposedError(error: any): boolean;
|
|
786
|
-
|
|
787
|
-
export declare let isElectron: boolean;
|
|
788
|
-
|
|
789
|
-
export declare let isElectronMain: boolean;
|
|
790
|
-
|
|
791
|
-
export declare let isElectronRenderer: boolean;
|
|
792
|
-
|
|
793
|
-
export declare let isElectronSandbox: boolean;
|
|
794
|
-
|
|
795
|
-
export declare let isLinux: boolean;
|
|
796
|
-
|
|
797
|
-
export declare let isMacintosh: boolean;
|
|
798
|
-
|
|
799
|
-
export declare let isNative: boolean;
|
|
800
|
-
|
|
801
|
-
/**
|
|
802
|
-
* Should ensure a and b is none-null before call this
|
|
803
|
-
* @returns true when a and b has EXACTLY same keys and values
|
|
804
|
-
*/
|
|
805
|
-
export declare function isObjectSame(a: any, b: any): boolean;
|
|
806
|
-
|
|
807
|
-
/**
|
|
808
|
-
* Should ensure a and b is none-null before call this
|
|
809
|
-
* @returns true when a and b has EXACTLY same keys and values, recursive compare all object values
|
|
810
|
-
*/
|
|
811
|
-
export declare function isObjectSameRecursive(a: any, b: any): boolean;
|
|
812
|
-
|
|
813
|
-
export declare function isScalar(value: any): value is ScalarTypes;
|
|
814
|
-
|
|
815
|
-
export declare function isSerializable(value: any): SerializableKind;
|
|
816
|
-
|
|
817
|
-
export declare interface IStateChangeEvent<StateType, EventType> {
|
|
818
|
-
from: StateType;
|
|
819
|
-
to: StateType;
|
|
820
|
-
reason: EventType;
|
|
821
|
-
}
|
|
822
|
-
|
|
823
|
-
/** @public */
|
|
824
|
-
export declare function isTimeoutError(error: Error): error is TimeoutError;
|
|
825
|
-
|
|
826
|
-
export declare let isWeb: boolean;
|
|
827
|
-
|
|
828
|
-
export declare let isWindows: boolean;
|
|
829
|
-
|
|
830
|
-
export declare interface IUniqueIdFactory<T> {
|
|
831
|
-
(item: T): string;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
export declare const KnownError: typeof KnownErrorNode;
|
|
835
|
-
|
|
836
|
-
declare abstract class KnownErrorAbstract extends Error {
|
|
837
|
-
protected static debugMode: boolean;
|
|
838
|
-
static debug(enabled?: boolean): void;
|
|
839
|
-
static is(e: any): e is KnownErrorAbstract;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
declare class KnownErrorNode extends KnownErrorAbstract {
|
|
843
|
-
constructor(message: string, consopt?: ErrorOptions_2);
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
/**
|
|
847
|
-
* lowercase first char
|
|
848
|
-
* @public
|
|
849
|
-
*/
|
|
850
|
-
export declare function lcfirst<T extends string>(str: T): Uncapitalize<T>;
|
|
851
|
-
|
|
852
|
-
/** @public */
|
|
853
|
-
export declare function linux_case(str: string): string;
|
|
854
|
-
|
|
855
|
-
/** @public */
|
|
856
|
-
export declare function linux_case_hyphen(str: string): string;
|
|
857
|
-
|
|
858
|
-
export declare interface MapLike<V> {
|
|
859
|
-
[id: string]: V;
|
|
860
|
-
}
|
|
861
|
-
|
|
862
|
-
declare type MapLike_2<K, V> = Pick<Map<K, V>, 'get' | 'has' | 'keys'>;
|
|
863
|
-
|
|
864
|
-
declare type MaybeArray<T> = T | T[];
|
|
865
|
-
|
|
866
|
-
export declare interface MaybeNamedFunction extends Function {
|
|
867
|
-
displayName?: string;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
/**
|
|
871
|
-
* Decorate class method/getter
|
|
872
|
-
*
|
|
873
|
-
* remember first return value of method/getter, directlly return memorized value when call it again
|
|
874
|
-
*/
|
|
875
|
-
export declare const memo: MethodDecorator;
|
|
876
|
-
|
|
877
|
-
/**
|
|
878
|
-
* 会记住上次fire的内容,并在每个新的handler注册时立即调用一次的Emitter
|
|
879
|
-
* 显然,这会对fire的内容保留一个引用,可以调用forget()取消
|
|
880
|
-
* @public
|
|
881
|
-
*/
|
|
882
|
-
export declare class MemorizedEmitter<T> extends Emitter<T> {
|
|
883
|
-
private _memo?;
|
|
884
|
-
private _is_memo;
|
|
885
|
-
fire(data: T): void;
|
|
886
|
-
fireNoError(data: T): void;
|
|
887
|
-
handle(callback: EventHandler<T>): IDisposable;
|
|
888
|
-
forget(): void;
|
|
889
|
-
dispose(): void;
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
export declare const memorizeValueSymbol: unique symbol;
|
|
893
|
-
|
|
894
|
-
export declare interface MyAsyncCallback<Argument extends unknown[]> {
|
|
895
|
-
displayName?: string;
|
|
896
|
-
(...param: Argument): Promise<void | undefined | boolean> | void | undefined | boolean;
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
export declare interface MyCallback<Argument extends unknown[]> {
|
|
900
|
-
displayName?: string;
|
|
901
|
-
(...param: Argument): any;
|
|
902
|
-
}
|
|
903
|
-
|
|
904
|
-
export declare interface MyDelayCallback<Argument extends unknown[]> {
|
|
905
|
-
displayName?: string;
|
|
906
|
-
(...param: Argument): void;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
/**
|
|
910
|
-
* Function with displayName
|
|
911
|
-
*/
|
|
912
|
-
export declare interface NamedFunction extends Function {
|
|
913
|
-
displayName: string;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
/**
|
|
917
|
-
* Set displayName of a function
|
|
918
|
-
*/
|
|
919
|
-
export declare function nameFunction<T extends Function>(name: string, func: T): T & NamedFunction;
|
|
920
|
-
|
|
921
|
-
export declare function nextDay(d: Date, n?: number): Date;
|
|
922
|
-
|
|
923
|
-
export declare function nextHour(d: Date, n?: number): Date;
|
|
924
|
-
|
|
925
|
-
export declare function nextMinute(d: Date, n?: number): Date;
|
|
926
|
-
|
|
927
|
-
export declare function nextMonth(d: Date, n?: number): Date;
|
|
928
|
-
|
|
929
|
-
export declare function nextSecond(d: Date, n?: number): Date;
|
|
930
|
-
|
|
931
|
-
export declare function nextWeek(d: Date, n?: number): Date;
|
|
932
|
-
|
|
933
|
-
export declare function nextYear(d: Date, n?: number): Date;
|
|
934
|
-
|
|
935
|
-
/**
|
|
936
|
-
* ensure a value is an array
|
|
937
|
-
* @public
|
|
938
|
-
*/
|
|
939
|
-
export declare function normalizeArray<T>(input: T | T[]): T[];
|
|
940
|
-
|
|
941
|
-
/**
|
|
942
|
-
* replace // to /
|
|
943
|
-
* replace \ to /
|
|
944
|
-
* remove ending /
|
|
945
|
-
*/
|
|
946
|
-
export declare function normalizePath(p: string): string;
|
|
947
|
-
|
|
948
|
-
/**
|
|
949
|
-
* Get deep child property of an object
|
|
950
|
-
* @param path object path seprate by "."
|
|
951
|
-
*/
|
|
952
|
-
export declare function objectPath(obj: object, path: string): any;
|
|
953
|
-
|
|
954
|
-
export declare const oneDay = 86400000;
|
|
955
|
-
|
|
956
|
-
export declare const oneHour = 1440000;
|
|
957
|
-
|
|
958
|
-
export declare const oneMinute = 60000;
|
|
959
|
-
|
|
960
|
-
export declare const oneSecond = 1000;
|
|
961
|
-
|
|
962
|
-
export declare const oneWeek = 604800000;
|
|
963
|
-
|
|
964
|
-
/**
|
|
965
|
-
* Pad number to two digits string, used in time format
|
|
966
|
-
* @public
|
|
967
|
-
*/
|
|
968
|
-
export declare function pad2(s: number): string;
|
|
969
|
-
|
|
970
|
-
export declare class PathArray extends TypePathArrayAbstract {
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
/**
|
|
974
|
-
* Work on "PATH"-like values, but always use / insteadof \
|
|
975
|
-
*/
|
|
976
|
-
declare abstract class PathArrayAbstract extends Set<string> {
|
|
977
|
-
private readonly sep;
|
|
978
|
-
constructor(init: string, sep?: ':' | ';');
|
|
979
|
-
abstract normalize(path: string): string;
|
|
980
|
-
split(pathArrStr: string): string[];
|
|
981
|
-
toString(): string;
|
|
982
|
-
/**
|
|
983
|
-
* @returns an array with `part` append to every element
|
|
984
|
-
*/
|
|
985
|
-
join(part: string): string[];
|
|
986
|
-
}
|
|
987
|
-
|
|
988
|
-
export declare class PathArrayPosix extends PathArrayAbstract {
|
|
989
|
-
normalize(path: string): string;
|
|
990
|
-
add(paths: string): this;
|
|
991
|
-
delete(paths: string): boolean;
|
|
992
|
-
has(path: string): boolean;
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
export declare class PathArrayWindows extends PathArrayAbstract {
|
|
996
|
-
private readonly caseMap;
|
|
997
|
-
normalize(path: string): string;
|
|
998
|
-
clear(): void;
|
|
999
|
-
add(paths: string): this;
|
|
1000
|
-
delete(paths: string): boolean;
|
|
1001
|
-
has(path: string): boolean;
|
|
1002
|
-
values(): IterableIterator<string>;
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
export declare enum PathKind {
|
|
1006
|
-
url = 0,
|
|
1007
|
-
unc = 1,
|
|
1008
|
-
win = 2,
|
|
1009
|
-
cifs = 3,
|
|
1010
|
-
unix = 4,
|
|
1011
|
-
relative = 5
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
declare type Person = StructString<{
|
|
1015
|
-
name: string;
|
|
1016
|
-
email: string;
|
|
1017
|
-
url: string;
|
|
1018
|
-
}>;
|
|
1019
|
-
|
|
1020
|
-
export declare function prettyFormatError(e: Error, withMessage?: boolean): string;
|
|
1021
|
-
|
|
1022
|
-
export declare function prettyPrintError(type: string, e: Error): void;
|
|
1023
|
-
|
|
1024
|
-
export declare type Primitive = undefined | null | boolean | string | number | Function | bigint;
|
|
1025
|
-
|
|
1026
|
-
export declare type ProgressCallback<T = any> = (value: T) => void;
|
|
1027
|
-
|
|
1028
|
-
/**
|
|
1029
|
-
* resolve with true when `p` resolve
|
|
1030
|
-
* resolve with false when `p` reject (and drop error)
|
|
1031
|
-
*/
|
|
1032
|
-
export declare function promiseBool(p: Promise<any>): Promise<boolean>;
|
|
1033
|
-
|
|
1034
|
-
export declare class PromiseCollection {
|
|
1035
|
-
protected readonly promiseList: Record<string, DeferredPromise<any>>;
|
|
1036
|
-
size(): number;
|
|
1037
|
-
create(id: string): Promise<any> & IProgressHolder<any, any>;
|
|
1038
|
-
has(id: string): boolean;
|
|
1039
|
-
done(id: string, data: any): void;
|
|
1040
|
-
error(id: string, e: Error): void;
|
|
1041
|
-
dispose(): void;
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
/** @deprecated */
|
|
1045
|
-
export declare interface PromiseResultArray<T> {
|
|
1046
|
-
count: number;
|
|
1047
|
-
fulfilledResult: T[];
|
|
1048
|
-
fulfilled: number[];
|
|
1049
|
-
rejectedResult: Error[];
|
|
1050
|
-
rejected: number[];
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
export declare function RegexpFinder(this: RegExp[], item: RegExp): number;
|
|
1054
|
-
|
|
1055
|
-
/**
|
|
1056
|
-
* Add object into global disposable store, it will be dispose when call to `disposeGlobal`
|
|
1057
|
-
*/
|
|
1058
|
-
export declare function registerGlobalLifecycle(object: IDisposable): void;
|
|
1059
|
-
|
|
1060
|
-
export declare function relativePath(from: string, to: string): string;
|
|
1061
|
-
|
|
1062
|
-
declare type ScalarTypes = bigint | number | Number | boolean | Boolean | string | String | symbol | undefined | null | Date | RegExp | Function;
|
|
1063
|
-
|
|
1064
|
-
export declare const sepList: string;
|
|
1065
|
-
|
|
1066
|
-
export declare enum SerializableKind {
|
|
1067
|
-
Invalid = 0,
|
|
1068
|
-
Primitive = 1,
|
|
1069
|
-
Manual = 2,
|
|
1070
|
-
Other = 3
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
export declare function setErrorLogRoot(_root: string): void;
|
|
1074
|
-
|
|
1075
|
-
export declare class SimpleStateMachine<StateType, EventType> {
|
|
1076
|
-
protected currentState: StateType;
|
|
1077
|
-
protected readonly rules: IFsmRuleMap<StateType, EventType>;
|
|
1078
|
-
private readonly _onStateChange;
|
|
1079
|
-
readonly onStateChange: EventRegister<IStateChangeEvent<StateType, EventType>>;
|
|
1080
|
-
constructor(rules: IFsmRuleMap<StateType, EventType>, init_state: StateType);
|
|
1081
|
-
protected moveTo(state: StateType): void;
|
|
1082
|
-
getName(): StateType;
|
|
1083
|
-
change(event: EventType): void;
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
export declare function singleton(type?: SingletonType): ClassDecorator;
|
|
1087
|
-
|
|
1088
|
-
export declare const singletonSymbol: unique symbol;
|
|
1089
|
-
|
|
1090
|
-
export declare enum SingletonType {
|
|
1091
|
-
Throw = 0,
|
|
1092
|
-
Return = 1
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
/**
|
|
1096
|
-
* @returns promise resolve after specific time
|
|
1097
|
-
*/
|
|
1098
|
-
export declare function sleep(ms: number): Promise<void>;
|
|
1099
|
-
|
|
1100
|
-
/**
|
|
1101
|
-
* Sort string array alphabet order
|
|
1102
|
-
*
|
|
1103
|
-
* to be used in <arr>.sort()
|
|
1104
|
-
* @public
|
|
1105
|
-
*/
|
|
1106
|
-
export declare function sortByString(a: string, b: string): number;
|
|
1107
|
-
|
|
1108
|
-
declare type StringOr<Object> = string | Object;
|
|
1109
|
-
|
|
1110
|
-
declare type StructString<Object> = string | Object;
|
|
1111
|
-
|
|
1112
|
-
/**
|
|
1113
|
-
* assert value is not null or undefined or NaN
|
|
1114
|
-
* @throws Value is null or undefined
|
|
1115
|
-
* @public
|
|
1116
|
-
*/
|
|
1117
|
-
export declare function throwNull<T>(val: T): NonNullable<T>;
|
|
1118
|
-
|
|
1119
|
-
/**
|
|
1120
|
-
* @returns promise reject with TimeoutError after specific time
|
|
1121
|
-
*/
|
|
1122
|
-
export declare function timeout(ms: number, error?: string): Promise<never>;
|
|
1123
|
-
|
|
1124
|
-
/**
|
|
1125
|
-
* Error when timeout() done
|
|
1126
|
-
* @public
|
|
1127
|
-
*/
|
|
1128
|
-
export declare class TimeoutError extends Error {
|
|
1129
|
-
constructor(time: number, what?: string);
|
|
1130
|
-
}
|
|
1131
|
-
|
|
1132
|
-
export declare function timeoutPromise<T>(ms: number, p: Promise<T>): Promise<T>;
|
|
1133
|
-
|
|
1134
|
-
export declare function timeoutPromise<T>(ms: number, message: string, p: Promise<T>): Promise<T>;
|
|
1135
|
-
|
|
1136
|
-
export declare function timeoutPromise<T, PT = any>(ms: number, p: DeferredPromise<T, PT>): DeferredPromise<T, PT>;
|
|
1137
|
-
|
|
1138
|
-
export declare function timeoutPromise<T, PT = any>(ms: number, message: string, p: DeferredPromise<T, PT>): DeferredPromise<T, PT>;
|
|
1139
|
-
|
|
1140
|
-
export declare class TimeoutPromiseCollection extends PromiseCollection {
|
|
1141
|
-
private readonly defaultTimeoutMs;
|
|
1142
|
-
constructor(defaultTimeoutMs?: number);
|
|
1143
|
-
create(id: string, timeoutMs?: number, timeoutMsg?: string): Promise<any> & IProgressHolder<any, any>;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
|
-
/**
|
|
1147
|
-
* Convert "dispose function" to disposable object
|
|
1148
|
-
* @public
|
|
1149
|
-
*/
|
|
1150
|
-
export declare function toDisposable(fn: () => void): IDisposable;
|
|
1151
|
-
|
|
1152
|
-
/**
|
|
1153
|
-
* try to call `inspect` method of an object, if not exists, call `toString`.
|
|
1154
|
-
* @returns {string}
|
|
1155
|
-
*/
|
|
1156
|
-
export declare function tryInspect(object: any): any;
|
|
1157
|
-
|
|
1158
|
-
declare const TypePathArrayAbstract: typeof PathArrayPosix;
|
|
1159
|
-
|
|
1160
|
-
/**
|
|
1161
|
-
* Uppercase first char
|
|
1162
|
-
* @public
|
|
1163
|
-
*/
|
|
1164
|
-
export declare function ucfirst<T extends string>(str: T): Capitalize<T>;
|
|
1165
|
-
|
|
1166
|
-
/**
|
|
1167
|
-
* Returns a function to be used in <arr>.filter()
|
|
1168
|
-
*
|
|
1169
|
-
* the returned function can use multiple times, it will remember all values inter multiple arrays
|
|
1170
|
-
*
|
|
1171
|
-
* @param {IUniqueIdFactory} idFactory function takes an array element, return it's id to be compare with each other
|
|
1172
|
-
* @public
|
|
1173
|
-
*/
|
|
1174
|
-
export declare function uniqueFilter<T>(idFactory?: IUniqueIdFactory<T>): (item: T) => boolean;
|
|
1175
|
-
|
|
1176
|
-
declare interface Unsubscribable {
|
|
1177
|
-
unsubscribe(): void;
|
|
1178
|
-
}
|
|
1179
|
-
|
|
1180
|
-
export declare function unsubscribableToDisposable(subscription: Unsubscribable): {
|
|
1181
|
-
dispose: () => void;
|
|
1182
|
-
};
|
|
1183
|
-
|
|
1184
|
-
export declare type ValueCallback<T = any> = (value: T | Promise<T>) => void;
|
|
1185
|
-
|
|
1186
|
-
export declare abstract class WrappedConsole {
|
|
1187
|
-
info: Console['info'];
|
|
1188
|
-
log: Console['log'];
|
|
1189
|
-
success: Console['log'];
|
|
1190
|
-
debug: Console['debug'];
|
|
1191
|
-
error: Console['error'];
|
|
1192
|
-
trace: Console['trace'];
|
|
1193
|
-
warn: Console['warn'];
|
|
1194
|
-
assert: Console['assert'];
|
|
1195
|
-
time: Console['time'];
|
|
1196
|
-
timeEnd: Console['timeEnd'];
|
|
1197
|
-
timeLog: Console['timeLog'];
|
|
1198
|
-
count: Console['count'];
|
|
1199
|
-
countReset: Console['countReset'];
|
|
1200
|
-
group: Console['group'];
|
|
1201
|
-
groupCollapsed: Console['groupCollapsed'];
|
|
1202
|
-
groupEnd: Console['groupEnd'];
|
|
1203
|
-
table: Console['table'];
|
|
1204
|
-
dir: Console['dir'];
|
|
1205
|
-
clear: Console['clear'];
|
|
1206
|
-
protected readonly title: string;
|
|
1207
|
-
protected readonly parent: Console;
|
|
1208
|
-
protected readonly bind: boolean;
|
|
1209
|
-
constructor(title: string, { parent, bind }?: WrappedConsoleOptions);
|
|
1210
|
-
protected wrap<T extends keyof Omit<Console & {
|
|
1211
|
-
Console: any;
|
|
1212
|
-
}, 'Console'>>(original: T): Function;
|
|
1213
|
-
private wrapSimple;
|
|
1214
|
-
private wrapExtra;
|
|
1215
|
-
protected createPrefix(message: string): string;
|
|
1216
|
-
private wrapMessageAt;
|
|
1217
|
-
private convertObjectArg;
|
|
1218
|
-
protected abstract processColorLabel(normalizedArguments: any[], messageLoc: number, level: string, prefix: string): void;
|
|
1219
|
-
protected uncolor(args: any[], pos: number, prefix: string, postfix: string): void;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
export declare interface WrappedConsoleOptions {
|
|
1223
|
-
parent?: Console;
|
|
1224
|
-
bind?: boolean;
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
export declare function x(): number;
|
|
1228
|
-
|
|
1229
|
-
export { }
|