open-index/open-npm huggingface dataset:
npm package: @shopify/polaris-types
Description: Type definitions for [Polaris web components](https://shopify.dev/docs/api/app-home/polaris-web-components).
Latest version: 1.0.5

# @shopify/polaris-types

Type definitions for [Polaris web components](https://shopify.dev/docs/api/app-home/polaris-web-components).

## Installation

Add the types package as a dev dependency:

```bash
npm i -D @shopify/polaris-types
```

## Usage

Since Polaris web components are not imported directly, you need to add the types to your TypeScript configuration in one of the following ways:

### Method 1: Add to tsconfig.json

```json
{
  "compilerOptions": {
    "types": ["@shopify/polaris-types"]
  }
}
```

### Method 2: Add as a triple-slash reference

Add the following line at the top of your TypeScript files where you need the types:

```typescript
/// <reference types="@shopify/polaris-types" />
```