Bijou Trouvaille
Bijou Trouvaille
@chetbox thanks for pointing out the discrepancy. This is definitely an oversight in documentation, which needs to be fixed. The null in the generated type is important, as it guards...
@chetbox unless you explicitly type your rules item as `timestamp|null`, the `|null` constraint will appear only in the TS typings. That does open you up to a write-denied error. Thisissue...
@chetbox if that solution is seems good to you, then I can recommend a similar one from this issue https://github.com/bijoutrouvaille/fireward/issues/25. Accounting for the timestamp it could look like the example...
You can have an input type in a similar way: ``` type WardIn = T extends object ? { [k in keyof T]: WardIn } : (WardTimestamp|null|WardFieldValue|Date) extends T ?...
@chetbox that's a clever solution. I like it. Unlike my solution, yours allows for exact control over the types. For example, the WardOut wrap would not handle `timestamp|null` type correctly....
@chetbox I pushed the code with your suggestion into the https://github.com/bijoutrouvaille/fireward/tree/io-generics branch. If you are able to build from source, you can use the feature now. Otherwise, I'm going to...
@chetbox this is still not released. I'm close to launching a work project that I've built with the new feature. It has worked out nicely for the most part, but...
It's not at all hard to compile fireward from source. You just need to install the Haskell Stack tool, which is a single binary file, available for download and also...
@chetbox `npm install fireward@beta` should now install this feature for you. It's not documented in the readme, but it works essentially as you suggested, minus the `InterimTypes`. As I said,...
@chetbox #17 deals with a hard to debug issue in the client. Because Firstore is meant to be used directly by the clients, the defaults should guard against this issue....