@@ -339,25 +339,23 @@ function analyzeRuneVariables(
339
339
continue ;
340
340
}
341
341
switch ( globalName ) {
342
- // See https://github.com/sveltejs/svelte/blob/ccb3c90cd57ca9d764efab317ed1cb8e5282926e /packages/svelte/types/index.d.ts#L2646
342
+ // See https://github.com/sveltejs/svelte/blob/41b5cd6f5daae3970a9927e062f42b6b62440d16 /packages/svelte/types/index.d.ts#L2299
343
343
case "$state" : {
344
344
appendDeclareFunctionVirtualScripts ( globalName , [
345
345
"<T>(initial: T): T" ,
346
346
"<T>(): T | undefined" ,
347
347
] ) ;
348
348
appendDeclareNamespaceVirtualScripts ( globalName , [
349
- "export function frozen <T>(initial: T): Readonly<T> ;" ,
350
- "export function frozen <T>(): Readonly<T> | undefined;" ,
349
+ "export function raw <T>(initial: T): T ;" ,
350
+ "export function raw <T>(): T | undefined;" ,
351
351
] ) ;
352
352
appendDeclareNamespaceVirtualScripts ( globalName , [
353
353
"export function snapshot<T>(state: T): T;" ,
354
354
] ) ;
355
- appendDeclareNamespaceVirtualScripts ( globalName , [
356
- "export function is(a: any, b: any): boolean;" ,
357
- ] ) ;
355
+
358
356
break ;
359
357
}
360
- // See https://github.com/sveltejs/svelte/blob/ccb3c90cd57ca9d764efab317ed1cb8e5282926e /packages/svelte/types/index.d.ts#L2751
358
+ // See https://github.com/sveltejs/svelte/blob/41b5cd6f5daae3970a9927e062f42b6b62440d16 /packages/svelte/types/index.d.ts#L2453
361
359
case "$derived" : {
362
360
appendDeclareFunctionVirtualScripts ( globalName , [
363
361
"<T>(expression: T): T" ,
@@ -367,7 +365,7 @@ function analyzeRuneVariables(
367
365
] ) ;
368
366
break ;
369
367
}
370
- // See https://github.com/sveltejs/svelte/blob/ccb3c90cd57ca9d764efab317ed1cb8e5282926e /packages/svelte/types/index.d.ts#L2811
368
+ // See https://github.com/sveltejs/svelte/blob/41b5cd6f5daae3970a9927e062f42b6b62440d16 /packages/svelte/types/index.d.ts#L2513
371
369
case "$effect" : {
372
370
appendDeclareFunctionVirtualScripts ( globalName , [
373
371
"(fn: () => void | (() => void)): void" ,
@@ -379,24 +377,27 @@ function analyzeRuneVariables(
379
377
] ) ;
380
378
break ;
381
379
}
382
- // See https://github.com/sveltejs/svelte/blob/ccb3c90cd57ca9d764efab317ed1cb8e5282926e /packages/svelte/types/index.d.ts#L2913
380
+ // See https://github.com/sveltejs/svelte/blob/41b5cd6f5daae3970a9927e062f42b6b62440d16 /packages/svelte/types/index.d.ts#L2615
383
381
case "$props" : {
384
- appendDeclareFunctionVirtualScripts ( globalName , [ "(): any" ] ) ;
382
+ // Use type parameters to avoid `@typescript-eslint/no-unsafe-assignment` errors.
383
+ appendDeclareFunctionVirtualScripts ( globalName , [ "<T>(): T" ] ) ;
385
384
break ;
386
385
}
387
- // See https://github.com/sveltejs/svelte/blob/ccb3c90cd57ca9d764efab317ed1cb8e5282926e /packages/svelte/types/index.d.ts#L2924
386
+ // See https://github.com/sveltejs/svelte/blob/41b5cd6f5daae3970a9927e062f42b6b62440d16 /packages/svelte/types/index.d.ts#L2626
388
387
case "$bindable" : {
389
- appendDeclareFunctionVirtualScripts ( globalName , [ "<T>(t?: T): T" ] ) ;
388
+ appendDeclareFunctionVirtualScripts ( globalName , [
389
+ "<T>(fallback?: T): T" ,
390
+ ] ) ;
390
391
break ;
391
392
}
392
- // See https://github.com/sveltejs/svelte/blob/ccb3c90cd57ca9d764efab317ed1cb8e5282926e /packages/svelte/types/index.d.ts#L2944
393
+ // See https://github.com/sveltejs/svelte/blob/41b5cd6f5daae3970a9927e062f42b6b62440d16 /packages/svelte/types/index.d.ts#L2646
393
394
case "$inspect" : {
394
395
appendDeclareFunctionVirtualScripts ( globalName , [
395
396
`<T extends any[]>(...values: T): { with: (fn: (type: 'init' | 'update', ...values: T) => void) => void }` ,
396
397
] ) ;
397
398
break ;
398
399
}
399
- // See https://github.com/sveltejs/svelte/blob/ccb3c90cd57ca9d764efab317ed1cb8e5282926e /packages/svelte/types/index.d.ts#L2967
400
+ // See https://github.com/sveltejs/svelte/blob/41b5cd6f5daae3970a9927e062f42b6b62440d16 /packages/svelte/types/index.d.ts#L2669
400
401
case "$host" : {
401
402
appendDeclareFunctionVirtualScripts ( globalName , [
402
403
`<El extends HTMLElement = HTMLElement>(): El` ,
0 commit comments