prismicio / prismic-types

Type definitions for Prismic content, models, and APIs
https://prismic.io/docs/technologies/javascript
Apache License 2.0
11 stars 4 forks source link

feat: support unknown `EmbedField` properties by default #23

Closed angeloashmore closed 2 years ago

angeloashmore commented 2 years ago

Types of changes

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: https://github.com/prismicio/prismic-client/issues/216

Checklist:

🦁

codecov-commenter commented 2 years ago

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.