Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

resolver.d.ts 2.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. */
  7. import type { Config } from '@jest/types';
  8. import type { IModuleMap } from 'jest-haste-map';
  9. import ModuleNotFoundError from './ModuleNotFoundError';
  10. import shouldLoadAsEsm from './shouldLoadAsEsm';
  11. import type { ResolverConfig } from './types';
  12. declare type FindNodeModuleConfig = {
  13. basedir: Config.Path;
  14. browser?: boolean;
  15. conditions?: Array<string>;
  16. extensions?: Array<string>;
  17. moduleDirectory?: Array<string>;
  18. paths?: Array<Config.Path>;
  19. resolver?: Config.Path | null;
  20. rootDir?: Config.Path;
  21. throwIfNotFound?: boolean;
  22. };
  23. export declare type ResolveModuleConfig = {
  24. conditions?: Array<string>;
  25. skipNodeResolution?: boolean;
  26. paths?: Array<Config.Path>;
  27. };
  28. export default class Resolver {
  29. private readonly _options;
  30. private readonly _moduleMap;
  31. private readonly _moduleIDCache;
  32. private readonly _moduleNameCache;
  33. private readonly _modulePathCache;
  34. private readonly _supportsNativePlatform;
  35. constructor(moduleMap: IModuleMap, options: ResolverConfig);
  36. static ModuleNotFoundError: typeof ModuleNotFoundError;
  37. static tryCastModuleNotFoundError(error: unknown): ModuleNotFoundError | null;
  38. static clearDefaultResolverCache(): void;
  39. static findNodeModule(path: Config.Path, options: FindNodeModuleConfig): Config.Path | null;
  40. static unstable_shouldLoadAsEsm: typeof shouldLoadAsEsm;
  41. resolveModuleFromDirIfExists(dirname: Config.Path, moduleName: string, options?: ResolveModuleConfig): Config.Path | null;
  42. resolveModule(from: Config.Path, moduleName: string, options?: ResolveModuleConfig): Config.Path;
  43. private _isAliasModule;
  44. isCoreModule(moduleName: string): boolean;
  45. getModule(name: string): Config.Path | null;
  46. getModulePath(from: Config.Path, moduleName: string): Config.Path;
  47. getPackage(name: string): Config.Path | null;
  48. getMockModule(from: Config.Path, name: string): Config.Path | null;
  49. getModulePaths(from: Config.Path): Array<Config.Path>;
  50. getModuleID(virtualMocks: Map<string, boolean>, from: Config.Path, moduleName?: string, options?: ResolveModuleConfig): string;
  51. private _getModuleType;
  52. private _getAbsolutePath;
  53. private _getMockPath;
  54. private _getVirtualMockPath;
  55. private _isModuleResolved;
  56. resolveStubModuleName(from: Config.Path, moduleName: string): Config.Path | null;
  57. }
  58. export {};