Merge pull request #31166 from schultzp2020/constructor-parameters

refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
This commit is contained in:
Patrik Oldsberg
2025-10-15 18:56:42 +02:00
committed by GitHub
187 changed files with 1893 additions and 728 deletions
@@ -29,7 +29,11 @@ const kindMappings: Record<string, string> = {
/** @public */
export class GkeClusterLinksFormatter implements ClusterLinksFormatter {
constructor(private readonly googleAuthApi: ProfileInfoApi | undefined) {}
private readonly googleAuthApi: ProfileInfoApi | undefined;
constructor(googleAuthApi: ProfileInfoApi | undefined) {
this.googleAuthApi = googleAuthApi;
}
async formatClusterLink(options: ClusterLinksFormatterOptions): Promise<URL> {
if (!options.dashboardParameters) {
throw new Error('GKE dashboard requires a dashboardParameters option');
@@ -19,7 +19,11 @@ import { KubernetesAuthProvider } from './types';
/** @public */
export class AksKubernetesAuthProvider implements KubernetesAuthProvider {
constructor(private readonly microsoftAuthApi: OAuthApi) {}
private readonly microsoftAuthApi: OAuthApi;
constructor(microsoftAuthApi: OAuthApi) {
this.microsoftAuthApi = microsoftAuthApi;
}
async decorateRequestBodyForAuth(
requestBody: KubernetesRequestBody,
@@ -19,7 +19,11 @@ import { KubernetesRequestBody } from '@backstage/plugin-kubernetes-common';
import { KubernetesAuthProviders } from './KubernetesAuthProviders';
class MockAuthApi implements OAuthApi, OpenIdConnectApi {
constructor(private readonly token: string) {}
private readonly token: string;
constructor(token: string) {
this.token = token;
}
getAccessToken = jest.fn(async () => {
return this.token;