contentlayerdev / contentlayerdev/contentlayer
Runtime config / schema validation
- Ngôn ngữ chính
- TypeScript
- Star
- 3.5k
- Fork
- 192
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.