[ ] Chore (a non-breaking change which is related to package maintenance)
[x] Bug fix (a non-breaking change which fixes an issue)
[ ] New feature (a non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
This PR fixes a bug where the @prismicio/client integration would return any for all client query methods.
This only occurs when @prismicio/types is used as the types provider (the default). Both @prismicio/types and @prismicio/client were imported as prismic, causing a type error. Without a resolvable type, TypeScript returns any.
// Output before
import type * as prismic from "@prismicio/types";
import type * as prismic from "@prismicio/client"; // Conflict!
// Output after
import type * as prismic from "@prismicio/types";
import type * as prismicClient from "@prismicio/client";
Note that when @prismicio/client is the types provider, only a single import is generated, resulting in no error.
import type * as prismic from "@prismicio/client";
Checklist:
[ ] My change requires an update to the official documentation.
[x] All TSDoc comments are up-to-date and new ones have been added where necessary.
Types of changes
Description
This PR fixes a bug where the
@prismicio/client
integration would returnany
for all client query methods.This only occurs when
@prismicio/types
is used as the types provider (the default). Both@prismicio/types
and@prismicio/client
were imported asprismic
, causing a type error. Without a resolvable type, TypeScript returnsany
.Note that when
@prismicio/client
is the types provider, only a single import is generated, resulting in no error.Checklist: