From 7e1a49f0b06650995db4e7c6c3dbc466aa5c50c2 Mon Sep 17 00:00:00 2001 From: Gaetan SENN Date: Mon, 4 Jun 2018 18:19:29 +0200 Subject: [PATCH] imperium: Fix typescript errors --- types/imperium/index.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/types/imperium/index.d.ts b/types/imperium/index.d.ts index d3f4205c05..67eace244e 100644 --- a/types/imperium/index.d.ts +++ b/types/imperium/index.d.ts @@ -8,11 +8,11 @@ import express = require('express'); -type GetAcl = (req: express.Request) => Promise | Promise; -type Actions = string[] | string; -type Context = Array<'params' | 'query' | 'headers' | 'body'>; +export type GetAcl = (req: express.Request) => Promise | Promise; +export type Actions = string[] | string; +export type Context = Array<'params' | 'query' | 'headers' | 'body'>; // Can contain when key that is evaluated during route action -interface RoleParams { +export interface RoleParams { [key: string]: string; } @@ -62,16 +62,16 @@ export class Imperium { evaluateUserAction(action: RoleParams, context: { [key: string]: string[] }): { [key: string]: string[] }; } -interface Roles { +export interface Roles { [key: string]: RoleActions; } -interface RoleActions { +export interface RoleActions { actions: Action[]; getAcl?: GetAcl; } -interface Action { +export interface Action { action: string; [key: string]: string; }