# @types/rrc

> TypeScript definitions for rrc

Latest version **0.10.13** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/rrc
pnpm add @types/rrc
yarn add @types/rrc
bun add @types/rrc
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.10.13 |
| Published | 2023-11-07 |
| First published | 2017-06-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51449 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/rrc
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rrc
- npm.io page: https://npm.io/package/@types/rrc

## Dependencies (3)

- [@types/react](https://npm.io/package/@types/react.md) *
- [@types/history](https://npm.io/package/@types/history.md) ^4.7.11
- [@types/react-router-dom](https://npm.io/package/@types/react-router-dom.md) ^5.3.0

## Recent versions

- 0.10.13 (latest) — 2023-11-07
- 0.10.10 (ts4.3) — 2023-04-05
- 0.10.9 (ts3.9) — 2022-03-29
- 0.10.8 (ts3.8) — 2022-01-18
- 0.10.7 (ts3.7) — 2021-10-15
- 0.10.6 (ts3.6) — 2021-07-08
- 0.10.5 (ts2.8) — 2018-05-31
- 0.10.4 (ts2.6) — 2018-02-12
- 0.10.3 (ts2.4) — 2017-11-27
- 0.10.2 (ts2.3) — 2017-07-10
- 0.10.0 (ts2.0) — 2017-06-07
- 0.10.12 — 2023-10-18
- 0.10.11 — 2023-09-27
- 0.10.1 — 2017-06-23

## README

# Installation
> `npm install --save @types/rrc`

# Summary
This package contains type definitions for rrc (https://github.com/pshrmn/rrc#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rrc.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/rrc/index.d.ts)
````ts
import * as H from "history";
import * as React from "react";
import { match as MatchObject, RouteComponentProps, RouteProps } from "react-router-dom";

export interface ScrollIntoViewProps {
    alignToTop?: boolean | undefined;
    children?: React.ReactNode;
    id: string;
}

export class ScrollIntoView extends React.Component<ScrollIntoViewProps> {}

export type PropIdCallback = () => string;

export interface WithScrollOptions {
    propId?: PropIdCallback | undefined;
    alignToTop?: boolean | undefined;
}

export type ComponentConstructor<Props> = React.ComponentType<Props>;

export function withScroll(
    component: ComponentConstructor<RouteComponentProps<any> | {}>,
    options?: WithScrollOptions,
): ComponentConstructor<RouteComponentProps<any> | {}>;

export type RouteConfiguration = RouteProps & { inject?: { [key: string]: any } | undefined };

export interface SwitchProps {
    routes: RouteConfiguration[];
    location: H.LocationDescriptorObject & { pathname: H.Pathname };
}

export class ConfigSwitch extends React.Component<SwitchProps> {}

export type OnUpdateCall = (location: H.Location) => void;

export interface OnUpdateProps {
    call: OnUpdateCall;
    immediate?: boolean | undefined;
}

export class OnUpdate extends React.Component<OnUpdateProps> {}

export type IsActiveCallback = () => boolean;

export interface WhenActiveOptions {
    exact?: boolean | undefined;
    strict?: boolean | undefined;
    pathProp?: string | undefined;
    className?: string | undefined;
    style?: React.CSSProperties | undefined;
    isActive?: IsActiveCallback | undefined;
}

export type WhenActiveReturnType<Props> = (component: ComponentConstructor<Props>) => ComponentConstructor<Props>;

export function whenActive<Props>(options?: WhenActiveOptions): WhenActiveReturnType<Props>;

export interface StatusProps {
    code: string;
}

export class Status extends React.Component<StatusProps> {}

export type GetKeyFunction<Params extends { [K in keyof Params]?: string } = {}> = (
    match: MatchObject<Params>,
    route: RouteConfiguration,
    location: H.Location,
) => string;

export interface WrapSwitchProps<Params extends { [K in keyof Params]?: string } = {}> extends SwitchProps {
    getKey?: GetKeyFunction<Params> | undefined;
}

export function wrapSwitch<WrapperProps, Params extends { [K in keyof Params]?: string } = {}>(
    Wrapper: ComponentConstructor<WrapperProps>,
): ComponentConstructor<WrapSwitchProps<Params> & WrapperProps>;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: [@types/history](https://npmjs.com/package/@types/history), [@types/react](https://npmjs.com/package/@types/react), [@types/react-router-dom](https://npmjs.com/package/@types/react-router-dom)

# Credits
These definitions were written by [Deividas Bakanas](https://github.com/DeividasBakanas).

---
_Source: https://npm.io/package/@types/rrc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
