import type { Binding, NodePath } from '@babel/traverse'; import * as t from '@babel/types'; import * as m from '@codemod/matchers'; export type FunctionPath = NodePath; /** * @returns * - `webpackRequire`: A Matcher for `function __webpack_require__(moduleId) { ... }` * - `containerId`: A matcher for e.g. `__webpack_modules__` that has to be captured before `webpackRequire` is matched */ export declare function webpackRequireFunctionMatcher(): { webpackRequire: m.CapturedMatcher; containerId: m.CapturedMatcher; }; /** * Matches * - `[,,function (module, exports, require) {...}, ...]` where the index is the module ID * - or `{0: function (module, exports, require) {...}, ...}` where the key is the module ID */ export declare function modulesContainerMatcher(): m.CapturedMatcher; /** * @param container A node path to the modules container * @returns A map of module IDs to their function node paths */ export declare function getModuleFunctions(container: NodePath): Map; /** * Matches `__webpack_require__.s = ` */ export declare function findAssignedEntryId(webpackRequireBinding: Binding): string | undefined; /** * Matches `__webpack_require__()` */ export declare function findRequiredEntryId(webpackRequireBinding: Binding): string | undefined; //# sourceMappingURL=common-matchers.d.ts.map