bloomberg / bloomberg/pasta-sourcemaps
Support class static blocks
- Dominant language
- TypeScript
- Stars
- 184
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
The [class static blocks proposal](https://github.com/tc39/proposal-class-static-block) introduces a new lexical scope nested within a `class` body:
```ts
class C {
static {
throw new Error("foo");
}
}
```
`typescript@4.4.0-beta` has implemented this (currently) Stage 3 proposal. [playground](https://www.typescriptlang.org/play?useDefineForClassFields=true&target=7&jsx=0&ts=4.4.0-beta#code/MYGwhgzhAEDC0G8BQ1oQC5nQS2Ilq06AFgE4D2A7tAHYCm1AoqRaQBQBEAZueRwJQBuAgF8kIoA)
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 (:3:15)
at :1:1
```
Contributor guide
Assessment
This issue has not been assessed yet.