feat: add toObject method #12

Merged
Saul-Mirone merged 2 commits from master into master 2022-09-26 08:01:37 +02:00
Saul-Mirone commented 2022-09-25 09:25:41 +02:00 (Migrated from github.com)

Add a toObject method for OrderedMap. This feature makes it possible to do something like:

Object
  .entreis(orderedMap.toObject())
  .map(([key, value]) => {
    // ...
  });
Add a `toObject` method for `OrderedMap`. This feature makes it possible to do something like: ```typescript Object .entreis(orderedMap.toObject()) .map(([key, value]) => { // ... }); ```
marijnh commented 2022-09-25 11:16:50 +02:00 (Migrated from github.com)

Shouldn't the type be more along the line of toObject(): Record<string, T>, since the OrderedMap type already has its content type in a type parameter?

Shouldn't the type be more along the line of `toObject(): Record<string, T>`, since the `OrderedMap` type already has its content type in a type parameter?
Saul-Mirone commented 2022-09-25 12:19:07 +02:00 (Migrated from github.com)

I think you're right, I've updated the type def.

I think you're right, I've updated the type def.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marijn/orderedmap!12
No description provided.