type NoopFunc = typeof noopFunc; declare function noopFunc(): void; type AnyFunc = typeof anyFunc; declare function anyFunc(...args: any[]): any; type AnyObject = Record; declare const AnyObject: AnyObject; type ValueOf> = T[keyof T]; type AllKeys> = T extends Record ? T extends any[] ? never : keyof T | { [K in keyof T]: AllKeys; }[keyof T] : never; type ClientXY = { clientX: number; clientY: number; }; declare function firstOne(input: T[] | Set): T | undefined; declare function lastOne(input: T[] | Set): T; declare function deleteFromArray(target: T[], filter: string | ((value: T) => boolean)): void; declare function flushFuncs(input: T[] | Set): void; declare function clampIndex(arr: T[], index?: number): number; declare function loopFor(arr: T[], callback: (cur: T, next: T, prev: T, index: number) => 'continue' | 'break' | void): void; declare const ThisAsAny: any; declare function iife(callback: () => T): T; /** * @deprecated */ declare function matchCase(Case: T, obj: Partial> & { _default?: R; }): R | undefined; declare function Log(someThing: T, label?: string): T; declare function clone(object: T): T; declare function jsonFy(obj: any): string; declare function jsonParse(obj: any, fallback?: T): T | undefined; declare function objKeys(obj: Partial>): K[]; declare function objectId(obj: AnyObject): string; declare function suffixOf(input?: string, lowerCase?: boolean): string; declare function createFuncAOP any>({ before, after, }?: { before?: (...args: Parameters) => void; after?: (result: ReturnType, ...args: Parameters) => void; }): (func: T) => T; declare function safeTimeout(func: () => any, delay?: number): void; declare function miniId(size?: number, alphabet?: string): string; declare function optionalSet(obj: T | undefined | null, key: keyof T, value: T[keyof T]): void; type ObjCacheStore = Partial>; declare function getSet(cache: Map, key: K, fn: () => V, compare?: unknown[]): V; declare function getSet(cache: WeakMap, key: K, fn: () => V, compare?: unknown[]): V; declare function getSet(cache: ObjCacheStore, key: K, fn: () => V, compare?: unknown[]): V; type MatchKey = string | number | symbol; type MatchHandler = (...args: any[]) => unknown; type MatchValue = string | number | boolean | bigint | symbol | object | null | undefined; type MatchCase = MatchValue | ((value: Value) => unknown); type CaseResult = Case extends MatchHandler ? ReturnType : Case; type MatchResult = CaseResult; type ExhaustiveValueCases = { [Case in Value]: MatchCase; }; type PartialValueCases = Partial> & { _: MatchCase; }; type UnionToIntersection = (Value extends unknown ? (value: Value) => void : never) extends (value: infer Intersection) => void ? Intersection : never; type ExhaustiveObjectCases = UnionToIntersection ? { [CurrentCase in Case]: MatchCase; } : never>; type PartialObjectCases = Partial> & { _: MatchCase; }; declare function match>>(value: Value, cases: Cases): MatchResult; declare function match>>(value: Value, cases: Cases): MatchResult; declare function match>>(value: Value, key: Key & (Value[Key] extends MatchKey ? unknown : never), cases: Cases): MatchResult; declare function match>>(value: Value, key: Key & (Value[Key] extends MatchKey ? unknown : never), cases: Cases): MatchResult; export { type AllKeys, type AnyFunc, AnyObject, type ClientXY, Log, type NoopFunc, ThisAsAny, type ValueOf, anyFunc, clampIndex, clone, createFuncAOP, deleteFromArray, firstOne, flushFuncs, getSet, iife, jsonFy, jsonParse, lastOne, loopFor, match, matchCase, miniId, noopFunc, objKeys, objectId, optionalSet, safeTimeout, suffixOf };