Skip to content

Commit

Permalink
updating types
Browse files Browse the repository at this point in the history
  • Loading branch information
jgowdyelastic committed Jul 1, 2020
1 parent dfacbb2 commit f81d37f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ function disableAdminPrivileges(capabilities: MlCapabilities) {
capabilities.canDeleteAnnotation = false;
}

export type HasMlCapabilities = (capabilities: MlCapabilitiesKey[]) => void;
export type HasMlCapabilities = (capabilities: MlCapabilitiesKey[]) => Promise<void>;

export function hasMlCapabilitiesProvider(resolveMlCapabilities: ResolveMlCapabilities) {
return (request: KibanaRequest) => {
return (request: KibanaRequest): HasMlCapabilities => {
return async (capabilities: MlCapabilitiesKey[]) => {
const mlCapabilities = await resolveMlCapabilities(request);
if (mlCapabilities === null) {
Expand Down

0 comments on commit f81d37f

Please sign in to comment.