fireproof-storage / fireproof

Realtime database, runs anywhere. Install Fireproof in your front-end app or edge function, and sync data via any backend.
https://fireproof.storage
Other
219 stars 16 forks source link

rationalize exported types #40

Open jchris opened 8 months ago

jchris commented 8 months ago

Currently the type exports are a "just works" mess.

Here is the first place to look for how it's put together today: https://github.com/fireproof-storage/fireproof/blob/1ffdceea758f9afedcbea5bb312023bc5a64a4ad/packages/connect/scripts/types.js#L20

thedanchez commented 5 months ago

@jchris is there any reason for us not to lean into native build tooling to generate type definitions for different targets? Just wondering if it is possible to move away from the manual work defined in the scripts/types.js module

jchris commented 5 months ago

thanks for your work for far on this @thedanchez -- here is a relevant commit from an out of date PR. where @valorant-dhruv is working on exposing clock information per document update. This would allow someone to consume the changes feed and load db snapshots corresponding to each change. useful for undo. here is the code: https://github.com/fireproof-storage/fireproof/pull/33/commits/2f44f485e600dc2db569713108e56c15a73a5f2a

I'm putting it here b/c the response type's clock carrying capacity should be a core type but we haven't written it yet.