Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions fern/products/sdks/generators/typescript/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ const bar: MyRootType.Foo.Bar = {};
```
</ParamField>

<ParamField path="exactOptionalPropertyTypes" type="boolean" default="false" toc={true}>
When enabled, every optional property in the generated SDK is emitted as `prop?: T | undefined`, and the generated `tsconfig` files enable TypeScript's [`exactOptionalPropertyTypes`](https://www.typescriptlang.org/tsconfig/#exactOptionalPropertyTypes) compiler option. This covers model types, inlined request types, client options, errors, and the `core/` utilities, so consumers whose own `tsconfig` sets `exactOptionalPropertyTypes: true` can use the SDK without type errors.

This option applies with or without the serde layer, so it can be combined with either value of [`noSerdeLayer`](#noserdelayer).

```yaml
# generators.yml
config:
exactOptionalPropertyTypes: true
```
</ParamField>

<ParamField path="extraDependencies" type="object" default="{}" toc={true}>

<Markdown src="/snippets/enterprise-plan.mdx"/>
Expand Down
Loading