Merge pull request #31166 from schultzp2020/constructor-parameters
refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
This commit is contained in:
@@ -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,
|
||||
|
||||
+5
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user