Skip to content

Support class static blocks #46

@tchetwin

Description

@tchetwin

The class static blocks proposal introduces a new lexical scope nested within a class body:

class C {
    static {
        throw new Error("foo");
    }
}

typescript@4.4.0-beta has implemented this (currently) Stage 3 proposal. playground

We should investigate what changes, if any, need to be made to pasta to support this feature.


This currently shows in Chrome console:

VM56:3 Uncaught Error: foo
    at <static_initializer> (<anonymous>:3:15)
    at <anonymous>:1:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions