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

fix(client): fix type errors of Client's methods #76

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

shuuji3
Copy link
Collaborator

@shuuji3 shuuji3 commented Feb 25, 2025

This is my attempt to solve the existing type errors of client.ts in #60.

I merged main branch so it contains several commits (you can also update your branch), but the main changes are these two commits:

  1. fd489cb - adjust typing of methods
  2. 99d77dd - add placeholders for missing params (needs to be fixed later)

I thought the existing type errors have come from two issues:

  • Using as for the record object, making the output type invalid.
    • So I tried to avoid using as, and also tried finding proper types from lexicon.ts and using OutputOf etc.
  • Assigning type variable <Query> to Client in agent.ts.
    • I tried to keep <Query> but couldn't solve the type issue without removing it. But I feel like we could use Client without the type parameter. I'm not sure if this is the correct fix or not. This solution may be invalid if we need to keep <Query>. (feel free to dismiss in that case)

Base automatically changed from feat/post to main March 12, 2025 14:14
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.

2 participants