contentlayerdev / contentlayerdev/contentlayer

Runtime config / schema validation

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

説明

Some users (typically users who don't yet use TypeScript) are running into problems due to misconfigurations of their Contentlayer config (especially in regards to the content schema). Additionally to the safety provided by TypeScript, we should also implement a runtime validation step to avoid undefined runtime errors.

## Technical notes

Ideally we should figure out a way how to derive [Zod](https://github.com/colinhacks/zod)-like validation logic based on the existing TypeScript definitions. We could also investigate to use [TS+](https://github.com/ts-plus) for this.

## Related issues

- https://github.com/contentlayerdev/contentlayer/issues/193

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

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

評価

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

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

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