Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused locals (to fix Typescript noUnusedLocals problem) #96

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

davidfant
Copy link
Contributor

Title: Remove unused locals (to fix Typescript noUnusedLocals problem)

Description:
This PR removes some unused variables that cause TS to complain

Motivation:
For some reason I can't explain I'm getting these Typescript issues after having installed portkey. I have compilerOptions.skipLibCheck = true and exclude: ["node_modules"] in my tsconfig but it still happens. Even Claude Sonnet and GPT-4o are confused about why this is happening. Anyway, I figured I might as well contribute and improve the library rather than just applying a local patch

../node_modules/portkey-ai/dist/src/baseClient.ts:190:25 - error TS6133: 'path' is declared but its value is never read.

190         const { method, path, query, headers: headers = {}, body } = opts;
                            ~~~~

../node_modules/portkey-ai/dist/src/baseClient.ts:190:31 - error TS6133: 'query' is declared but its value is never read.

190         const { method, path, query, headers: headers = {}, body } = opts;
                                  ~~~~~

../node_modules/portkey-ai/dist/src/baseClient.ts:190:47 - error TS6133: 'headers' is declared but its value is never read.

190         const { method, path, query, headers: headers = {}, body } = opts;
                                                  ~~~~~~~

../node_modules/portkey-ai/dist/src/streaming.ts:69:7 - error TS6133: 'done' is declared but its value is never read.

69   let done = false;
         ~~~~

[9:27:41 PM] Found 4 errors. Watching for file changes.

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 26, 2024
@vrushankportkey
Copy link
Collaborator

Thank you so much for the PR, @davidfant!

@VisargD VisargD requested a review from csgulati09 July 29, 2024 06:35
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 29, 2024
@VisargD VisargD merged commit 952ffd1 into Portkey-AI:main Sep 5, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants