Skip to content

Key can't be number in Proxy #39272

Closed
Closed
@Jack-Works

Description

@Jack-Works

TypeScript Version: 3.7.x-dev.201xxxxx

Search Terms:

Code

new Proxy({}, { get(target, key) {
    // key is type number | string | symbol which is impossible.
})

Expected behavior:

key be string | symbol

Actual behavior:

key be number | string | symbol

image

Metadata

Metadata

Assignees

Labels

Needs InvestigationThis issue needs a team member to investigate its status.RescheduledThis 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