Skip to content

In JS, cross-file non-expando assignment declarations are broken #26875

Closed
@sandersn

Description

@sandersn

From chrome-devtools-frontend (found in #26861)

// @Filename: file1.js
var N = {}
N.commands = {}

// @Filename: file2.js
N.commands.a = 111
N.commands.b = function () { }

Expected behavior:
N.commands.a = 111 is a legal assignment declaration and references to N.commands.a have type number.

Actual behavior:
Both N.commands.a = 111 and references to N.commands.a say that "'a' is not found on 'commands'". N.commands.b is fine, though.

Very likely a result of the change to expando marking.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions