I'm curious what ya'll think of chainable methods for better ergonomics in common patterns.
Currently, if I want to make a write-only list, I'd do something like
export const FriendRequests = co.list(co.account());
const friendRequestsGroup = co.group().create();
friendRequestsGroup.addMember("everyone", "writeOnly");
const friendRequests = FriendRequests.create([], friendRequestsGroup);
But if methods like .addMember returned this group, I could additionally do
const friendRequests = FriendRequests.create([], co.group().create().addMember("everyone", "writeOnly"));
I'm happy to take a stab at a PR if ya'll are aligned with this direction.
I'm curious what ya'll think of chainable methods for better ergonomics in common patterns.
Currently, if I want to make a write-only list, I'd do something like
But if methods like
.addMemberreturnedthisgroup, I could additionally doI'm happy to take a stab at a PR if ya'll are aligned with this direction.