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

Add docs for valid uses of @ts-expect-error #652

Closed
saiichihashimoto opened this issue Jan 24, 2024 · 8 comments · Fixed by #658
Closed

Add docs for valid uses of @ts-expect-error #652

saiichihashimoto opened this issue Jan 24, 2024 · 8 comments · Fixed by #658
Labels
released Automatically merges the PR if all status checks pass. Applied by semantic-release.

Comments

@saiichihashimoto
Copy link
Owner

Realistically, we'll run into the "type instantiation..." errors, no matter what we do. String parsing in typescript is somewhat of an absurd premise, and breaks in it are somewhat inevitable, especially with massive GROQ queries.

I believe we should have two sections:

  1. Add docs for typescript in vscode #651 should probably exist first, just to ensure that the errors are valid and not a matter of an IDE picking the wrong version of typescript. This is actually quite prevalent.
  2. If the issue persists, we should show them:
  • How to create the correct test in the specific-issues.test.ts file and make a PR, gives the best starting point. The types and groq packages are usually where these should go.
  • If not, how to create an issue that essentially boils down to the same thing.
  • In either case, try to reduce the query/config to the smallest one that reflects the issue.
  • How to use @ts-expect-error and manual typing to patch a solution in.

This isn't an ideal world, where they'll likely have a @ts-expect-error in their codebase for quite a long time. But some migrations are massive (@judofyr knows) and, realistically, these issues are relatively common and need an "out". Otherwise, users will just bail altogether. Especially since this is an open source library that I spend my spare time on, meaning some of these issues might linger.

@saiichihashimoto saiichihashimoto added help wanted Please help me! I'm lonely. and removed help wanted Please help me! I'm lonely. labels Jan 24, 2024
@kodiakhq kodiakhq bot closed this as completed in #658 Jan 25, 2024
Copy link

🎉 This issue has been resolved in version 1.0.7 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Automatically merges the PR if all status checks pass. Applied by semantic-release. label Jan 25, 2024
Copy link

🎉 This issue has been resolved in version 1.0.7 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version 1.1.60 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version 2.1.7 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version 1.0.36 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version 1.8.10 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version 2.4.2 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version 2.3.2 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Automatically merges the PR if all status checks pass. Applied by semantic-release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant