I was eager to incorporate JavaScript private fields into my Angular (v17) application built with Angular CLI. I specified the target as ES2022 in the tsconfig, but after building the app, I discovered that my private field had been poly-filled with a WeakMap. I'm curious to understand why this occurred.
ng new my-brand-new-app
@Component({
...
})
export class AppComponent {
#hello = 'hello';
title = this.#hello;
}
ng build