docs(docs-infra): disable experimental decorators (#56257)

Also enable useDefineForClassFields and disable downlevelIteration

PR Close #56257
This commit is contained in:
Matthieu Riegler 2024-06-04 15:40:48 +02:00 committed by Andrew Scott
parent 0e439d78c2
commit d5fbe11e40
2 changed files with 3 additions and 8 deletions

View file

@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/
import {ChangeDetectionStrategy, Component, Inject} from '@angular/core';
import {ChangeDetectionStrategy, Component, Inject, inject} from '@angular/core';
import {MAT_SNACK_BAR_DATA, MatSnackBarAction, MatSnackBarRef} from '@angular/material/snack-bar';
export interface ErrorSnackBarData {
@ -37,10 +37,8 @@ export class ErrorSnackBar {
protected message: string;
protected actionText?: string;
constructor(
protected snackBarRef: MatSnackBarRef<ErrorSnackBar>,
@Inject(MAT_SNACK_BAR_DATA) public data: ErrorSnackBarData,
) {
constructor(protected snackBarRef: MatSnackBarRef<ErrorSnackBar>) {
const data = inject(MAT_SNACK_BAR_DATA) as ErrorSnackBarData;
this.message = data.message;
this.actionText = data.actionText;
}

View file

@ -16,13 +16,10 @@
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"moduleResolution": "node",
"importHelpers": true,
"target": "ES2022",
"module": "ES2022",
"useDefineForClassFields": false,
"lib": ["ES2022", "dom"],
"esModuleInterop": true,
"resolveJsonModule": true,