Based on the comment https://stackoverflow.com/users/2225281/aaron it seems you can do it, but it's a little dumb using the definitions from Types. Maybe someone can expand this to improve or have a better idea, but this is what I still assumed inside the routes.tsx file or the like:
//Create a type to limit duplication and help w/refactoring type Header = string; //Interface for the injected props. Used by component via 'this.props.route.header' export interface HeaderRouteInjectedProps extends IInjectedProps { route?: IRoute & { header: Header } } //Interface and class to create a new Route type 'HeaderRoute' that requires a header property interface HeaderRouteProps extends IRouteProps { header: Header } class HeaderRoute extends React.Component<HeaderRouteProps, {}> { }
TS Wannabe
source share