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

feat: support unknown EmbedField properties by default #23

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

angeloashmore
Copy link
Member

@angeloashmore angeloashmore commented Feb 3, 2022

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 adds support for unknown properties by default to EmbedField. It does this by adding a general [key: string]: unknown | null property to CommonEmbedData.

If a Data generic type is given, it overrides this new functionality.

This PR also adds a known common description property to CommonEmbedData. See: prismicio/prismic-client#216

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.

🦁

Also adds a known common `description` property to `CommonEmbedData`.
@codecov-commenter
Copy link

Codecov Report

Merging #23 (dd7c80b) into master (4263c90) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #23   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines           15        15           
=========================================
  Hits            15        15           
Impacted Files Coverage Δ
src/fields.ts 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 4263c90...dd7c80b. Read the comment docs.

@angeloashmore angeloashmore merged commit de4880d into master Feb 3, 2022
@angeloashmore angeloashmore deleted the aa/unknown-embed-fields branch February 3, 2022 20:49
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.

None yet

2 participants