> For the complete documentation index, see [llms.txt](https://docs.leather.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.leather.io/developers/overview/typings.md).

# Typings

`@leather.io/rpc` has TypeScript types for the `LeatherProvider` methods: request parameters and results.

```bash
npm install -D @leather.io/rpc
yarn add -D @leather.io/rpc
pnpm add -D @leather.io/rpc
```

The package does not change the global scope. Import the `LeatherProvider` type and declare it on `Window` yourself:

```typescript
import type { LeatherProvider } from '@leather.io/rpc';

declare global {
  interface Window {
    LeatherProvider?: LeatherProvider;
  }
}
```

`window.LeatherProvider.request` is then typed per method.

Source: the [`@leather.io/rpc` README](https://github.com/leather-io/mono/blob/1e05e52d5cd8a8ccfad9d56b5ae86de9f7baf631/packages/rpc/README.md) in leather-io/mono at `1e05e52d5cd8a8ccfad9d56b5ae86de9f7baf631` (package version 2.25.4).
