Skip to content

Commit bfe8bc0

Browse files
committed
Making typescript an optional peer and adjusting documentation accordingly.
1 parent 664cbd9 commit bfe8bc0

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Install the framework, its peer dependencies and type assistance packages using
180180

181181
```shell
182182
# example for pnpm:
183-
pnpm add express-zod-api express zod typescript http-errors
183+
pnpm add express-zod-api express zod http-errors
184184
pnpm add -D @types/express @types/node @types/http-errors
185185
```
186186

@@ -1074,13 +1074,15 @@ adding the runtime helpers the framework relies on.
10741074

10751075
## Generating a Frontend Client
10761076

1077-
You can generate a Typescript file containing the IO types of your API and a client for it.
1078-
Consider installing `prettier` and using the async `printFormatted()` method.
1077+
You can generate a Typescript file containing the IO types of your API and a client for it. Make sure you have
1078+
`typescript` installed. Consider also installing `prettier` and using the async `printFormatted()` method.
10791079

10801080
```ts
1081+
import typescript from "typescript";
10811082
import { Integration } from "express-zod-api";
10821083

10831084
const client = new Integration({
1085+
typescript,
10841086
routing,
10851087
config,
10861088
variant: "client", // <— optional, see also "types" for a DIY solution

express-zod-api/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@
7878
},
7979
"express-fileupload": {
8080
"optional": true
81+
},
82+
"typescript": {
83+
"optional": true
8184
}
8285
},
8386
"devDependencies": {

0 commit comments

Comments
 (0)