Skip to content

Type of Array.prototype[Symbol.unscopables] is wrong #46616

Closed
@Jack-Works

Description

@Jack-Works

lib Update Request

In lib.es2015.symbol.wellknown.d:

interface Array<T> {
    /**
     * Returns an object whose properties have the value 'true'
     * when they will be absent when used in a 'with' statement.
     */
    [Symbol.unscopables](): {
        copyWithin: boolean;
        entries: boolean;
        fill: boolean;
        find: boolean;
        findIndex: boolean;
        keys: boolean;
        values: boolean;
    };
}

Configuration Check

My compilation target is ES2015 and my lib is the default.

Missing / Incorrect Definition

It is an object, instead of a function that returns an object.

Sample Code

Documentation Link

Metadata

Metadata

Assignees

Labels

Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptRescheduledThis issue was previously scheduled to an earlier milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions