File tree Expand file tree Collapse file tree 1 file changed +19
-10
lines changed
docs-svelte-kit/src/lib/eslint/scripts Expand file tree Collapse file tree 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(
7171 )
7272
7373 // 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+ ] ) ,
7992 ) ) {
8093 const modulePath = key . slice ( "../../../../.." . length )
8194
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 )
8796 }
8897
8998 const system = tsvfs . createSystem ( fsMap )
You can’t perform that action at this time.
0 commit comments