File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -17,17 +17,14 @@ function exportDefaultConfig(
1717 fallbackExpression = object . create ( { } ) ;
1818 }
1919
20- const { value : _rootObject } = exports . createDefault ( ast , { fallback : fallbackExpression } ) ;
20+ const { value } = exports . createDefault ( ast , { fallback : fallbackExpression } ) ;
21+
22+ // Handle TypeScript satisfies expressions
23+ const rootObject = value . type === 'TSSatisfiesExpression' ? value . expression : value ;
2124
2225 // Handle wrapper functions (e.g., defineConfig({})) if ignoreWrapper is specified
2326 let configObject : AstTypes . ObjectExpression ;
2427
25- // Handle TypeScript satisfies expressions
26- let rootObject = _rootObject ;
27- if ( _rootObject . type === 'TSSatisfiesExpression' ) {
28- rootObject = _rootObject . expression ;
29- }
30-
3128 // Early bail-out: if no wrapper to ignore or not a call expression
3229 if ( ! ignoreWrapper || ! ( 'arguments' in rootObject ) || ! Array . isArray ( rootObject . arguments ) ) {
3330 configObject = rootObject as unknown as AstTypes . ObjectExpression ;
You can’t perform that action at this time.
0 commit comments