@@ -76,8 +76,8 @@ export function warnOptionHasBeenDeprecated(
7676    let  found  =  true 
7777    const  nestedPropertyKeys  =  nestedPropertyKey . split ( '.' ) 
7878    for  ( const  key  of  nestedPropertyKeys )  { 
79-       if  ( current [ key ]  !==  undefined )  { 
80-         current  =  current [ key ] 
79+       if  ( ( current   as   any ) [ key ]  !==  undefined )  { 
80+         current  =  ( current   as   any ) [ key ] 
8181      }  else  { 
8282        found  =  false 
8383        break 
@@ -167,10 +167,12 @@ export function warnOptionHasBeenMovedOutOfExperimental(
167167    const  newKeys  =  newKey . split ( '.' ) 
168168    while  ( newKeys . length  >  1 )  { 
169169      const  key  =  newKeys . shift ( ) ! 
170-       current [ key ]  =  current [ key ]  ||  { } 
171-       current  =  current [ key ] 
170+       ; ( current   as   any ) [ key ]  =  ( current   as   any ) [ key ]  ||  { } 
171+       current  =  ( current   as   any ) [ key ] 
172172    } 
173-     current [ newKeys . shift ( ) ! ]  =  ( config . experimental  as  any ) [ oldExperimentalKey ] 
173+     ; ( current  as  any ) [ newKeys . shift ( ) ! ]  =  ( config . experimental  as  any ) [ 
174+       oldExperimentalKey 
175+     ] 
174176  } 
175177
176178  return  config 
@@ -192,7 +194,7 @@ function warnCustomizedOption(
192194    if  ( ! ( seg  in  current ) )  { 
193195      return 
194196    } 
195-     current  =  current [ seg ] 
197+     current  =  ( current   as   any ) [ seg ] 
196198  } 
197199
198200  if  ( ! silent  &&  current  !==  defaultValue )  { 
@@ -218,16 +220,16 @@ function assignDefaultsAndValidate(
218220  phase : PHASE_TYPE 
219221) : NextConfigComplete  { 
220222  const  configFileName  =  userConfig . configFileName 
221-   if  ( typeof  userConfig . exportTrailingSlash  !==  'undefined' )  { 
223+   if  ( typeof  ( userConfig   as   any ) . exportTrailingSlash  !==  'undefined' )  { 
222224    if  ( ! silent )  { 
223225      Log . warn ( 
224226        `The "exportTrailingSlash" option has been renamed to "trailingSlash". Please update your ${ configFileName }  .` 
225227      ) 
226228    } 
227229    if  ( typeof  userConfig . trailingSlash  ===  'undefined' )  { 
228-       userConfig . trailingSlash  =  userConfig . exportTrailingSlash 
230+       userConfig . trailingSlash  =  ( userConfig   as   any ) . exportTrailingSlash 
229231    } 
230-     delete  userConfig . exportTrailingSlash 
232+     delete  ( userConfig   as   any ) . exportTrailingSlash 
231233  } 
232234
233235  // Handle migration of experimental.dynamicIO to experimental.cacheComponents 
@@ -245,7 +247,7 @@ function assignDefaultsAndValidate(
245247
246248  const  config  =  Object . keys ( userConfig ) . reduce < {  [ key : string ] : any  } > ( 
247249    ( currentConfig ,  key )  =>  { 
248-       const  value  =  userConfig [ key ] 
250+       const  value  =  ( userConfig   as   any ) [ key ] 
249251
250252      if  ( value  ===  undefined  ||  value  ===  null )  { 
251253        return  currentConfig 
@@ -1266,7 +1268,6 @@ function getCacheKey(
12661268
12671269  return  djb2Hash ( keyData ) . toString ( 36 ) 
12681270} 
1269- 
12701271export  default  async  function  loadConfig ( 
12711272  phase : PHASE_TYPE , 
12721273  dir : string , 
@@ -1371,7 +1372,7 @@ export default async function loadConfig(
13711372        silent , 
13721373        configuredExperimentalFeatures , 
13731374        phase 
1374-       )   as   NextConfigComplete , 
1375+       ) , 
13751376      phase , 
13761377      silent 
13771378    ) 
@@ -1481,7 +1482,7 @@ export default async function loadConfig(
14811482      validateConfigSchema ( userConfig ,  configFileName ,  curLog . warn ) 
14821483    } 
14831484
1484-     if  ( userConfig . target  &&  userConfig . target  !==  'server' )  { 
1485+     if  ( ( userConfig   as   any ) . target  &&  ( userConfig   as   any ) . target  !==  'server' )  { 
14851486      throw  new  Error ( 
14861487        `The "target" property is no longer supported in ${ configFileName }  .\n`  + 
14871488          'See more info here https://nextjs.org/docs/messages/deprecated-target-config' 
@@ -1538,7 +1539,7 @@ export default async function loadConfig(
15381539      silent , 
15391540      configuredExperimentalFeatures , 
15401541      phase 
1541-     )   as   NextConfigComplete 
1542+     ) 
15421543
15431544    const  finalConfig  =  await  applyModifyConfig ( completeConfig ,  phase ,  silent ) 
15441545
0 commit comments