denoland / denoland/std

suggestion: deprecate `std/collections` APIs in favour of new `Set` methods

Open
#4,637 2 comments 3 reactions 0 assignees View on GitHub
collections
Dominant language
TypeScript
Stars
3.6k
Forks
681
PR merge metrics
No merged PRs in 30d

Description

I suggest the following now that new `Set` methods are [available in Deno](https://deno.com/blog/v1.42#v8-123-and-typescript-543):
1. Deprecate [`intersect()`](https://jsr.io/@std/collections/doc/intersect/~/intersect) in favour of [`Set.prototype.intersection()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/intersection)
2. Deprecate [`union()`](https://jsr.io/@std/collections/doc/union/~/union) in favour of [`Set.prototype.union()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/union)

Removals should happen in `std/collections@1`. However, this might be too soon as these APIs are not fully supported in other JavaScript runtimes.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.