contentlayerdev / contentlayerdev/contentlayer

Consider renaming field option `default` to `fallback`

Aperta
#120 1 commento 2 reazioni 0 assegnatari Vedi su GitHub
meta: never-stale pkg/source-files
Lingua principale
TypeScript
Stelle
3.5k
Fork
192
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.