Conversation
This comment has been minimized.
This comment has been minimized.
| ? (T["parameters"] extends { query?: infer Q } ? Q : {}) & | ||
| (T["parameters"] extends { path?: infer P } ? P : {}) & | ||
| (T["parameters"] extends { header?: infer H } ? H : {}) |
There was a problem hiding this comment.
I am not sure about this. Maybe needs a Partial around it?
There was a problem hiding this comment.
Why would it need Partial? It seems to be the same output as before
There was a problem hiding this comment.
Pull Request Overview
This PR aims to reduce TypeScript compilation complexity by simplifying type definitions and optimizing the build configuration. The changes focus on restructuring complex union-to-intersection type operations into simpler parameter extraction patterns and updating build tooling for better diagnostics.
- Simplified parameter extraction logic by replacing complex union-to-intersection types with direct parameter mapping
- Restructured operation types using separate interfaces for better modularity
- Added build optimization flags and tracing capabilities for performance monitoring
Reviewed Changes
Copilot reviewed 6 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.test.json | Added extended diagnostics flag for better TypeScript compiler insights |
| src/RequestRequestOptions.ts | Changed signal type from AbortSignal to any for broader compatibility |
| scripts/update-endpoints/typescript.mjs | Added readonly method detection logic for endpoint categorization |
| scripts/update-endpoints/templates/endpoints.ts.template | Refactored complex type definitions into simpler interface-based approach |
| scripts/update-endpoints/fetch-json.mjs | Added response code fetching to GraphQL query |
| package.json | Updated test script to include TypeScript trace generation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/RequestRequestOptions.ts
Outdated
| * Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests. | ||
| */ | ||
| signal?: AbortSignal; | ||
| signal?: any; |
There was a problem hiding this comment.
Changing the signal type from AbortSignal to any removes type safety and could lead to runtime errors. Consider using a union type like AbortSignal | undefined or keeping the original AbortSignal type if compatibility is the concern.
| signal?: any; | |
| signal?: AbortSignal | undefined; |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Tested with the |
|
🎉 This PR is included in version 15.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Resolves #ISSUE_NUMBER
Before the change?
After the change?
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!