Skip to content

Remove WeakMap/WeakSet#clear method #6500

Closed

Description

changes:

// lib.es6.d.ts and lib.core.es6.d.ts
// also WeakSet
 interface WeakMap<K, V> {
-    clear(): void;
     delete(key: K): boolean;
     get(key: K): V;
     has(key: K): boolean;
     set(key: K, value?: V): WeakMap<K, V>;
     [Symbol.toStringTag]: "WeakMap";
 }

https://tc39.github.io/ecma262/#sec-weakmap-constructor
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap
https://bugzilla.mozilla.org/show_bug.cgi?id=1101817

Activity

  1. added
    Bug
    Domain: lib.d.ts
    on Jan 15, 2016
  2. added
    Breaking Change
    on Jan 17, 2016
  3. LPGhatguy commented on Jan 18, 2016

    @LPGhatguy
    Contributor

    What runtime environments have this implemented?

    I did a quick test against the latest Chrome, Node.js, and Edge and none of them had WeakSet.prototype.clear or WeakMap.prototype.clear defined as far as I could tell.

  4. mhegazy commented on Jan 19, 2016

    @mhegazy
    Contributor

    Lucien Greathouse (@LPGhatguy) it needs to be removed. it was part of the spec at an earlier draft but has since been removed.

  5. added this to the milestone on Jan 19, 2016
  6. DanielRosenwasser commented on Jan 24, 2016

    @DanielRosenwasser
    Member
  7. added
    Fixed
    on Jan 24, 2016
  8. modified the milestones: TypeScript 1.8, on Jan 25, 2016
  9. added 3 commits that reference this issue on Sep 6, 2016
    4c1010a
    21736a1
    11e9f50
  10. locked and limited conversation to collaborators on Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Breaking ChangeBugDomain: lib.d.tsFixed

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions