Skip to content

Commit 6bca380

Browse files
committed
Minor transformer docs update
1 parent a71d840 commit 6bca380

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/openapi-ts/plugins/transformers.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,24 @@ export default {
8181

8282
This will generate types that use `Date` instead of `string` and appropriate transformers. Note that third-party date packages are not supported at the moment.
8383

84+
## BigInt
85+
86+
The `@hey-api/transformers` plugin will natively type all BigInts as `bigint` instead of `number`, which can affect arithmetic operations if your application previously used `number`. To force BigInts to be numbers, use the `bigint` configuration option.
87+
88+
```js
89+
export default {
90+
input: 'hey-api/backend', // sign up at app.heyapi.dev
91+
output: 'src/client',
92+
plugins: [
93+
// ...other plugins
94+
{
95+
bigint: true, // [!code ++]
96+
name: '@hey-api/transformers',
97+
},
98+
],
99+
};
100+
```
101+
84102
## Example
85103

86104
A generated response transformer might look something like this. Please note the example has been edited for brevity.

0 commit comments

Comments
 (0)