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: correct types for non-string Link Resolver functions #142

Merged
merged 1 commit into from
Mar 31, 2022

Conversation

angeloashmore
Copy link
Member

Types of changes

  • Chore (a non-breaking change which is related to package maintenance)
  • 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 TypeScript type bug where provided Link Resolvers were not allowed to return anything except string.

The following components that accept a Link Resolver function have been fixed:

  • PrismicProvider
  • PrismicRichText
  • PrismicLink

Fixes #137

Checklist:

  • My change requires an update to the official documentation.
  • All TSDoc comments are up-to-date and new ones have been added where necessary.
  • All new and existing tests are passing.

🐟

@codecov-commenter
Copy link

Codecov Report

Merging #142 (b0f61cc) into master (3f774db) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #142   +/-   ##
=======================================
  Coverage   92.36%   92.36%           
=======================================
  Files          16       16           
  Lines         275      275           
  Branches       64       64           
=======================================
  Hits          254      254           
  Misses          5        5           
  Partials       16       16           
Impacted Files Coverage Δ
src/PrismicLink.tsx 96.96% <ø> (ø)
src/PrismicProvider.tsx 100.00% <100.00%> (ø)
src/PrismicRichText.tsx 96.29% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f774db...b0f61cc. Read the comment docs.

@github-actions
Copy link

size-limit report 📦

Path Size
dist/index.js 4.43 KB (0%)
dist/index.cjs 6.31 KB (0%)

@angeloashmore angeloashmore merged commit 50ed2f0 into master Mar 31, 2022
@angeloashmore angeloashmore deleted the aa/linkresolver-generic branch March 31, 2022 03:17
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.

PrismicProvider + Typescript + linkResolver
2 participants