solid-js 1.8.1 → 1.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/dev.cjs +5 -1
  2. package/dist/dev.js +301 -532
  3. package/dist/server.cjs +18 -4
  4. package/dist/server.js +89 -170
  5. package/dist/solid.cjs +5 -1
  6. package/dist/solid.js +259 -459
  7. package/h/dist/h.js +8 -34
  8. package/h/jsx-runtime/dist/jsx.js +1 -1
  9. package/h/jsx-runtime/types/index.d.ts +8 -11
  10. package/h/types/hyperscript.d.ts +11 -11
  11. package/html/dist/html.js +94 -216
  12. package/html/types/lit.d.ts +31 -45
  13. package/package.json +2 -2
  14. package/store/dist/dev.js +42 -114
  15. package/store/dist/server.js +8 -19
  16. package/store/dist/store.js +39 -105
  17. package/store/types/index.d.ts +7 -21
  18. package/store/types/modifiers.d.ts +3 -6
  19. package/store/types/mutable.d.ts +2 -5
  20. package/store/types/server.d.ts +4 -12
  21. package/store/types/store.d.ts +61 -218
  22. package/types/index.d.ts +9 -72
  23. package/types/reactive/array.d.ts +4 -12
  24. package/types/reactive/observable.d.ts +17 -25
  25. package/types/reactive/scheduler.d.ts +6 -9
  26. package/types/reactive/signal.d.ts +140 -228
  27. package/types/render/Suspense.d.ts +5 -5
  28. package/types/render/component.d.ts +31 -62
  29. package/types/render/flow.d.ts +31 -43
  30. package/types/render/hydration.d.ts +14 -14
  31. package/types/server/index.d.ts +2 -56
  32. package/types/server/reactive.d.ts +44 -68
  33. package/types/server/rendering.d.ts +95 -166
  34. package/universal/dist/dev.js +12 -28
  35. package/universal/dist/universal.js +12 -28
  36. package/universal/types/index.d.ts +1 -3
  37. package/universal/types/universal.d.ts +1 -0
  38. package/web/dist/dev.js +81 -617
  39. package/web/dist/server.cjs +1 -1
  40. package/web/dist/server.js +93 -176
  41. package/web/dist/web.js +80 -611
  42. package/web/types/client.d.ts +2 -2
  43. package/web/types/core.d.ts +1 -10
  44. package/web/types/index.d.ts +10 -27
  45. package/web/types/server-mock.d.ts +32 -47
@@ -11,7 +11,7 @@ export type Component<P = {}> = (props: P) => JSX.Element;
11
11
  * would silently throw them away.
12
12
  */
13
13
  export type VoidProps<P = {}> = P & {
14
- children?: never;
14
+ children?: never;
15
15
  };
16
16
  /**
17
17
  * `VoidComponent` forbids the `children` prop.
@@ -25,7 +25,7 @@ export type VoidComponent<P = {}> = Component<VoidProps<P>>;
25
25
  * Use this for components that you want to accept children.
26
26
  */
27
27
  export type ParentProps<P = {}> = P & {
28
- children?: JSX.Element;
28
+ children?: JSX.Element;
29
29
  };
30
30
  /**
31
31
  * `ParentComponent` allows an optional `children` prop with the usual
@@ -40,7 +40,7 @@ export type ParentComponent<P = {}> = Component<ParentProps<P>>;
40
40
  * Note that all JSX <Elements> are of the type `JSX.Element`.
41
41
  */
42
42
  export type FlowProps<P = {}, C = JSX.Element> = P & {
43
- children: C;
43
+ children: C;
44
44
  };
45
45
  /**
46
46
  * `FlowComponent` requires a `children` prop with the specified type.
@@ -59,11 +59,7 @@ export type ValidComponent = keyof JSX.IntrinsicElements | Component<any> | (str
59
59
  * ComponentProps<typeof Portal> // { mount?: Node; useShadow?: boolean; children: JSX.Element }
60
60
  * ComponentProps<'div'> // JSX.HTMLAttributes<HTMLDivElement>
61
61
  */
62
- export type ComponentProps<T extends ValidComponent> = T extends Component<infer P>
63
- ? P
64
- : T extends keyof JSX.IntrinsicElements
65
- ? JSX.IntrinsicElements[T]
66
- : Record<string, unknown>;
62
+ export type ComponentProps<T extends ValidComponent> = T extends Component<infer P> ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : Record<string, unknown>;
67
63
  /**
68
64
  * Type of `props.ref`, for use in `Component` or `props` typing.
69
65
  *
@@ -72,69 +68,42 @@ export type ComponentProps<T extends ValidComponent> = T extends Component<infer
72
68
  export type Ref<T> = T | ((val: T) => void);
73
69
  export declare function createComponent<T>(Comp: Component<T>, props: T): JSX.Element;
74
70
  type DistributeOverride<T, F> = T extends undefined ? F : T;
75
- type Override<T, U> = T extends any
76
- ? U extends any
77
- ? {
78
- [K in keyof T]: K extends keyof U ? DistributeOverride<U[K], T[K]> : T[K];
79
- } & {
80
- [K in keyof U]: K extends keyof T ? DistributeOverride<U[K], T[K]> : U[K];
81
- }
82
- : T & U
83
- : T & U;
84
- type OverrideSpread<T, U> = T extends any
85
- ? {
86
- [K in keyof ({
71
+ type Override<T, U> = T extends any ? U extends any ? {
72
+ [K in keyof T]: K extends keyof U ? DistributeOverride<U[K], T[K]> : T[K];
73
+ } & {
74
+ [K in keyof U]: K extends keyof T ? DistributeOverride<U[K], T[K]> : U[K];
75
+ } : T & U : T & U;
76
+ type OverrideSpread<T, U> = T extends any ? {
77
+ [K in keyof ({
87
78
  [K in keyof T]: any;
88
- } & {
79
+ } & {
89
80
  [K in keyof U]?: any;
90
- } & {
81
+ } & {
91
82
  [K in U extends any ? keyof U : keyof U]?: any;
92
- })]: K extends keyof T
93
- ? Exclude<U extends any ? U[K & keyof U] : never, undefined> | T[K]
94
- : U extends any
95
- ? U[K & keyof U]
96
- : never;
97
- }
98
- : T & U;
99
- type Simplify<T> = T extends any
100
- ? {
101
- [K in keyof T]: T[K];
102
- }
103
- : T;
83
+ })]: K extends keyof T ? Exclude<U extends any ? U[K & keyof U] : never, undefined> | T[K] : U extends any ? U[K & keyof U] : never;
84
+ } : T & U;
85
+ type Simplify<T> = T extends any ? {
86
+ [K in keyof T]: T[K];
87
+ } : T;
104
88
  type _MergeProps<T extends unknown[], Curr = {}> = T extends [
105
- infer Next | (() => infer Next),
106
- ...infer Rest
107
- ]
108
- ? _MergeProps<Rest, Override<Curr, Next>>
109
- : T extends [...infer Rest, infer Next | (() => infer Next)]
110
- ? Override<_MergeProps<Rest, Curr>, Next>
111
- : T extends []
112
- ? Curr
113
- : T extends (infer I | (() => infer I))[]
114
- ? OverrideSpread<Curr, I>
115
- : Curr;
89
+ infer Next | (() => infer Next),
90
+ ...infer Rest
91
+ ] ? _MergeProps<Rest, Override<Curr, Next>> : T extends [...infer Rest, infer Next | (() => infer Next)] ? Override<_MergeProps<Rest, Curr>, Next> : T extends [] ? Curr : T extends (infer I | (() => infer I))[] ? OverrideSpread<Curr, I> : Curr;
116
92
  export type MergeProps<T extends unknown[]> = Simplify<_MergeProps<T>>;
117
93
  export declare function mergeProps<T extends unknown[]>(...sources: T): MergeProps<T>;
118
94
  export type SplitProps<T, K extends (readonly (keyof T)[])[]> = [
119
- ...{
120
- [P in keyof K]: P extends `${number}`
121
- ? Pick<T, Extract<K[P], readonly (keyof T)[]>[number]>
122
- : never;
123
- },
124
- Omit<T, K[number][number]>
95
+ ...{
96
+ [P in keyof K]: P extends `${number}` ? Pick<T, Extract<K[P], readonly (keyof T)[]>[number]> : never;
97
+ },
98
+ Omit<T, K[number][number]>
125
99
  ];
126
- export declare function splitProps<
127
- T extends Record<any, any>,
128
- K extends [readonly (keyof T)[], ...(readonly (keyof T)[])[]]
129
- >(props: T, ...keys: K): SplitProps<T, K>;
130
- export declare function lazy<T extends Component<any>>(
131
- fn: () => Promise<{
100
+ export declare function splitProps<T extends Record<any, any>, K extends [readonly (keyof T)[], ...(readonly (keyof T)[])[]]>(props: T, ...keys: K): SplitProps<T, K>;
101
+ export declare function lazy<T extends Component<any>>(fn: () => Promise<{
132
102
  default: T;
133
- }>
134
- ): T & {
135
- preload: () => Promise<{
136
- default: T;
137
- }>;
103
+ }>): T & {
104
+ preload: () => Promise<{
105
+ default: T;
106
+ }>;
138
107
  };
139
108
  export declare function createUniqueId(): string;
140
109
  export {};
@@ -14,9 +14,9 @@ import type { JSX } from "../jsx.js";
14
14
  * @description https://www.solidjs.com/docs/latest/api#for
15
15
  */
16
16
  export declare function For<T extends readonly any[], U extends JSX.Element>(props: {
17
- each: T | undefined | null | false;
18
- fallback?: JSX.Element;
19
- children: (item: T[number], index: Accessor<number>) => U;
17
+ each: T | undefined | null | false;
18
+ fallback?: JSX.Element;
19
+ children: (item: T[number], index: Accessor<number>) => U;
20
20
  }): JSX.Element;
21
21
  /**
22
22
  * Non-keyed iteration over a list creating elements from its items
@@ -32,32 +32,26 @@ export declare function For<T extends readonly any[], U extends JSX.Element>(pro
32
32
  * @description https://www.solidjs.com/docs/latest/api#index
33
33
  */
34
34
  export declare function Index<T extends readonly any[], U extends JSX.Element>(props: {
35
- each: T | undefined | null | false;
36
- fallback?: JSX.Element;
37
- children: (item: Accessor<T[number]>, index: number) => U;
35
+ each: T | undefined | null | false;
36
+ fallback?: JSX.Element;
37
+ children: (item: Accessor<T[number]>, index: number) => U;
38
38
  }): JSX.Element;
39
39
  type RequiredParameter<T> = T extends () => unknown ? never : T;
40
40
  /**
41
41
  * Conditionally render its children or an optional fallback component
42
42
  * @description https://www.solidjs.com/docs/latest/api#show
43
43
  */
44
- export declare function Show<
45
- T,
46
- TRenderFunction extends (item: Accessor<NonNullable<T>>) => JSX.Element
47
- >(props: {
48
- when: T | undefined | null | false;
49
- keyed?: false;
50
- fallback?: JSX.Element;
51
- children: JSX.Element | RequiredParameter<TRenderFunction>;
44
+ export declare function Show<T, TRenderFunction extends (item: Accessor<NonNullable<T>>) => JSX.Element>(props: {
45
+ when: T | undefined | null | false;
46
+ keyed?: false;
47
+ fallback?: JSX.Element;
48
+ children: JSX.Element | RequiredParameter<TRenderFunction>;
52
49
  }): JSX.Element;
53
- export declare function Show<
54
- T,
55
- TRenderFunction extends (item: NonNullable<T>) => JSX.Element
56
- >(props: {
57
- when: T | undefined | null | false;
58
- keyed: true;
59
- fallback?: JSX.Element;
60
- children: JSX.Element | RequiredParameter<TRenderFunction>;
50
+ export declare function Show<T, TRenderFunction extends (item: NonNullable<T>) => JSX.Element>(props: {
51
+ when: T | undefined | null | false;
52
+ keyed: true;
53
+ fallback?: JSX.Element;
54
+ children: JSX.Element | RequiredParameter<TRenderFunction>;
61
55
  }): JSX.Element;
62
56
  /**
63
57
  * switches between content based on mutually exclusive conditions
@@ -74,13 +68,13 @@ export declare function Show<
74
68
  * @description https://www.solidjs.com/docs/latest/api#switchmatch
75
69
  */
76
70
  export declare function Switch(props: {
77
- fallback?: JSX.Element;
78
- children: JSX.Element;
71
+ fallback?: JSX.Element;
72
+ children: JSX.Element;
79
73
  }): JSX.Element;
80
74
  export type MatchProps<T> = {
81
- when: T | undefined | null | false;
82
- keyed?: boolean;
83
- children: JSX.Element | ((item: NonNullable<T> | Accessor<NonNullable<T>>) => JSX.Element);
75
+ when: T | undefined | null | false;
76
+ keyed?: boolean;
77
+ children: JSX.Element | ((item: NonNullable<T> | Accessor<NonNullable<T>>) => JSX.Element);
84
78
  };
85
79
  /**
86
80
  * selects a content based on condition when inside a `<Switch>` control flow
@@ -91,21 +85,15 @@ export type MatchProps<T> = {
91
85
  * ```
92
86
  * @description https://www.solidjs.com/docs/latest/api#switchmatch
93
87
  */
94
- export declare function Match<
95
- T,
96
- TRenderFunction extends (item: Accessor<NonNullable<T>>) => JSX.Element
97
- >(props: {
98
- when: T | undefined | null | false;
99
- keyed?: false;
100
- children: JSX.Element | RequiredParameter<TRenderFunction>;
88
+ export declare function Match<T, TRenderFunction extends (item: Accessor<NonNullable<T>>) => JSX.Element>(props: {
89
+ when: T | undefined | null | false;
90
+ keyed?: false;
91
+ children: JSX.Element | RequiredParameter<TRenderFunction>;
101
92
  }): JSX.Element;
102
- export declare function Match<
103
- T,
104
- TRenderFunction extends (item: NonNullable<T>) => JSX.Element
105
- >(props: {
106
- when: T | undefined | null | false;
107
- keyed: true;
108
- children: JSX.Element | RequiredParameter<TRenderFunction>;
93
+ export declare function Match<T, TRenderFunction extends (item: NonNullable<T>) => JSX.Element>(props: {
94
+ when: T | undefined | null | false;
95
+ keyed: true;
96
+ children: JSX.Element | RequiredParameter<TRenderFunction>;
109
97
  }): JSX.Element;
110
98
  export declare function resetErrorBoundaries(): void;
111
99
  /**
@@ -124,7 +112,7 @@ export declare function resetErrorBoundaries(): void;
124
112
  * @description https://www.solidjs.com/docs/latest/api#errorboundary
125
113
  */
126
114
  export declare function ErrorBoundary(props: {
127
- fallback: JSX.Element | ((err: any, reset: () => void) => JSX.Element);
128
- children: JSX.Element;
115
+ fallback: JSX.Element | ((err: any, reset: () => void) => JSX.Element);
116
+ children: JSX.Element;
129
117
  }): JSX.Element;
130
118
  export {};
@@ -1,20 +1,20 @@
1
- import { Computation } from "../reactive/signal";
1
+ import { Computation } from "../reactive/signal.js";
2
2
  export type HydrationContext = {
3
- id: string;
4
- count: number;
3
+ id: string;
4
+ count: number;
5
5
  };
6
6
  type SharedConfig = {
7
- context?: HydrationContext;
8
- resources?: {
9
- [key: string]: any;
10
- };
11
- load?: (id: string) => Promise<any> | any;
12
- has?: (id: string) => boolean;
13
- gather?: (key: string) => void;
14
- registry?: Map<string, Element>;
15
- done?: boolean;
16
- count?: number;
17
- effects?: Computation<any, any>[];
7
+ context?: HydrationContext;
8
+ resources?: {
9
+ [key: string]: any;
10
+ };
11
+ load?: (id: string) => Promise<any> | any;
12
+ has?: (id: string) => boolean;
13
+ gather?: (key: string) => void;
14
+ registry?: Map<string, Element>;
15
+ done?: boolean;
16
+ count?: number;
17
+ effects?: Computation<any, any>[];
18
18
  };
19
19
  export declare const sharedConfig: SharedConfig;
20
20
  export declare function setHydrateContext(context?: HydrationContext): void;
@@ -1,57 +1,3 @@
1
- export {
2
- catchError,
3
- createRoot,
4
- createSignal,
5
- createComputed,
6
- createRenderEffect,
7
- createEffect,
8
- createReaction,
9
- createDeferred,
10
- createSelector,
11
- createMemo,
12
- getListener,
13
- onMount,
14
- onCleanup,
15
- onError,
16
- untrack,
17
- batch,
18
- on,
19
- children,
20
- createContext,
21
- useContext,
22
- getOwner,
23
- runWithOwner,
24
- equalFn,
25
- requestCallback,
26
- mapArray,
27
- observable,
28
- from,
29
- $PROXY,
30
- $DEVCOMP,
31
- $TRACK,
32
- DEV,
33
- enableExternalSource
34
- } from "./reactive.js";
35
- export {
36
- mergeProps,
37
- splitProps,
38
- createComponent,
39
- For,
40
- Index,
41
- Show,
42
- Switch,
43
- Match,
44
- ErrorBoundary,
45
- Suspense,
46
- SuspenseList,
47
- createResource,
48
- resetErrorBoundaries,
49
- enableScheduling,
50
- enableHydration,
51
- startTransition,
52
- useTransition,
53
- createUniqueId,
54
- lazy,
55
- sharedConfig
56
- } from "./rendering.js";
1
+ export { catchError, createRoot, createSignal, createComputed, createRenderEffect, createEffect, createReaction, createDeferred, createSelector, createMemo, getListener, onMount, onCleanup, onError, untrack, batch, on, children, createContext, useContext, getOwner, runWithOwner, equalFn, requestCallback, mapArray, indexArray, observable, from, $PROXY, $DEVCOMP, $TRACK, DEV, enableExternalSource } from "./reactive.js";
2
+ export { mergeProps, splitProps, createComponent, For, Index, Show, Switch, Match, ErrorBoundary, Suspense, SuspenseList, createResource, resetErrorBoundaries, enableScheduling, enableHydration, startTransition, useTransition, createUniqueId, lazy, sharedConfig } from "./rendering.js";
57
3
  export type { Component, Resource } from "./rendering.js";
@@ -4,111 +4,87 @@ export declare const $TRACK: unique symbol;
4
4
  export declare const $DEVCOMP: unique symbol;
5
5
  export declare const DEV: undefined;
6
6
  export type Accessor<T> = () => T;
7
- export type Setter<T> = undefined extends T
8
- ? <U extends T>(value?: (U extends Function ? never : U) | ((prev?: T) => U)) => U
9
- : <U extends T>(value: (U extends Function ? never : U) | ((prev: T) => U)) => U;
7
+ export type Setter<T> = undefined extends T ? <U extends T>(value?: (U extends Function ? never : U) | ((prev?: T) => U)) => U : <U extends T>(value: (U extends Function ? never : U) | ((prev: T) => U)) => U;
10
8
  export type Signal<T> = [get: Accessor<T>, set: Setter<T>];
11
9
  export declare function castError(err: unknown): Error;
12
10
  export declare let Owner: Owner | null;
13
11
  interface Owner {
14
- owner: Owner | null;
15
- context: any | null;
16
- owned: Owner[] | null;
17
- cleanups: (() => void)[] | null;
12
+ owner: Owner | null;
13
+ context: any | null;
14
+ owned: Owner[] | null;
15
+ cleanups: (() => void)[] | null;
18
16
  }
19
17
  export declare function createOwner(): Owner;
20
- export declare function createRoot<T>(
21
- fn: (dispose: () => void) => T,
22
- detachedOwner?: typeof Owner
23
- ): T;
24
- export declare function createSignal<T>(
25
- value: T,
26
- options?: {
18
+ export declare function createRoot<T>(fn: (dispose: () => void) => T, detachedOwner?: typeof Owner): T;
19
+ export declare function createSignal<T>(value: T, options?: {
27
20
  equals?: false | ((prev: T, next: T) => boolean);
28
21
  name?: string;
29
- }
30
- ): [get: () => T, set: (v: (T extends Function ? never : T) | ((prev: T) => T)) => T];
22
+ }): [get: () => T, set: (v: (T extends Function ? never : T) | ((prev: T) => T)) => T];
31
23
  export declare function createComputed<T>(fn: (v?: T) => T, value?: T): void;
32
24
  export declare const createRenderEffect: typeof createComputed;
33
25
  export declare function createEffect<T>(fn: (v?: T) => T, value?: T): void;
34
26
  export declare function createReaction(fn: () => void): (fn: () => void) => void;
35
27
  export declare function createMemo<T>(fn: (v?: T) => T, value?: T): () => T;
36
28
  export declare function createDeferred<T>(source: () => T): () => T;
37
- export declare function createSelector<T>(
38
- source: () => T,
39
- fn?: (k: T, value: T) => boolean
40
- ): (k: T) => boolean;
29
+ export declare function createSelector<T>(source: () => T, fn?: (k: T, value: T) => boolean): (k: T) => boolean;
41
30
  export declare function batch<T>(fn: () => T): T;
42
31
  export declare const untrack: typeof batch;
43
- export declare function on<T, U>(
44
- deps: Array<() => T> | (() => T),
45
- fn: (value: Array<T> | T, prev?: Array<T> | T, prevResults?: U) => U,
46
- options?: {
32
+ export declare function on<T, U>(deps: Array<() => T> | (() => T), fn: (value: Array<T> | T, prev?: Array<T> | T, prevResults?: U) => U, options?: {
47
33
  defer?: boolean;
48
- }
49
- ): (prev?: U) => U | undefined;
34
+ }): (prev?: U) => U | undefined;
50
35
  export declare function onMount(fn: () => void): void;
51
36
  export declare function onCleanup(fn: () => void): () => void;
52
37
  export declare function cleanNode(node: Owner): void;
53
38
  export declare function catchError<T>(fn: () => T, handler: (err: Error) => void): T | undefined;
54
39
  export declare function getListener(): null;
55
40
  export interface Context<T> {
56
- id: symbol;
57
- Provider: (props: { value: T; children: any }) => any;
58
- defaultValue?: T;
41
+ id: symbol;
42
+ Provider: (props: {
43
+ value: T;
44
+ children: any;
45
+ }) => any;
46
+ defaultValue?: T;
59
47
  }
60
48
  export declare function createContext<T>(defaultValue?: T): Context<T>;
61
49
  export declare function useContext<T>(context: Context<T>): T;
62
50
  export declare function getOwner(): Owner | null;
63
51
  type ChildrenReturn = Accessor<any> & {
64
- toArray: () => any[];
52
+ toArray: () => any[];
65
53
  };
66
54
  export declare function children(fn: () => any): ChildrenReturn;
67
55
  export declare function runWithOwner<T>(o: typeof Owner, fn: () => T): T | undefined;
68
56
  export interface Task {
69
- id: number;
70
- fn: ((didTimeout: boolean) => void) | null;
71
- startTime: number;
72
- expirationTime: number;
57
+ id: number;
58
+ fn: ((didTimeout: boolean) => void) | null;
59
+ startTime: number;
60
+ expirationTime: number;
73
61
  }
74
- export declare function requestCallback(
75
- fn: () => void,
76
- options?: {
62
+ export declare function requestCallback(fn: () => void, options?: {
77
63
  timeout: number;
78
- }
79
- ): Task;
64
+ }): Task;
80
65
  export declare function cancelCallback(task: Task): void;
81
- export declare function mapArray<T, U>(
82
- list: () => T[],
83
- mapFn: (v: T, i: () => number) => U,
84
- options?: {
85
- fallback?: () => any;
86
- }
87
- ): () => U[];
88
- export type ObservableObserver<T> =
89
- | ((v: T) => void)
90
- | {
91
- next: (v: T) => void;
92
- error?: (v: any) => void;
93
- complete?: (v: boolean) => void;
94
- };
66
+ export declare function mapArray<T, U>(list: Accessor<readonly T[] | undefined | null | false>, mapFn: (v: T, i: Accessor<number>) => U, options?: {
67
+ fallback?: Accessor<any>;
68
+ }): () => U[];
69
+ export declare function indexArray<T, U>(list: Accessor<readonly T[] | undefined | null | false>, mapFn: (v: Accessor<T>, i: number) => U, options?: {
70
+ fallback?: Accessor<any>;
71
+ }): () => U[];
72
+ export type ObservableObserver<T> = ((v: T) => void) | {
73
+ next: (v: T) => void;
74
+ error?: (v: any) => void;
75
+ complete?: (v: boolean) => void;
76
+ };
95
77
  export declare function observable<T>(input: Accessor<T>): {
96
- subscribe(observer: ObservableObserver<T>): {
97
- unsubscribe(): void;
98
- };
99
- [Symbol.observable](): any;
78
+ subscribe(observer: ObservableObserver<T>): {
79
+ unsubscribe(): void;
80
+ };
81
+ [Symbol.observable](): any;
100
82
  };
101
- export declare function from<T>(
102
- producer:
103
- | ((setter: Setter<T>) => () => void)
104
- | {
105
- subscribe: (fn: (v: T) => void) =>
106
- | (() => void)
107
- | {
108
- unsubscribe: () => void;
109
- };
110
- }
111
- ): Accessor<T>;
83
+ export declare function from<T>(producer: ((setter: Setter<T>) => () => void) | {
84
+ subscribe: (fn: (v: T) => void) => (() => void) | {
85
+ unsubscribe: () => void;
86
+ };
87
+ }): Accessor<T>;
112
88
  export declare function enableExternalSource(factory: any): void;
113
89
  /**
114
90
  * @deprecated since version 1.7.0 and will be removed in next major - use catchError instead