1 | ## @0x/types
|
2 |
|
3 | TypeScript types shared across 0x projects and packages
|
4 |
|
5 | ## Installation
|
6 |
|
7 | ```bash
|
8 | yarn add -D @0x/types
|
9 | ```
|
10 |
|
11 | If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
|
12 |
|
13 | ```json
|
14 | "compilerOptions": {
|
15 | "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
|
16 | }
|
17 | ```
|
18 |
|
19 | ## Usage
|
20 |
|
21 | ```javascript
|
22 | import { TransactionReceipt, TxData, TxDataPayable } from '@0x/types';
|
23 | ```
|
24 |
|
25 | ## Contributing
|
26 |
|
27 | We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.
|
28 |
|
29 | Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.
|
30 |
|
31 | ### Install dependencies
|
32 |
|
33 | If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:
|
34 |
|
35 | ```bash
|
36 | yarn config set workspaces-experimental true
|
37 | ```
|
38 |
|
39 | Then install dependencies
|
40 |
|
41 | ```bash
|
42 | yarn install
|
43 | ```
|
44 |
|
45 | ### Build
|
46 |
|
47 | To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
|
48 |
|
49 | ```bash
|
50 | PKG=@0x/types yarn build
|
51 | ```
|
52 |
|
53 | Or continuously rebuild on change:
|
54 |
|
55 | ```bash
|
56 | PKG=@0x/types yarn watch
|
57 | ```
|
58 |
|
59 | ### Clean
|
60 |
|
61 | ```bash
|
62 | yarn clean
|
63 | ```
|
64 |
|
65 | ### Lint
|
66 |
|
67 | ```bash
|
68 | yarn lint
|
69 | ```
|
70 |
|
\ | No newline at end of file |