Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/friendly-geese-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"effect": minor
---

Default `never` type has been added to `MutableHasMap.empty` & `MutableList.empty` ctors
2 changes: 1 addition & 1 deletion packages/effect/src/MutableHashMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class BucketIterator<K, V> implements Iterator<[K, V]> {
* @since 2.0.0
* @category constructors
*/
export const empty = <K, V>(): MutableHashMap<K, V> => {
export const empty = <K = never, V = never>(): MutableHashMap<K, V> => {
const self = Object.create(MutableHashMapProto)
self.referential = new Map()
self.buckets = new Map()
Expand Down
2 changes: 1 addition & 1 deletion packages/effect/src/MutableList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const makeNode = <T>(value: T): LinkedListNode<T> => ({
* @since 2.0.0
* @category constructors
*/
export const empty = <A>(): MutableList<A> => {
export const empty = <A = never>(): MutableList<A> => {
const list = Object.create(MutableListProto)
list.head = undefined
list.tail = undefined
Expand Down