AuthorizedRoute.d.ts 403 Bytes
Newer Older
sin's avatar
sin committed
1 2 3 4 5 6 7 8 9 10 11 12 13
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 };

export default class AuthorizedRoute extends React.Component<IAuthorizedRouteProps, any> {}