instantdb / instant

Instant is a modern Firebase. We make you productive by giving your frontend a real-time database.
https://instantdb.com
Apache License 2.0
6.57k stars 175 forks source link

Fix strong init deep access type bug, export more helpers #175

Closed markyfyi closed 1 month ago

markyfyi commented 1 month ago

Linked types weren't being resolved in our query helper types. This was due to us not threading generic type params to IDatabase, and an issue in TS where we need to create structural dependence on the type (e.g., a "real", runtime property referencing the type).

Discussion here: https://discord.com/channels/1031957483243188235/1280983629270487080/1281751160025383044

SO explanation of what's broken: https://stackoverflow.com/questions/55289720/typescript-generic-inference-from-interface-implementation

Also exporting more helpers as requested

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
instant-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 9, 2024 9:57pm