import type { NormalizedConfig, RsbuildTarget, SharedCompiledPkgNames } from './types';
import deepmerge from '../compiled/deepmerge';
export { deepmerge };
export declare const isDev: () => boolean;
export declare const isProd: () => boolean;
export declare const isTest: () => boolean;
export declare const isString: (str: unknown) => str is string;
export declare const isUndefined: (obj: unknown) => obj is undefined;
export declare const isFunction: (func: unknown) => func is (...args: any[]) => any;
export declare const isObject: (obj: unknown) => obj is Record<string, any>;
export declare const isPlainObject: (obj: unknown) => obj is Record<string, any>;
export declare const isRegExp: (obj: any) => obj is RegExp;
export declare const createVirtualModule: (content: string) => string;
export declare const removeLeadingSlash: (s: string) => string;
export declare const removeTailSlash: (s: string) => string;
export declare const addTrailingSlash: (s: string) => string;
export interface AwaitableGetter<T> extends PromiseLike<T[]> {
  promises: Promise<T>[];
}
/**
 * Make Awaitable.
 */
export declare const awaitableGetter: <T>(promises: Promise<T>[]) => AwaitableGetter<T>;
export declare const isUseJsSourceMap: (config: NormalizedConfig) => boolean;
export declare const isUseCssSourceMap: (config: NormalizedConfig) => boolean;
export declare const getSharedPkgCompiledPath: (packageName: SharedCompiledPkgNames) => string;
export declare const isURL: (str: string) => boolean;
export declare function isWebTarget(target: RsbuildTarget | RsbuildTarget[]): boolean;
export declare function isServerTarget(target: RsbuildTarget | RsbuildTarget[]): boolean;
export declare function resolvePackage(loader: string, dirname: string): string;
export declare const getCoreJsVersion: (corejsPkgPath: string) => string;
/**
 * ensure absolute file path.
 * @param base - Base path to resolve relative from.
 * @param filePath - Absolute or relative file path.
 * @returns Resolved absolute file path.
 */
export declare const ensureAbsolutePath: (base: string, filePath: string) => string;
export declare const castArray: <T>(arr?: T | T[] | undefined) => T[];
/**
 * Try to resolve npm package, return true if package is installed.
 */
export declare const isPackageInstalled: (name: string, resolvePaths: string | string[]) => boolean;
export declare const isBeyondReact17: (cwd: string) => Promise<boolean>;
export declare const camelCase: (input: string) => string;
export declare const cloneDeep: <T>(value: T) => T;