Skip to content

Commit

Permalink
Merge pull request #36 from triyanox/fix/remove-method-input-type
Browse files Browse the repository at this point in the history
Update the role.remove input type
  • Loading branch information
triyanox authored Jul 25, 2023
2 parents e9f21ad + eb6f3b1 commit 1081529
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 2 deletions.
56 changes: 56 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/core/lib/role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ class Role<T extends TRoleOptions> implements IRole<T> {
)
});
}

public remove<S extends string>(options: removeOptions<S>) {
// eslint-disable-next-line @typescript-eslint/ban-types
public remove<S extends keyof this['permissions'] & (string & {})>(options: removeOptions<S>) {
const { resource, mutate } = options;
if (mutate) {
delete this.config[resource];
Expand Down

0 comments on commit 1081529

Please sign in to comment.