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/cli
Usage
pickle generate -k YOUR_PROJECT_API_KEY
This 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_KEY
environment variable and skip the-k
option - You can add a
predev
script topackage.json
to call the Pickle CLI. This way, you always have the latest types in your project