Skip to content

Commit c51c388

Browse files
committed
🏷️ fix flow type
Signed-off-by: w01fgang <sumin@unix-center.ru>
1 parent 366a6b6 commit c51c388

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "permission-gate",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "A library for handling roles and permissions in large-scale React apps",
55
"main": "./lib/cjs/index.js",
66
"module": "./lib/esm/index.js",

src/index.js.flow

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ type ComponentName = string;
66
export type Rules = {|
77
rulesMap: { [key: ComponentName]: Array<RoleName>, ... },
88
role: RoleName,
9+
validator?: ({ role, rulesMap, name }: Rules & { name: string; }) => boolean,
910
|};
1011

1112
declare type ProviderProps = {|

0 commit comments

Comments
 (0)