Skip to content

WeakSet<T> should be WeakSet<T extends object> #14840

Closed
@ghost

Description

TypeScript Version: nightly (2.3.0-dev.20170324)

Code

const s = new WeakSet<string>();
s.add("foo");

Expected behavior:

An error, since this will fail at runtime.

Actual behavior:

No error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions