Refactor plugin related code (#53942)

This commit is contained in:
Sheetal Nandi
2023-04-20 16:49:47 -07:00
committed by GitHub
parent 58a5f4e228
commit 30fb9fa57e
8 changed files with 118 additions and 137 deletions
+2 -2
View File
@@ -28,6 +28,7 @@ import {
matchesExclude,
matchFiles,
memoize,
ModuleImportResult,
noop,
normalizePath,
normalizeSlashes,
@@ -35,7 +36,6 @@ import {
Path,
perfLogger,
PollingWatchKind,
RequireResult,
resolveJSModule,
some,
startsWith,
@@ -1428,7 +1428,7 @@ export interface System {
base64decode?(input: string): string;
base64encode?(input: string): string;
/** @internal */ bufferFrom?(input: string, encoding?: string): Buffer;
/** @internal */ require?(baseDir: string, moduleName: string): RequireResult;
/** @internal */ require?(baseDir: string, moduleName: string): ModuleImportResult;
// For testing
/** @internal */ now?(): Date;
+1 -1
View File
@@ -7371,7 +7371,7 @@ export interface ConfigFileSpecs {
}
/** @internal */
export type RequireResult<T = {}> =
export type ModuleImportResult<T = {}> =
| { module: T, modulePath?: string, error: undefined }
| { module: undefined, modulePath?: undefined, error: { stack?: string, message?: string } };