File tree 1 file changed +19
-10
lines changed
docs-svelte-kit/src/lib/eslint/scripts
1 file changed +19
-10
lines changed Original file line number Diff line number Diff line change @@ -71,19 +71,28 @@ export async function createVirtualCompilerHost(
71
71
)
72
72
73
73
// Setup svelte type definition modules
74
- for ( const [ key , get ] of Object . entries (
75
- // @ts -expect-error -- ignore
76
- import . meta. glob ( "../../../../../node_modules/svelte/**/*.d.ts" , {
77
- as : "raw" ,
78
- } ) ,
74
+ for ( const [ key , module ] of await Promise . all (
75
+ Object . entries ( {
76
+ // @ts -expect-error -- ignore
77
+ ...import . meta. glob ( "../../../../../node_modules/svelte/*/*.d.ts" , {
78
+ as : "raw" ,
79
+ } ) ,
80
+ // @ts -expect-error -- ignore
81
+ ...import . meta. glob (
82
+ "../../../../../node_modules/svelte/types/{runtime,shared}/**/*.d.ts" ,
83
+ {
84
+ as : "raw" ,
85
+ } ,
86
+ ) ,
87
+ } ) . map ( async ( [ key , get ] ) => [
88
+ key ,
89
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- ignore
90
+ await ( get as any ) ( ) ,
91
+ ] ) ,
79
92
) ) {
80
93
const modulePath = key . slice ( "../../../../.." . length )
81
94
82
- fsMap . set (
83
- modulePath ,
84
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- ignore
85
- await ( get as any ) ( ) ,
86
- )
95
+ fsMap . set ( modulePath , module )
87
96
}
88
97
89
98
const system = tsvfs . createSystem ( fsMap )
You can’t perform that action at this time.
0 commit comments