Skip to content

Conversation

@devalog
Copy link
Collaborator

@devalog devalog commented Jul 1, 2025

Added all options from here using ParamField formatting. Filled in definitions and examples for some options per readme. Many options don't have definitions and examples, and need to be filled in at a later date.

Other modifications I made:
-Converted the Zod types to TypeScript types (z.boolean() to boolean)
-Added deprecated={true} attribute for the deprecated options
Organized options into sections per config schema
-Handled union formatting (z.union([z.literal("infinity"), z.number()]) to number | 'infinity')
-Converted enum types to literal unions (z.enum(["wrapper", "web"])'wrapper' | 'web')
-Lightly edited/reorganized some of the definitions and examples
-Added highlighting to some examples

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2025

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2025

<ParamField path="shouldGenerateWebsocketClients" type="boolean">
</ParamField>

<ParamField path="defaultTimeoutInSeconds" type="number | 'infinity'">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Am I understanding the TS SDK generator correct here?
If infinity, it'll use the timeout provided by the request options; otherwise, it'll fall back to 60000ms.
infinity seems kind of misleading here.
@dsinghvi

The default timeout for HTTP requests in seconds. Users can change the timeout during SDK initialization and for individual HTTP requests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, i think its okay to ignore documenting RequestOptions since we already make it clear in the TS readme that it is to override the default timeout.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding based on your comments is that I don't need to make any changes to this. Let me know if that's wrong though!

jest: "29.0.7"
```

<Note>Only applies when publishing to Github.</Note>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the note accurate for this option?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It isn't, @devalog lets go ahead and delete

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied over this note from the readme's entry for extraDevDependencies: https://github.com/fern-api/fern/tree/main/generators/typescript. @Swimburger @dsinghvi let me know if that's not right though!

```
</ParamField>

<ParamField path="tolerateRepublish" type="boolean">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tolerateRepublish flag allows npm to overwrite an already-published package version, bypassing npm's default protection against republishing the same version number.

I don't know anyone using this flag, we may want to not document it, or put it at the bottom. Not sure how we're currently sorting the flags on this page.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added this description. The page is sorted by the order of the options in the config file (with deprecated/not relevant options removed entirely). If you don't think the flag is relevant, maybe removing is the best option? Can always add back in later if needed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsinghvi I do think this is so uncommonly used, we could omit it to make the flag list smaller.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just removed this flag for now!

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2025

@dsinghvi dsinghvi merged commit fbdee72 into main Jul 9, 2025
1 check passed
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.

4 participants