diff --git a/dist/es/S.d.ts b/dist/es/S.d.ts index 672cee0..fc5ae2e 100644 --- a/dist/es/S.d.ts +++ b/dist/es/S.d.ts @@ -1,5 +1,6 @@ export interface S { - root(fn: (dispose?: () => void) => T): T; + root(fn: (dispose: () => void) => T): T; + root(fn: () => T): T; (fn: () => T): () => T; (fn: (v: T) => T, seed: T): () => T; on(ev: () => any, fn: () => T): () => T; diff --git a/dist/es/withsubclocks.d.ts b/dist/es/withsubclocks.d.ts index 5a17966..2e0ddd3 100644 --- a/dist/es/withsubclocks.d.ts +++ b/dist/es/withsubclocks.d.ts @@ -1,5 +1,6 @@ export interface S { root(fn: (dispose: () => void) => T): T; + root(fn: () => T): T; (fn: () => T): () => T; (fn: (v: T) => T, seed: T): () => T; on(ev: () => any, fn: () => T): () => T; diff --git a/src/S.ts b/src/S.ts index c131107..78ab307 100644 --- a/src/S.ts +++ b/src/S.ts @@ -1,6 +1,7 @@ export interface S { // Computation root - root(fn : (dispose? : () => void) => T) : T; + root(fn : (dispose : () => void) => T) : T; + root(fn : () => T) : T; // Computation constructors (fn : () => T) : () => T; diff --git a/src/withsubclocks.ts b/src/withsubclocks.ts index b4d2751..9cf25a4 100644 --- a/src/withsubclocks.ts +++ b/src/withsubclocks.ts @@ -2,6 +2,7 @@ export interface S { // Computation root root(fn : (dispose : () => void) => T) : T; + root(fn : () => T) : T; // Computation constructors (fn : () => T) : () => T;