@@ -7,7 +7,11 @@ export type {
77 Plugin ,
88} from "./full.ts" ;
99
10- import type { InputOptions , PluginTarget } from "./validation/options.ts" ;
10+ import type {
11+ InputOptions ,
12+ NormalizedOptions ,
13+ PluginTarget ,
14+ } from "./validation/options.ts" ;
1115export type { ConfigAPI } from "./helpers/config-api.ts" ;
1216import type {
1317 PluginAPI as basePluginAPI ,
@@ -24,7 +28,7 @@ export type {
2428 ValidatedOptions as PresetObject ,
2529} from "./validation/options.ts" ;
2630
27- import loadFullConfig , { type ResolvedConfig } from "./full.ts" ;
31+ import loadFullConfig from "./full.ts" ;
2832import {
2933 type PartialConfig ,
3034 loadPartialConfig as loadPartialConfigImpl ,
@@ -72,7 +76,9 @@ export function loadPartialConfig(
7276 }
7377}
7478
75- function * loadOptionsImpl ( opts : InputOptions ) : Handler < ResolvedConfig | null > {
79+ function * loadOptionsImpl (
80+ opts : InputOptions ,
81+ ) : Handler < NormalizedOptions | null > {
7682 const config = yield * loadFullConfig ( opts ) ;
7783 // NOTE: We want to return "null" explicitly, while ?. alone returns undefined
7884 return config ?. options ?? null ;
@@ -90,14 +96,14 @@ export function loadOptionsSync(
9096}
9197export function loadOptions (
9298 opts : Parameters < typeof loadOptionsImpl > [ 0 ] ,
93- callback ?: ( err : Error , val : ResolvedConfig | null ) => void ,
99+ callback ?: ( err : Error , val : NormalizedOptions | null ) => void ,
94100) {
95101 if ( callback !== undefined ) {
96102 beginHiddenCallStack ( loadOptionsRunner . errback ) ( opts , callback ) ;
97103 } else if ( typeof opts === "function" ) {
98104 beginHiddenCallStack ( loadOptionsRunner . errback ) (
99105 undefined ,
100- opts as ( err : Error , val : ResolvedConfig | null ) => void ,
106+ opts as ( err : Error , val : NormalizedOptions | null ) => void ,
101107 ) ;
102108 } else {
103109 if ( process . env . BABEL_8_BREAKING ) {
0 commit comments