Sword/src/components/Authorized/AuthorizedRoute.d.ts

14 lines
395 B
TypeScript
Raw Normal View History

2019-02-13 17:16:39 +08:00
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 class AuthorizedRoute extends React.Component<IAuthorizedRouteProps, any> {}