@shopify/polaris-types 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +33 -0
  2. package/dist/polaris.d.ts +6377 -0
  3. package/package.json +31 -0
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # @shopify/polaris-types
2
+
3
+ Type definitions for App Bridge UI.
4
+
5
+ ## Installation
6
+
7
+ Add the types package as a dev dependency:
8
+
9
+ ```bash
10
+ npm i -D @shopify/polaris-types
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Since App Bridge UI is not imported directly, you need to add the types to your TypeScript configuration in one of the following ways:
16
+
17
+ ### Method 1: Add to tsconfig.json
18
+
19
+ ```json
20
+ {
21
+ "compilerOptions": {
22
+ "types": ["@shopify/polaris-types"]
23
+ }
24
+ }
25
+ ```
26
+
27
+ ### Method 2: Add as a triple-slash reference
28
+
29
+ Add the following line at the top of your TypeScript files where you need the types:
30
+
31
+ ```typescript
32
+ /// <reference types="@shopify/polaris-types" />
33
+ ```