Skip to content

window.location is not supposed to be a read-only property #19277

Closed
@haskaalo

Description

@haskaalo

In lib.dom.d.ts L13157 window.location is set as a read-only property but it can also be used to redirect a user by changing the value of it.

For example:

window.location = "/";

Error:

[ts] Cannot assign to 'location' because it is a constant or a read-only property.

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 issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions