@monstermann/unplugin-auto-import-fn
Version:
A utility library for TypeScript.
88 lines • 6.97 kB
TypeScript
//#region src/modules.d.ts
declare const modules: {
readonly array: readonly ["append", "at", "atOr", "atOrElse", "atOrThrow", "clone", "compact", "concat", "countBy", "drop", "dropLast", "empty", "every", "filter", "find", "findIndex", "findIndexOr", "findIndexOrElse", "findIndexOrThrow", "findLast", "findLastIndex", "findLastIndexOr", "findLastIndexOrElse", "findLastIndexOrThrow", "findLastOr", "findLastOrElse", "findLastOrThrow", "findMap", "findMapAll", "findMapLast", "findMapLastOr", "findMapLastOrElse", "findMapLastOrThrow", "findMapOr", "findMapOrElse", "findMapOrThrow", "findOr", "findOrElse", "findOrThrow", "findRemove", "findRemoveLast", "findRemoveLastOr", "findRemoveLastOrElse", "findRemoveLastOrThrow", "findRemoveOr", "findRemoveOrElse", "findRemoveOrThrow", "findReplace", "findReplaceLast", "findReplaceLastOr", "findReplaceLastOrElse", "findReplaceLastOrThrow", "findReplaceOr", "findReplaceOrElse", "findReplaceOrThrow", "first", "firstOr", "firstOrElse", "firstOrThrow", "flatMap", "forEach", "groupBy", "has", "hasAll", "hasAny", "hasNone", "indexBy", "indexOf", "indexOfOr", "indexOfOrElse", "indexOfOrThrow", "insertAllAt", "insertAllAtOr", "insertAllAtOrElse", "insertAllAtOrThrow", "insertAt", "insertAtOr", "insertAtOrElse", "insertAtOrThrow", "isArray", "isEmpty", "isShallowEqual", "join", "last", "lastIndexOf", "lastIndexOfOr", "lastIndexOfOrElse", "lastIndexOfOrThrow", "lastOr", "lastOrElse", "lastOrThrow", "length", "mapAt", "mapAtOr", "mapAtOrElse", "mapAtOrThrow", "mapEach", "maxOr", "maxOrElse", "maxOrThrow", "meanOr", "meanOrElse", "meanOrThrow", "medianOr", "medianOrElse", "medianOrThrow", "minOr", "minOrElse", "minOrThrow", "none", "partition", "prepend", "random", "randomOr", "randomOrElse", "reduce", "reject", "remove", "removeAll", "removeAt", "removeAtOr", "removeAtOrElse", "removeAtOrThrow", "removeLast", "removeLastOr", "removeLastOrElse", "removeLastOrThrow", "removeOrElse", "removeOrThrow", "replace", "replaceLast", "replaceLastOr", "replaceLastOrElse", "replaceLastOrThrow", "replaceOr", "replaceOrElse", "replaceOrThrow", "setAt", "setAtOr", "setAtOrElse", "setAtOrThrow", "shuffle", "slice", "some", "sort", "sum", "take", "takeLast", "union", "unique"];
readonly function: readonly ["FnError", "dfdlT", "dfdl", "flow", "ifElse", "invoke", "is", "isAsyncIterable", "isBoolean", "isDate", "isError", "isFalsy", "isFunction", "isImmutable", "isIterable", "isMutable", "isMutating", "isNot", "isPrimitive", "isRegExp", "isSymbol", "isTruthy", "log", "markAsImmutable", "markAsMutable", "noop", "not", "once", "pauseMutations", "pipe", "startMutations", "tap", "when", "withMutations"];
readonly map: readonly ["clone", "compact", "filter", "forEach", "get", "getOr", "getOrElse", "getOrThrow", "has", "hasAll", "hasAny", "hasNone", "isEmpty", "isMap", "isShallowEqual", "map", "mapEach", "mapOr", "mapOrElse", "mapOrThrow", "reject", "remove", "removeAll", "removeOr", "removeOrElse", "removeOrThrow", "set"];
readonly number: readonly ["add", "ceil", "clamp", "div", "exp", "floor", "gt", "gte", "isBigInt", "isFinite", "isFloat", "isInRange", "isInt", "isNotFinite", "isNumber", "limitPrecision", "lt", "lte", "max", "min", "mul", "or", "orElse", "orThrow", "randomInt", "round", "sub", "toFixed", "toString"];
readonly object: readonly ["assign", "clone", "entries", "evolve", "forEach", "fromEntries", "get", "getOr", "getOrElse", "getOrThrow", "hasKey", "hasProp", "is", "isEmpty", "isObject", "isShallowEqual", "keys", "map", "mapAssign", "mapMerge", "matches", "merge", "omit", "pick", "set", "test", "testAll", "values"];
readonly option: readonly ["filter", "isNone", "isSome", "map", "mapOr", "mapOrElse", "or", "orElse", "orThrow"];
readonly promise: readonly ["debounce", "defer", "isPromise", "limit", "orElse", "queue", "sleep", "then", "throttle"];
readonly result: readonly ["andThen", "err", "errP", "isErr", "isOk", "isResult", "mapErr", "mapOk", "ok", "okOr", "okOrElse", "okOrThrow", "okP", "orElse", "tapErr", "tapOk"];
readonly set: readonly ["add", "addAll", "addOr", "addOrElse", "addOrThrow", "clone", "compact", "difference", "forEach", "has", "hasAll", "hasAny", "hasNone", "intersection", "isDisjointFrom", "isEmpty", "isSet", "isShallowEqual", "isSubsetOf", "isSupersetOf", "mapEach", "remove", "removeAll", "removeOr", "removeOrElse", "removeOrThrow", "size", "symmetricDifference", "toArray", "union"];
readonly string: readonly ["append", "camelCase", "capitalize", "constantCase", "drop", "dropLast", "endsWith", "has", "hasAll", "hasAny", "hasNone", "indexOf", "indexOfOr", "indexOfOrElse", "indexOfOrThrow", "isEmpty", "isString", "kebabCase", "lastIndexOf", "lastIndexOfOr", "lastIndexOfOrElse", "lastIndexOfOrThrow", "length", "lowerCase", "match", "matchOr", "matchOrElse", "matchOrThrow", "padEnd", "padStart", "parseFloat", "parseFloatOr", "parseFloatOrElse", "parseFloatOrThrow", "parseInt", "parseIntOr", "parseIntOrElse", "parseIntOrThrow", "pascalCase", "prepend", "repeat", "replace", "replaceAll", "reverse", "slice", "snakeCase", "split", "startsWith", "take", "takeLast", "test", "titleCase", "trim", "trimEnd", "trimStart", "uncapitalize", "upperCase"];
readonly types: readonly ["Err", "Ok", "Result", "ErrP", "OkP", "ResultP", "ErrLike", "OkLike", "ResultLike", "InferOk", "InferErr", "SimplifyResult", "Debounced", "Deferred", "Limited", "Throttled"];
};
//#endregion
//#region src/types.d.ts
type Modules = typeof modules;
type Category = keyof Modules;
interface Wildcard {
(name?: string): Record<string, [string, string][]>;
}
interface Named<T extends Category> {
(options?: {
aliases?: Aliases<T>;
exclude?: Filter<T>;
include?: Filter<T>;
}): {
from: string;
imports: ([string] | [string, string])[];
type: boolean;
};
}
type Aliases<T extends Category> = Partial<Record<Modules[T][number], string>>;
type Filter<T extends Category> = Modules[T][number][] | RegExp | ((name: Modules[T][number]) => boolean);
//#endregion
//#region src/index.d.ts
declare const _default: {
recommended: ({
from: string;
imports: ([string] | [string, string])[];
type: boolean;
} | Record<string, [string, string][]>)[];
array: {
named: Named<"array">;
wildcard: Wildcard;
};
function: {
named: Named<"function">;
wildcard: Wildcard;
};
map: {
named: Named<"map">;
wildcard: Wildcard;
};
number: {
named: Named<"number">;
wildcard: Wildcard;
};
object: {
named: Named<"object">;
wildcard: Wildcard;
};
option: {
named: Named<"option">;
wildcard: Wildcard;
};
promise: {
named: Named<"promise">;
wildcard: Wildcard;
};
result: {
named: Named<"result">;
wildcard: Wildcard;
};
set: {
named: Named<"set">;
wildcard: Wildcard;
};
string: {
named: Named<"string">;
wildcard: Wildcard;
};
types: {
named: Named<"types">;
};
};
//#endregion
export { _default as default };