rhys-vdw / ts-auto-guard

Generate type guard functions from TypeScript interfaces
MIT License
505 stars 54 forks source link

How to specify additional properties #313

Closed DarkGL closed 1 month ago

DarkGL commented 1 month ago

How do I specify that an object cannot have any additional properties beyond those defined in the schema?

rhys-vdw commented 1 month ago

I don't believe there is such a concept in TypeScript, and there is definitely no support for it in ts-auto-guard, which validates types at runtime.