@faasjs/react 0.0.3-beta.32 → 0.0.3-beta.33

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 (2) hide show
  1. package/dist/index.d.ts +6 -6
  2. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ export { FaasAction, FaasData, FaasParams } from '@faasjs/types';
6
6
  /**
7
7
  * Injects FaasData props.
8
8
  */
9
- type FaasDataInjection<Data = any> = {
9
+ interface FaasDataInjection<Data = any> {
10
10
  action: string | any;
11
11
  params: Record<string, any>;
12
12
  loading: boolean;
@@ -18,8 +18,8 @@ type FaasDataInjection<Data = any> = {
18
18
  setLoading: React.Dispatch<React.SetStateAction<boolean>>;
19
19
  setPromise: React.Dispatch<React.SetStateAction<Promise<Response<Data>>>>;
20
20
  setError: React.Dispatch<React.SetStateAction<any>>;
21
- };
22
- type FaasDataWrapperProps<PathOrData extends FaasAction> = {
21
+ }
22
+ interface FaasDataWrapperProps<PathOrData extends FaasAction> {
23
23
  render?(args: FaasDataInjection<FaasData<PathOrData>>): JSX.Element | JSX.Element[];
24
24
  children?: JSX.Element;
25
25
  fallback?: JSX.Element | false;
@@ -30,8 +30,8 @@ type FaasDataWrapperProps<PathOrData extends FaasAction> = {
30
30
  data?: FaasData<PathOrData>;
31
31
  /** use custom setData, should work with data */
32
32
  setData?: React.Dispatch<React.SetStateAction<FaasData<PathOrData>>>;
33
- };
34
- type FaasReactClientInstance = {
33
+ }
34
+ interface FaasReactClientInstance {
35
35
  faas: <PathOrData extends FaasAction>(action: string | PathOrData, params: FaasParams<PathOrData>) => Promise<Response<FaasData<PathOrData>>>;
36
36
  useFaas: <PathOrData extends FaasAction>(action: string | PathOrData, defaultParams: FaasParams<PathOrData>, options?: {
37
37
  data?: FaasData<PathOrData>;
@@ -39,7 +39,7 @@ type FaasReactClientInstance = {
39
39
  skip?: boolean;
40
40
  }) => FaasDataInjection<FaasData<PathOrData>>;
41
41
  FaasDataWrapper<PathOrData extends FaasAction>(props: FaasDataWrapperProps<PathOrData>): JSX.Element;
42
- };
42
+ }
43
43
  /**
44
44
  * Before use faas, you should initialize a FaasReactClient.
45
45
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/react",
3
- "version": "0.0.3-beta.32",
3
+ "version": "0.0.3-beta.33",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -23,8 +23,8 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "@faasjs/browser": "^0.0.3-beta.32",
27
- "@faasjs/types": "^0.0.3-beta.32",
26
+ "@faasjs/browser": "^0.0.3-beta.33",
27
+ "@faasjs/types": "^0.0.3-beta.33",
28
28
  "react": "*"
29
29
  },
30
30
  "devDependencies": {