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

Export cache types #1507

Merged
merged 3 commits into from
Nov 15, 2023
Merged

Export cache types #1507

merged 3 commits into from
Nov 15, 2023

Conversation

juanpprieto
Copy link
Contributor

@juanpprieto juanpprieto commented Nov 13, 2023

Creating custom 3P clients in typescript is hard because we are missing these types. If I attempt to do a custom createCmsClient I am missing the types that I will need to pass to withCache e.g AllCacheOptions...

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Copy link
Contributor

@frandiox frandiox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Considering the following implementation of two of the exposed types:

export type CachingStrategy = AllCacheOptions;

export type NoStoreStrategy = {
  mode: string;
};

Do we really need to make all of these public or can we just use CachingStrategy for everything?
Or maybe even rename it to CacheOptions?

@juanpprieto juanpprieto merged commit a9b8bcd into main Nov 15, 2023
9 checks passed
@juanpprieto juanpprieto deleted the juanpprieto/export-cache-types branch November 15, 2023 18:58
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