contentlayerdev / contentlayerdev/contentlayer

Consider renaming field option `default` to `fallback`

Abierto
#120 1 comentario 2 reacciones 0 asignados Ver en GitHub
meta: never-stale pkg/source-files
Lenguaje dominante
TypeScript
Estrellas
3.5k
Forks
192
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.