contentlayerdev / contentlayerdev/contentlayer
TS should not allow adding additional properties to field definitions
Open
help wanted
meta: never-stale
needs-research
topic: schema
topic: typescript
- Dominant language
- TypeScript
- Stars
- 3.5k
- Forks
- 192
- PR merge metrics
- No merged PRs in 30d
Description
When I'm configuring a field definition, I can add any random property without warning or error. Ideally a situation like this would throw a TS error:

Contributor guide
Research direction
No file, test, or entry point is named. Locate the TypeScript definitions for field configurations, then add a regression test showing that an unsupported property produces a type error; done means valid field definitions still type-check while random additional properties do not.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100