Skip to content

chore: added clarifying docs for the type change#10804

Merged
jasonsaayman merged 1 commit intov1.xfrom
chore/add-comment-for-pr-10745
Apr 27, 2026
Merged

chore: added clarifying docs for the type change#10804
jasonsaayman merged 1 commit intov1.xfrom
chore/add-comment-for-pr-10745

Conversation

@jasonsaayman
Copy link
Copy Markdown
Member

@jasonsaayman jasonsaayman commented Apr 27, 2026

Summary by cubic

Adds clarifying docs to AxiosRequestTransformer<D> and AxiosResponseTransformer<T> explaining the transform pipeline and what the generics represent. No runtime or type API changes; comments only in index.d.ts and index.d.cts.

Description

  • Summary of changes: Added JSDoc to AxiosRequestTransformer and AxiosResponseTransformer to describe left-fold pipeline behavior and scope of D/T generics; updated both index.d.ts and index.d.cts.
  • Reasoning: Clarifies how data flows through transform arrays and when generic types apply, reducing confusion after the recent type change.
  • Additional context: Guidance notes recommend typing D only for the first transformer and noting that later stages may receive serialized forms.

Docs

  • Suggest adding a short note in /docs/ under request/response transforms explaining:
    • Transforms run as a left-fold pipeline.
    • D/T describe the input to the first transformer only.
    • Later transformers may receive serialized data (string, Buffer, FormData, etc.).
    • Example showing a single typed request transformer vs. an array with mixed outputs.

Testing

  • No tests added or modified. This is a comments-only update to type definition files; no behavior or type signatures changed, so tests are not required.

Semantic version impact

  • Patch: documentation-only change within .d.ts/.d.cts comments, no runtime or public type API changes.

Written for commit c3f187e. Summary will update on new commits. Review in cubic

@jasonsaayman jasonsaayman self-assigned this Apr 27, 2026
@jasonsaayman jasonsaayman added priority::medium A medium priority commit::chore The PR is related to a chore labels Apr 27, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@jasonsaayman jasonsaayman merged commit 25387ae into v1.x Apr 27, 2026
25 checks passed
@jasonsaayman jasonsaayman deleted the chore/add-comment-for-pr-10745 branch April 27, 2026 12:33
jasonsaayman added a commit that referenced this pull request Apr 27, 2026
* Revert "chore: added clarifying docs for the type change (#10804)"

This reverts commit 25387ae.

* Revert "fix: transformRequest input typing (#10745)"

This reverts commit 694f1ec.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit::chore The PR is related to a chore priority::medium A medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant