@shopify/polaris-types
v1.0.1
Published
Type definitions for [Polaris web components](https://shopify.dev/docs/api/app-home/polaris-web-components).
Keywords
Readme
@shopify/polaris-types
Type definitions for Polaris web components.
Installation
Add the types package as a dev dependency:
npm i -D @shopify/polaris-typesUsage
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
{
"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:
/// <reference types="@shopify/polaris-types" />