-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Expected Behavior / Situation
Bucket<T> constructors should accept a default T. The ones without a default value should return Bucket<Partial<T>>
Actual Behavior / Situation
Existing bucket constructors don't accept a default value but return Bucket<T>
Modification Proposal
The type system is a bit too optimistic as T[K] might not hold any value yet (just initialised) or already (after calling remove). Making the output partial would bring it in line with reality.
If a meaningful default value available and provided for T it would allow to overcome the problem outlined above
Metadata
Metadata
Assignees
Labels
No labels