chayns-api 1.1.0-4 → 1.1.0-5

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.
@@ -37,7 +37,8 @@ const withHydrationBoundary = (Component, initializer, useHydrationId) => {
37
37
  }
38
38
  value[id] = {
39
39
  getState: s.getState,
40
- abort: s.abort
40
+ abort: s.abort,
41
+ type: s.type
41
42
  };
42
43
  }
43
44
  return s;
@@ -30,7 +30,8 @@ const withHydrationBoundary = (Component, initializer, useHydrationId) => {
30
30
  }
31
31
  value[id] = {
32
32
  getState: s.getState,
33
- abort: s.abort
33
+ abort: s.abort,
34
+ type: s.type
34
35
  };
35
36
  }
36
37
  return s;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  type StoreLikeValue = object & {
3
3
  getState: () => object;
4
4
  abort?: () => Promise<void>;
5
+ type?: 'raw' | 'json';
5
6
  };
6
7
  type HydrationComponent = React.FC<{
7
8
  value: StoreLikeValue;
@@ -9,7 +10,7 @@ type HydrationComponent = React.FC<{
9
10
  }>;
10
11
  type Initializer = (initialValue: object | undefined) => StoreLikeValue;
11
12
  type HydrationBoundary = React.FC<{
12
- id: string;
13
+ id?: string;
13
14
  children?: React.ReactNode;
14
15
  }>;
15
16
  declare const withHydrationBoundary: (Component: HydrationComponent, initializer: Initializer, useHydrationId: undefined | (() => string)) => HydrationBoundary;
@@ -3,6 +3,7 @@ export type HydrationContextValueType = {
3
3
  [key: string]: {
4
4
  getState: () => object;
5
5
  abort?: () => Promise<void>;
6
+ type?: 'raw' | 'json';
6
7
  };
7
8
  };
8
9
  export declare let HydrationContext: React.Context<HydrationContextValueType>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "1.1.0-4",
3
+ "version": "1.1.0-5",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",