prismicio / prismic-react

React components and hooks to fetch and present Prismic content
https://prismic.io/docs/technologies/homepage-reactjs
Apache License 2.0
154 stars 40 forks source link

fix: correct types for non-string Link Resolver functions #142

Closed angeloashmore closed 2 years ago

angeloashmore commented 2 years ago

Types of changes

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:

Fixes #137

Checklist:

🐟

codecov-commenter commented 2 years ago

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[bot] commented 2 years ago

size-limit report 📦

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