AuthorizedRoute.d.ts 403 Bytes
Newer Older
ι™ˆεΈ…'s avatar
ι™ˆεΈ… committed
1 2 3 4 5 6 7 8 9 10 11 12
import * as React from 'react';
import { RouteProps } from 'react-router';

type authorityFN = (currentAuthority?: string) => boolean;

type authority = string | string[] | authorityFN | Promise<any>;

export interface IAuthorizedRouteProps extends RouteProps {
  authority: authority;
}
export { authority };

vellengs's avatar
vellengs committed
13
export default class AuthorizedRoute extends React.Component<IAuthorizedRouteProps, any> {}