question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RoleManager interface return type

See original GitHub issue

I see that the return type of function signature in interface RoleManager are not async value. In fact, all functions related to IO operation in JavaScript should be async, for example:

getRoles(name: string, ...domain: string[]): string[]; Perhaps it will query database So it should be

getRoles(name: string, ...domain: string[]): Promise<string[]>

for compatibility, maybe it can be getRoles(name: string, ...domain: string[]): Promise<string[]> | string[]

thoughts?

@nodece @hsluoyz

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:20 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
nodececommented, Apr 29, 2019

@sbutler @dreamdevil00 Hi, we has been publish a beta version to npm, call yarn add casbin@beta install it.

0reactions
nodececommented, Apr 27, 2019

@sbutler plan added, next major version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

oracle.iam.rm.inherent.role Interface RoleManager
Returns a String that is the SOC hierarchy type associated with the role, or null if the role does not have an SOC...
Read more >
RoleManager<TRole> Class (Microsoft.AspNetCore.Identity)
Gets a flag indicating whether the underlying persistence store supports returning an IQueryable collection of roles. SupportsRoleClaims. Gets a flag indicating ...
Read more >
Interface Implementation with generic type - Stack Overflow
IRepository<T> , T in RoleManager only one type,. first way, change IRoleRepository public interface IRoleRepository<TResult, TUser, ...
Read more >
casbin/role_manager.go at master - GitHub
return names. } // RoleManagerImpl provides a default implementation for the RoleManager interface. type RoleManagerImpl struct {. allRoles *sync.Map.
Read more >
ProjectRoleManager (Atlassian JIRA 7.0.3 API)
Modifier and Type, Interface and Description. static class, ProjectRoleManager. ... This method will return the default role actors for a ProjectRole.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found