import { Handler } from 'express'

declare interface GuardOptions {
  requestProperty?: string
  permissionsProperty?: string
}

declare class Guard {
  public constructor(options: GuardOptions);

  public check(required: string | string[]): Handler;
}

declare function guardFactory(options: GuardOptions): Guard;

export = guardFactory;

import { Handler } from 'express'

declare interface GuardOptions {
  requestProperty?: string
  permissionsProperty?: string
}

declare class Guard {
  public constructor(options: GuardOptions);

  public check(required: string | string[] | string[][]): Handler;
}

declare function guardFactory(options: GuardOptions): Guard;

export = guardFactory;

Support "OR" query in the types
Support "OR" query in the types

Example: `j.check([['role1'], ['role2']])`