UNPKG

1.3 kBTypeScriptView Raw
1/**
2 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7import type { Config } from '@jest/types';
8declare type ResolveOptions = {
9 rootDir: Config.Path;
10 key: string;
11 filePath: Config.Path;
12 optional?: boolean;
13};
14export declare const BULLET: string;
15export declare const DOCUMENTATION_NOTE: string;
16export declare const resolve: (resolver: string | null | undefined, { key, filePath, rootDir, optional }: ResolveOptions) => string;
17export declare const escapeGlobCharacters: (path: Config.Path) => Config.Glob;
18export declare const replaceRootDirInPath: (rootDir: Config.Path, filePath: Config.Path) => string;
19declare type OrArray<T> = T | Array<T>;
20declare type ReplaceRootDirConfigObj = Record<string, Config.Path>;
21declare type ReplaceRootDirConfigValues = OrArray<ReplaceRootDirConfigObj> | OrArray<RegExp> | OrArray<Config.Path>;
22export declare const _replaceRootDirTags: <T extends ReplaceRootDirConfigValues>(rootDir: Config.Path, config: T) => T;
23declare type JSONString = string & {
24 readonly $$type: never;
25};
26export declare const isJSONString: (text?: string | JSONString | undefined) => text is JSONString;
27export {};