@@ -158,17 +158,17 @@ export function createRoot<T>(fn: RootFunction<T>, detachedOwner?: typeof Owner)
158158 ? { owned : null , cleanups : null , context : null , owner : null }
159159 : UNOWNED
160160 : {
161- owned : null ,
162- cleanups : null ,
163- context : current ? current . context : null ,
164- owner : current
165- } ,
161+ owned : null ,
162+ cleanups : null ,
163+ context : current ? current . context : null ,
164+ owner : current
165+ } ,
166166 updateFn = unowned
167167 ? IS_DEV
168168 ? ( ) =>
169- fn ( ( ) => {
170- throw new Error ( "Dispose method must be an explicit argument to createRoot function" ) ;
171- } )
169+ fn ( ( ) => {
170+ throw new Error ( "Dispose method must be an explicit argument to createRoot function" ) ;
171+ } )
172172 : fn
173173 : ( ) => fn ( ( ) => untrack ( ( ) => cleanNode ( root ) ) ) ;
174174
@@ -274,7 +274,7 @@ export interface BaseOptions {
274274// TypeScript Discord conversation: https://discord.com/channels/508357248330760243/508357248330760249/911266491024949328
275275export type NoInfer < T extends any > = [ T ] [ T extends any ? 0 : never ] ;
276276
277- export interface EffectOptions extends BaseOptions { }
277+ export interface EffectOptions extends BaseOptions { }
278278
279279// Also similar to OnEffectFunction
280280export type EffectFunction < Prev , Next extends Prev = Prev > = ( v : Prev ) => Next ;
@@ -391,15 +391,15 @@ export function createEffect<Next, Init>(
391391export function createReaction ( onInvalidate : ( ) => void , options ?: EffectOptions ) {
392392 let fn : ( ( ) => void ) | undefined ;
393393 const c = createComputation (
394- ( ) => {
395- fn ? fn ( ) : untrack ( onInvalidate ) ;
396- fn = undefined ;
397- } ,
398- undefined ,
399- false ,
400- 0 ,
401- IS_DEV ? options : undefined
402- ) ,
394+ ( ) => {
395+ fn ? fn ( ) : untrack ( onInvalidate ) ;
396+ fn = undefined ;
397+ } ,
398+ undefined ,
399+ false ,
400+ 0 ,
401+ IS_DEV ? options : undefined
402+ ) ,
403403 s = SuspenseContext && useContext ( SuspenseContext ) ;
404404 if ( s ) c . suspense = s ;
405405 c . user = true ;
@@ -705,15 +705,15 @@ export function createResource<T, S, R>(
705705 initP !== NO_INIT
706706 ? ( initP as T | Promise < T > )
707707 : untrack ( ( ) => {
708- try {
709- return fetcher ( lookup , {
710- value : value ( ) ,
711- refetching
712- } ) ;
713- } catch ( fetcherError ) {
714- error = fetcherError ;
715- }
716- } ) ;
708+ try {
709+ return fetcher ( lookup , {
710+ value : value ( ) ,
711+ refetching
712+ } ) ;
713+ } catch ( fetcherError ) {
714+ error = fetcherError ;
715+ }
716+ } ) ;
717717 if ( error !== undefined ) {
718718 loadEnd ( pr , undefined , castError ( error ) , lookup ) ;
719719 return ;
@@ -914,8 +914,8 @@ export function untrack<T>(fn: Accessor<T>): T {
914914export type ReturnTypes < T > = T extends readonly Accessor < unknown > [ ]
915915 ? { [ K in keyof T ] : T [ K ] extends Accessor < infer I > ? I : never }
916916 : T extends Accessor < infer I >
917- ? I
918- : never ;
917+ ? I
918+ : never ;
919919
920920// transforms a tuple to a tuple of accessors in a way that allows generics to be inferred
921921export type AccessorArray < T > = [ ...Extract < { [ K in keyof T ] : Accessor < T [ K ] > } , readonly unknown [ ] > ] ;
@@ -1778,10 +1778,10 @@ function createProvider(id: symbol, options?: EffectOptions) {
17781778 let res ;
17791779 createRenderEffect (
17801780 ( ) =>
1781- ( res = untrack ( ( ) => {
1782- Owner ! . context = { ...Owner ! . context , [ id ] : props . value } ;
1783- return children ( ( ) => props . children ) ;
1784- } ) ) ,
1781+ ( res = untrack ( ( ) => {
1782+ Owner ! . context = { ...Owner ! . context , [ id ] : props . value } ;
1783+ return children ( ( ) => props . children ) ;
1784+ } ) ) ,
17851785 undefined ,
17861786 options
17871787 ) ;
0 commit comments