@tempots/dom 26.5.0 → 26.7.1
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.
- package/package.json +1 -1
- package/renderable/provider.d.ts +4 -4
package/package.json
CHANGED
package/renderable/provider.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export type ToProviderTypes<T extends unknown[]> = T extends [] ? [] : T extends
|
|
|
9
9
|
* Represents a provider for a specific type `T`.
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
|
-
export type Provider<T, O
|
|
12
|
+
export type Provider<T, O = unknown> = {
|
|
13
13
|
/** The provider mark. */
|
|
14
14
|
mark: ProviderMark<T>;
|
|
15
15
|
/** The function to create the provider. */
|
|
@@ -25,9 +25,9 @@ export type Provider<T, O extends object = object> = {
|
|
|
25
25
|
*/
|
|
26
26
|
export type ProviderOptions = {
|
|
27
27
|
/** The function to use a provider. */
|
|
28
|
-
use: <T, O
|
|
28
|
+
use: <T, O = unknown>(provider: Provider<T, O>) => T;
|
|
29
29
|
/** The function to set a provider. */
|
|
30
|
-
set: <T, O
|
|
30
|
+
set: <T, O = unknown>(provider: Provider<T, O>, options?: O) => void;
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
33
|
* Returns a renderable function that executes the given function with the
|
|
@@ -48,7 +48,7 @@ export declare const WithProvider: (fn: (ctx: ProviderOptions) => TNode | void)
|
|
|
48
48
|
* @param options - The options to pass to the provider.
|
|
49
49
|
* @param child - The child renderable to return.
|
|
50
50
|
*/
|
|
51
|
-
export declare const Provide: <T, O
|
|
51
|
+
export declare const Provide: <T, O>(provider: Provider<T, O>, options: O, child: () => TNode) => Renderable;
|
|
52
52
|
/**
|
|
53
53
|
* Returns a renderable function that uses a provider for the given provider mark and returns a child renderable.
|
|
54
54
|
*
|