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 slice ID #45

Closed lihbr closed 2 years ago

lihbr commented 2 years ago

Types of changes

Description

Add support for Slice IDs

Checklist:

angeloashmore commented 2 years ago

Love this addition!

Is there a reason we went with slice_id over id?

slice_type and slice_label identify the Slice model used for the content, but slice_id does not. slice_id does not refer to the ID of the Slice model.

(Not a big deal, but changing to id also means we can support Gatsby's existing Slice id field automatically in @prismicio/react.)

codecov-commenter commented 2 years ago

Codecov Report

Merging #45 (eb1edc4) into master (5b4d5e5) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #45   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines         1768      1770    +2     
  Branches         7         7           
=========================================
+ Hits          1768      1770    +2     
Impacted Files Coverage Δ
src/fields.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.