contentlayerdev / contentlayerdev/contentlayer
Consider renaming field option `default` to `fallback`
Aperta
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.