Skip to content

This-type fix for prototypes only works at top-level #27095

Closed
@sandersn

Description

@sandersn

#26925 only works at top-level:

(function () {
    function Brunch(children) {
        this.parent = null;
    }

    Brunch.prototype = {
        removeInner: function(at, n) {
            this.collapse();
        },

        collapse: function() {
        },
    };
});

Expected behavior:
No error on this.collapse and this: Brunch & { removeInner, collapse }

Actual behavior:
Error on this.collapse and this: Brunch.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions