@@ -988,15 +988,15 @@ declare module 'svelte/compiler' {
988
988
filename ?: string | undefined ;
989
989
} | undefined ) : Promise < Processed > ;
990
990
export class CompileError extends Error {
991
-
991
+
992
992
constructor ( code : string , message : string , position : [ number , number ] | undefined ) ;
993
-
993
+
994
994
filename : CompileError_1 [ 'filename' ] ;
995
-
995
+
996
996
position : CompileError_1 [ 'position' ] ;
997
-
997
+
998
998
start : CompileError_1 [ 'start' ] ;
999
-
999
+
1000
1000
end : CompileError_1 [ 'end' ] ;
1001
1001
code : string ;
1002
1002
}
@@ -1007,9 +1007,9 @@ declare module 'svelte/compiler' {
1007
1007
* */
1008
1008
export const VERSION : string ;
1009
1009
class Scope {
1010
-
1010
+
1011
1011
constructor ( root : ScopeRoot , parent : Scope | null , porous : boolean ) ;
1012
-
1012
+
1013
1013
root : ScopeRoot ;
1014
1014
/**
1015
1015
* A map of every identifier declared by this scope, and all the
@@ -1033,25 +1033,25 @@ declare module 'svelte/compiler' {
1033
1033
* which is usually an error. Block statements do not increase this value
1034
1034
*/
1035
1035
function_depth : number ;
1036
-
1036
+
1037
1037
declare ( node : import ( 'estree' ) . Identifier , kind : Binding [ 'kind' ] , declaration_kind : DeclarationKind , initial ?: null | import ( 'estree' ) . Expression | import ( 'estree' ) . FunctionDeclaration | import ( 'estree' ) . ClassDeclaration | import ( 'estree' ) . ImportDeclaration | EachBlock ) : Binding ;
1038
1038
child ( porous ?: boolean ) : Scope ;
1039
-
1039
+
1040
1040
generate ( preferred_name : string ) : string ;
1041
-
1041
+
1042
1042
get ( name : string ) : Binding | null ;
1043
-
1043
+
1044
1044
get_bindings ( node : import ( 'estree' ) . VariableDeclarator | LetDirective ) : Binding [ ] ;
1045
-
1045
+
1046
1046
owner ( name : string ) : Scope | null ;
1047
-
1047
+
1048
1048
reference ( node : import ( 'estree' ) . Identifier , path : SvelteNode [ ] ) : void ;
1049
1049
#private;
1050
1050
}
1051
1051
class ScopeRoot {
1052
-
1052
+
1053
1053
conflicts : Set < string > ;
1054
-
1054
+
1055
1055
unique ( preferred_name : string ) : import ( "estree" ) . Identifier ;
1056
1056
}
1057
1057
interface BaseNode {
@@ -2463,21 +2463,21 @@ declare function $derived<T>(expression: T): T;
2463
2463
2464
2464
declare namespace $derived {
2465
2465
/**
2466
- * Sometimes you need to create complex derivations which don't fit inside a short expression.
2467
- * In this case , you can resort to `$derived.call` which accepts a function as its argument and returns its value .
2466
+ * Sometimes you need to create complex derivations that don't fit inside a short expression.
2467
+ * In these cases , you can use `$derived.call` which accepts a function as its argument.
2468
2468
*
2469
2469
* Example:
2470
2470
* ```ts
2471
- * $derived.call(() => {
2472
- * let tmp = count ;
2473
- * if (count > 10 ) {
2474
- * tmp += 100 ;
2475
- * }
2476
- * return tmp * 2 ;
2471
+ * let total = $derived.call(() => {
2472
+ * let result = 0 ;
2473
+ * for (const n of numbers ) {
2474
+ * result += n ;
2475
+ * }
2476
+ * return result ;
2477
2477
* });
2478
2478
* ```
2479
2479
*
2480
- * https://svelte-5-preview.vercel.app/docs/runes#$derived-fn
2480
+ * https://svelte-5-preview.vercel.app/docs/runes#$derived-call
2481
2481
*/
2482
2482
export function fn < T > ( fn : ( ) => T ) : void ;
2483
2483
}
@@ -2603,4 +2603,4 @@ declare function $inspect<T extends any[]>(
2603
2603
...values : T
2604
2604
) : { with : ( fn : ( type : 'init' | 'update' , ...values : T ) => void ) => void } ;
2605
2605
2606
- //# sourceMappingURL=index.d.ts.map
2606
+ //# sourceMappingURL=index.d.ts.map
0 commit comments