-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
It's confusing that you call build() to create a builder, but then when we talk about creating instances, we also talk about building them.
I just hit this when working on #899, where at one point we considered an API of:
const userBuilder = build<User>(...);
const users = buildMany(userBuilder, 20)
This isn't the final API we landed on, but it's confusing that build here means different things: in the first instance we build a builder and in the second we build many instances of the builder.
If we were to rename build to something else, such as:
createBuilderconstruct- (ideas welcome!)
Then this would make it easier to follow, document and understand. This could be done slowly, and we could support build() and whatever the new name is for at least 1 major version (+ ship deprecation message) before eventually removing build.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels