UNPKG

964 BTypeScriptView Raw
1import type { CompilerOptions } from 'typescript';
2export declare function getExistFile({ cwd, files, returnRelative, }: {
3 cwd: string;
4 files: string[];
5 returnRelative?: boolean;
6}): string | void;
7/**
8 * 检查是否存在 tsconfig
9 * @param cwd
10 */
11export declare function checkTSConfigIsExist(cwd?: string): boolean;
12export declare function tryDefault(obj: any): any;
13/**
14 * Parses values of the form "$=jQuery,React=react" into key-value object.
15 */
16export declare function parseMappingArgument(globalStrings: string, processValue?: (v: string, k: string) => string[] | string | void): {};
17export declare function getTsConfigPath(cwd: string, rootPath?: string): string;
18/**
19 * parsed tsconfig
20 */
21export declare function getParsedTSConfig(cwd: string, rootPath?: string): CompilerOptions;
22/**
23 * 获取包和版本号
24 */
25export declare function getNodeModulePKG<T = {}>(moduleName: string): {
26 default: T | undefined;
27 version?: string;
28};