contentlayerdev / contentlayerdev/contentlayer
Consider renaming field option `default` to `fallback`
Đang mở
meta: never-stale
pkg/source-files
- Ngôn ngữ chính
- TypeScript
- Star
- 3.5k
- Fork
- 192
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I'm currently considering renaming the field option `default` to `fallback` within the `defineDocumentType` or `defineNestedType` definitions in `contentlayer/source-files`.
Reasoning:
The term `default` value is typically used when "creating" some kind of record - however, Contentlayer never creates any kind of records/documents but just transforms then. Therefore I'm arguing the term `fallback` is more appropriate when considering the **absence** of a value.
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.