Pickle CLI
You can use the Pickle CLI to generate TypeScript types for your project based on your project plan.
Install
npm i -D souranalytics/cliUsage
pickle generate -k YOUR_PROJECT_API_KEYThis will generate types for your plan. Add the file to your tsconfig.json and you're good to go!
Options
| Option | Type | Description | Request | Default |
|---|---|---|---|---|
-k, --key | string | Project API key | Yes | env var PICKLE_KEY |
-o, --output | string | Output path | No | ./typings/pickle.d.ts |
-u, --url | string | Project API key | No | https://pickle.sh |
Tips
- You can also set the key in the
PICKLE_KEYenvironment variable and skip the-koption - You can add a
predevscript topackage.jsonto call the Pickle CLI. This way, you always have the latest types in your project