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

Ternary with createLiveClient and createMockClient errors #482

Closed
saiichihashimoto opened this issue Nov 22, 2023 · 7 comments · Fixed by #563
Closed

Ternary with createLiveClient and createMockClient errors #482

saiichihashimoto opened this issue Nov 22, 2023 · 7 comments · Fixed by #563
Labels
help wanted Please help me! I'm lonely. released Automatically merges the PR if all status checks pass. Applied by semantic-release.

Comments

@saiichihashimoto
Copy link
Owner

For whatever reason, this creates a type instantiation error:

import { createClient as createLiveClient } from "@sanity-typed/client";
import { createClient as createMockClient } from "@sanity-typed/client-mock";

import { getMockDataset } from "./mocks";

const createClient = process.env.SOME_VAR
  ? createLiveClient<SanityValues>()
  : createMockClient<SanityValues>({
      dataset: getMockDataset(),
    });
@saiichihashimoto saiichihashimoto added the help wanted Please help me! I'm lonely. label Nov 22, 2023
saiichihashimoto added a commit that referenced this issue Dec 13, 2023
@kodiakhq kodiakhq bot closed this as completed in #563 Dec 13, 2023
Copy link

🎉 This issue has been resolved in version 1.1.52 🎉

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 Dec 13, 2023
Copy link

🎉 This issue has been resolved in version 1.9.28 🎉

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.26 🎉

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

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version 2.2.1 🎉

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.3 🎉

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

Your semantic-release bot 📦🚀

Copy link

🎉 This issue has been resolved in version 6.1.1 🎉

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.1 🎉

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
help wanted Please help me! I'm lonely. 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