Files
backend/admin-web/src/components/Authorized/AuthorizedRoute.d.ts
2019-02-27 11:06:55 +08:00

14 lines
403 B
TypeScript

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> {}