source: frontend/node_modules/tsconfig-paths/lib/match-path-sync.d.ts

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 1.8 KB
Line 
1import * as Filesystem from "./filesystem";
2import * as MappingEntry from "./mapping-entry";
3/**
4 * Function that can match a path
5 */
6export interface MatchPath {
7 (requestedModule: string, readJson?: Filesystem.ReadJsonSync, fileExists?: (name: string) => boolean, extensions?: ReadonlyArray<string>): string | undefined;
8}
9/**
10 * Creates a function that can resolve paths according to tsconfig paths property.
11 * @param absoluteBaseUrl Absolute version of baseUrl as specified in tsconfig.
12 * @param paths The paths as specified in tsconfig.
13 * @param mainFields A list of package.json field names to try when resolving module files.
14 * @param addMatchAll Add a match-all "*" rule if none is present
15 * @returns a function that can resolve paths.
16 */
17export declare function createMatchPath(absoluteBaseUrl: string, paths: {
18 [key: string]: Array<string>;
19}, mainFields?: string[], addMatchAll?: boolean): MatchPath;
20/**
21 * Finds a path from tsconfig that matches a module load request.
22 * @param absolutePathMappings The paths to try as specified in tsconfig but resolved to absolute form.
23 * @param requestedModule The required module name.
24 * @param readJson Function that can read json from a path (useful for testing).
25 * @param fileExists Function that checks for existence of a file at a path (useful for testing).
26 * @param extensions File extensions to probe for (useful for testing).
27 * @param mainFields A list of package.json field names to try when resolving module files.
28 * @returns the found path, or undefined if no path was found.
29 */
30export declare function matchFromAbsolutePaths(absolutePathMappings: ReadonlyArray<MappingEntry.MappingEntry>, requestedModule: string, readJson?: Filesystem.ReadJsonSync, fileExists?: Filesystem.FileExistsSync, extensions?: Array<string>, mainFields?: string[]): string | undefined;
Note: See TracBrowser for help on using the repository browser.