Skip to content

docs(sdks): document exactOptionalPropertyTypes TypeScript generator option - #6931

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1789146316-ts-exact-optional-property-types
Open

docs(sdks): document exactOptionalPropertyTypes TypeScript generator option#6931
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1789146316-ts-exact-optional-property-types

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

TypeScript teams that turn on the exactOptionalPropertyTypes compiler option previously couldn't consume a Fern-generated SDK without type errors, and some were hand-writing .d.ts files to work around it. The TypeScript SDK generator now has an opt-in exactOptionalPropertyTypes config option that emits every optional property as prop?: T | undefined and enables the same compiler option in the generated tsconfig, so the SDK typechecks cleanly under the stricter mode. This documents the option on the TypeScript configuration reference, including that it works with or without the serde layer.

Implements docs for: feat(typescript): add exactOptionalPropertyTypes generator option (fern-api/fern#17697) — fern-api/fern#17697

Summary

Pages changed:

  • fern/products/sdks/generators/typescript/configuration.mdx — new <ParamField path="exactOptionalPropertyTypes" type="boolean" default="false"> entry, placed alphabetically between enableInlineTypes and extraDependencies, with a generators.yml example and a cross-link to noSerdeLayer.

No SDK changelog entry (auto-generated) and no translation edits.

Validation: pre-commit run --files on the changed file (the two Vale errors it reports are pre-existing lines 22 and 599) and fern check --warnings (0 errors).

Link to Devin session: https://app.devin.ai/sessions/4b05774ba68f4d66801e53450a759028
Open in Devin Desktop: https://app.devin.ai/desktop/session/4b05774ba68f4d66801e53450a759028?variant=devin

…option

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants