mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 14:38:20 +08:00
role type
This commit is contained in:
4
types/rbac-a/index.d.ts
vendored
4
types/rbac-a/index.d.ts
vendored
@@ -40,7 +40,7 @@ export class Provider {
|
||||
* The method mey return a promise resolving with the
|
||||
* expected return value.
|
||||
*/
|
||||
getPermission(role: any): string[] | Promise<string[]>;
|
||||
getPermission(role: string): string[] | Promise<string[]>;
|
||||
/**
|
||||
* Return all attributes for the specified role. The return value must
|
||||
* be an array. Return an empty array if role is missing or if no
|
||||
@@ -49,7 +49,7 @@ export class Provider {
|
||||
* The method mey return a promise resolving with the
|
||||
* expected return value.
|
||||
*/
|
||||
getAttributes(role: any): string[] | Promise<string[]>;
|
||||
getAttributes(role: string): string[] | Promise<string[]>;
|
||||
}
|
||||
|
||||
export type AttributeFunction = (user: any, role: string, params: object) => any;
|
||||
|
||||
Reference in New Issue
Block a user