solid-ctrl-flow 1.0.14 → 1.0.16

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/dist/index.d.ts CHANGED
@@ -82,12 +82,12 @@ export declare function createExtractor(name?: string): {
82
82
  * @param def Default value to set when calling the provider without one
83
83
  * @param name Name to give to the context
84
84
  */
85
- export declare function createOption<T>(init: NonNullable<T>, def?: NonNullable<T>, name?: string): ((props: {
85
+ export declare function createOption<T>(init: T, def?: T, name?: string): ((props: {
86
86
  value?: T;
87
87
  children: JSX.Element;
88
88
  }) => JSX.Element) & {
89
89
  /** Returns the {@link Accessor} for the value in the current context */
90
- read: Accessor<NonNullable<T>>;
90
+ read: Accessor<T>;
91
91
  };
92
92
 
93
93
  /** Creates a scope for the value of {@link Debug.read}, which allows you to display different things in debug mode */
@@ -120,7 +120,7 @@ export declare function memoProps<T, K extends readonly (keyof T)[] = (keyof T)[
120
120
  * @param f The function to run
121
121
  * @returns The same thing {@link f} returned
122
122
  */
123
- export declare function runWithContext<T, R>(ctx: Context<T>, value: T, f: (x: T) => R): Promise<R>;
123
+ export declare function runWithContext<T, R>(ctx: Context<T>, value: T, f: (x: T) => R): R;
124
124
 
125
125
  /**
126
126
  * Esecutes {@link splitProps} and memoizes the first of the two returned objects
package/dist/index.mjs CHANGED
@@ -33,7 +33,7 @@ function createOption(init, def = init, name) {
33
33
  return provider;
34
34
  }
35
35
  function runWithContext(ctx2, value, f) {
36
- return createRoot(async (d) => {
36
+ return createRoot((d) => {
37
37
  try {
38
38
  getOwner().context = {
39
39
  [ctx2.id]: value
package/dist/index.umd.js CHANGED
@@ -35,7 +35,7 @@
35
35
  return provider;
36
36
  }
37
37
  function runWithContext(ctx2, value, f) {
38
- return solidJs.createRoot(async (d) => {
38
+ return solidJs.createRoot((d) => {
39
39
  try {
40
40
  solidJs.getOwner().context = {
41
41
  [ctx2.id]: value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solid-ctrl-flow",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "Control flow components for solid-js",
5
5
  "author": "AFatNiBBa",
6
6
  "license": "ISC",