Skip to content

Should not suggest "caller" in strict mode as it causes TypeError #6649

Closed
@egamma

Description

@egamma

From @alexandrudima on January 27, 2016 14:22

Testing #2218

function restricted()
{
    "use strict";
    restricted.ca
}

console.log(restricted());

image

Since we're at it, it could also highlight the caller and arguments below with a squiggly indicating a TypeError:

function restricted()
{
    "use strict";
    restricted.caller;    // throws a TypeError
    restricted.arguments; // throws a TypeError
}

console.log(restricted());

Copied from original issue: microsoft/vscode#2454

Metadata

Metadata

Assignees

No one assigned

    Labels

    SuggestionAn idea for TypeScriptWon't FixThe severity and priority of this issue do not warrant the time or complexity needed to fix it

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions