contentlayerdev / contentlayerdev/contentlayer

Consider renaming field option `default` to `fallback`

オープン
#120 コメント 1 件 リアクション 2 件 担当者 0 名 GitHub で見る
meta: never-stale pkg/source-files
主要言語
TypeScript
スター
3.5k
フォーク
192
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。