@faasjs/react 3.4.0 → 3.5.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/dist/index.d.mts CHANGED
@@ -107,8 +107,8 @@ declare function createSplittingContext<T extends Record<string, any>>(defaultVa
107
107
  * The provider component of the splitting context.
108
108
  * @see https://faasjs.com/doc/react/functions/createSplittingContext.html#provider
109
109
  */
110
- Provider(props: {
111
- value?: Partial<T>;
110
+ Provider<NewT extends T = T>(props: {
111
+ value?: NewT;
112
112
  children: ReactNode;
113
113
  memo?: true | any[];
114
114
  }): ReactNode;
@@ -117,7 +117,7 @@ declare function createSplittingContext<T extends Record<string, any>>(defaultVa
117
117
  *
118
118
  * @see https://faasjs.com/doc/react/functions/createSplittingContext.html#use
119
119
  */
120
- use: () => Readonly<T>;
120
+ use: <NewT extends T = T>() => Readonly<NewT>;
121
121
  };
122
122
 
123
123
  /**
package/dist/index.d.ts CHANGED
@@ -107,8 +107,8 @@ declare function createSplittingContext<T extends Record<string, any>>(defaultVa
107
107
  * The provider component of the splitting context.
108
108
  * @see https://faasjs.com/doc/react/functions/createSplittingContext.html#provider
109
109
  */
110
- Provider(props: {
111
- value?: Partial<T>;
110
+ Provider<NewT extends T = T>(props: {
111
+ value?: NewT;
112
112
  children: ReactNode;
113
113
  memo?: true | any[];
114
114
  }): ReactNode;
@@ -117,7 +117,7 @@ declare function createSplittingContext<T extends Record<string, any>>(defaultVa
117
117
  *
118
118
  * @see https://faasjs.com/doc/react/functions/createSplittingContext.html#use
119
119
  */
120
- use: () => Readonly<T>;
120
+ use: <NewT extends T = T>() => Readonly<NewT>;
121
121
  };
122
122
 
123
123
  /**
package/dist/index.js CHANGED
@@ -87,7 +87,7 @@ function createSplittingContext(defaultValue) {
87
87
  function Provider(props) {
88
88
  let children = props.memo ? useEqualMemo(
89
89
  () => props.children,
90
- typeof props.memo === "boolean" ? [] : props.memo
90
+ props.memo === true ? [] : props.memo
91
91
  ) : props.children;
92
92
  for (const key of keys) {
93
93
  const Context = contexts[key];
package/dist/index.mjs CHANGED
@@ -85,7 +85,7 @@ function createSplittingContext(defaultValue) {
85
85
  function Provider(props) {
86
86
  let children = props.memo ? useEqualMemo(
87
87
  () => props.children,
88
- typeof props.memo === "boolean" ? [] : props.memo
88
+ props.memo === true ? [] : props.memo
89
89
  ) : props.children;
90
90
  for (const key of keys) {
91
91
  const Context = contexts[key];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/react",
3
- "version": "3.4.0",
3
+ "version": "3.5.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -35,12 +35,12 @@
35
35
  ],
36
36
  "peerDependencies": {
37
37
  "react": "*",
38
- "@faasjs/browser": "3.4.0"
38
+ "@faasjs/browser": "3.5.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/react": "*",
42
42
  "react": "*",
43
- "@faasjs/browser": "3.4.0"
43
+ "@faasjs/browser": "3.5.1"
44
44
  },
45
45
  "engines": {
46
46
  "node": ">=22.0.0",