Skip to content

Commit 0613190

Browse files
committed
Fix: NPM error on package install #1
1 parent 93dca22 commit 0613190

File tree

8 files changed

+224
-4
lines changed

8 files changed

+224
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ React's Own Hands Touching State The Easiest Way!
2424
- Done: Set development environment for compiling and packaging
2525
- Done: Test package installation and usage locally before publishing to npm!
2626
- Done: published first beta version, via Js Kampala Open Source!
27+
28+
## React Hands, 31-Mar-2023 (v1.0.1)
29+
30+
- Fixing: NPM error on package install!

dist/index.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import * as React from 'react';
2+
export type $State = Record<string, any>;
3+
export type $Action = {
4+
type: string;
5+
payload?: unknown;
6+
};
7+
export type $Actions = Record<string, (state: $State, action: $Action) => $State>;
8+
export type $Middleware = (store: $Store) => (next: $Dispatch) => $Dispatch;
9+
export type $Store = {
10+
state: $State;
11+
dispatch: $Dispatch;
12+
};
13+
export type $Dispatch = (action: $Action) => void;
14+
type StoreType = {
15+
StoreProvider: React.FC<{
16+
children: React.ReactNode;
17+
}>;
18+
useStore: () => [$State, $Dispatch];
19+
};
20+
export declare function reactState(initialState?: $State, actions?: $Actions, middlewares?: $Middleware[]): StoreType;
21+
export {};

dist/index.js

Lines changed: 83 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react-hands.d.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import * as React from 'react';
2+
export type $State = Record<string, any>;
3+
export type $Action = {
4+
type: string;
5+
payload?: unknown;
6+
};
7+
export type $Actions = Record<string, (state: $State, action: $Action) => $State>;
8+
export type $Middleware = (store: $Store) => (next: $Dispatch) => $Dispatch;
9+
export type $Store = {
10+
state: $State;
11+
dispatch: $Dispatch;
12+
};
13+
export type $Dispatch = (action: $Action) => void;
14+
type StoreType = {
15+
StoreProvider: React.FC<{
16+
children: React.ReactNode;
17+
}>;
18+
useStore: () => [$State, $Dispatch];
19+
};
20+
export declare function reactState(initialState?: $State, actions?: $Actions, middlewares?: $Middleware[]): StoreType;
21+
export {};

dist/react-hands.js

Lines changed: 83 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react-hands.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
{
22
"name": "react-hands",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "React's Own Hands Touching State The Easiest Way!",
5-
"main": "dist/index.js",
6-
"module": "dist/index.mjs",
7-
"types": "dist/index.d.ts",
5+
"main": "./dist/index.js",
6+
"module": "./dist/index.mjs",
7+
"types": "./dist/index.d.ts",
8+
"exports": {
9+
".": {
10+
"import": "./dist/index.mjs",
11+
"require": "./dist/index.js"
12+
}
13+
},
814
"scripts": {
915
"test": "test",
1016
"build": "npx tsc"

0 commit comments

Comments
 (0)