a-type / verdant

🌿 Storage, sync & realtime for local-first web apps. Build an app in minutes, deploy as a static page, and add sync with a few lines.
https://verdant.dev
GNU Affero General Public License v3.0
188 stars 4 forks source link

Entity initialization: Either gracefully handle supersets, or make typing stricter #370

Closed a-type closed 2 months ago

a-type commented 5 months ago

Today you can initialize an entity/sub-entity with an object that contains extra keys, but this will fail with a runtime error due to validation.

Either the types should reflect this is not legal, or the validation should discard extra keys.