Skip to content

Add types for stage 3 "set methods" proposal #57228

Closed
@bakkot

Description

@bakkot

⚙ Compilation target

esnext

⚙ Library

esnext

Missing / Incorrect Definition

Set.prototype.intersection(other)
Set.prototype.union(other)
Set.prototype.difference(other)
Set.prototype.symmetricDifference(other)
Set.prototype.isSubsetOf(other)
Set.prototype.isSupersetOf(other)
Set.prototype.isDisjointFrom(other)

Sample Code

setInstance.intersection(other)
setInstance.union(other)
setInstance.difference(other)
setInstance.symmetricDifference(other)
setInstance.isSubsetOf(other)
setInstance.isSupersetOf(other)
setInstance.isDisjointFrom(other)

Documentation Link

https://github.com/tc39/proposal-set-methods

Currently stage 3, but it's shipping in Safari and will hit stable Chrome in a couple weeks, so I'll be asking for stage 4 at the April meeting.

I'll go ahead and submit a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions