From d5fbe11e406e42106bc4e0c1a2eaa6ffcddaa4bb Mon Sep 17 00:00:00 2001 From: Matthieu Riegler Date: Tue, 4 Jun 2024 15:40:48 +0200 Subject: [PATCH] docs(docs-infra): disable experimental decorators (#56257) Also enable useDefineForClassFields and disable downlevelIteration PR Close #56257 --- .../app/core/services/errors-handling/error-snack-bar.ts | 8 +++----- adev/tsconfig.json | 3 --- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/adev/src/app/core/services/errors-handling/error-snack-bar.ts b/adev/src/app/core/services/errors-handling/error-snack-bar.ts index 935a0102afd..d9779d71b74 100644 --- a/adev/src/app/core/services/errors-handling/error-snack-bar.ts +++ b/adev/src/app/core/services/errors-handling/error-snack-bar.ts @@ -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, - @Inject(MAT_SNACK_BAR_DATA) public data: ErrorSnackBarData, - ) { + constructor(protected snackBarRef: MatSnackBarRef) { + const data = inject(MAT_SNACK_BAR_DATA) as ErrorSnackBarData; this.message = data.message; this.actionText = data.actionText; } diff --git a/adev/tsconfig.json b/adev/tsconfig.json index 09ad4f9cb78..4b6aa23dd9b 100644 --- a/adev/tsconfig.json +++ b/adev/tsconfig.json @@ -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,