Merge pull request #31166 from schultzp2020/constructor-parameters
refactor: convert constructor parameter properties for erasableSyntaxOnly compatibility
This commit is contained in:
@@ -129,7 +129,13 @@ export const getRepoUrlFromLocationAnnotation = (
|
||||
};
|
||||
|
||||
class UnknownTag {
|
||||
constructor(public readonly data: any, public readonly type?: string) {}
|
||||
public readonly data: any;
|
||||
public readonly type?: string;
|
||||
|
||||
constructor(data: any, type?: string) {
|
||||
this.data = data;
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
||||
export const MKDOCS_SCHEMA = DEFAULT_SCHEMA.extend([
|
||||
|
||||
@@ -39,7 +39,11 @@ jest.mock('@azure/identity', () => ({
|
||||
|
||||
jest.mock('@azure/storage-blob', () => {
|
||||
class BlockBlobClient {
|
||||
constructor(private readonly blobName: string) {}
|
||||
private readonly blobName: string;
|
||||
|
||||
constructor(blobName: string) {
|
||||
this.blobName = blobName;
|
||||
}
|
||||
|
||||
uploadFile(source: string): Promise<BlobUploadCommonResponse> {
|
||||
mockDir.addContent({
|
||||
@@ -117,7 +121,11 @@ jest.mock('@azure/storage-blob', () => {
|
||||
}
|
||||
|
||||
class ContainerClient {
|
||||
constructor(private readonly containerName: string) {}
|
||||
private readonly containerName: string;
|
||||
|
||||
constructor(containerName: string) {
|
||||
this.containerName = containerName;
|
||||
}
|
||||
|
||||
getProperties(): Promise<ContainerGetPropertiesResponse> {
|
||||
return Promise.resolve({
|
||||
@@ -173,10 +181,13 @@ jest.mock('@azure/storage-blob', () => {
|
||||
}
|
||||
|
||||
class BlobServiceClient {
|
||||
constructor(
|
||||
public readonly url: string,
|
||||
private readonly credential?: StorageSharedKeyCredential,
|
||||
) {}
|
||||
public readonly url: string;
|
||||
private readonly credential?: StorageSharedKeyCredential;
|
||||
|
||||
constructor(url: string, credential?: StorageSharedKeyCredential) {
|
||||
this.url = url;
|
||||
this.credential = credential;
|
||||
}
|
||||
|
||||
getContainerClient(containerName: string) {
|
||||
if (containerName === 'bad_container') {
|
||||
|
||||
@@ -34,7 +34,11 @@ let createdStorageOptions: Array<StorageOptions | undefined> = [];
|
||||
|
||||
jest.mock('@google-cloud/storage', () => {
|
||||
class GCSFile {
|
||||
constructor(private readonly filePath: string) {}
|
||||
private readonly filePath: string;
|
||||
|
||||
constructor(filePath: string) {
|
||||
this.filePath = filePath;
|
||||
}
|
||||
|
||||
exists() {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
@@ -77,7 +81,11 @@ jest.mock('@google-cloud/storage', () => {
|
||||
}
|
||||
|
||||
class Bucket {
|
||||
constructor(private readonly bucketName: string) {}
|
||||
private readonly bucketName: string;
|
||||
|
||||
constructor(bucketName: string) {
|
||||
this.bucketName = bucketName;
|
||||
}
|
||||
|
||||
async getMetadata() {
|
||||
if (this.bucketName === 'bad_bucket_name') {
|
||||
@@ -121,7 +129,10 @@ jest.mock('@google-cloud/storage', () => {
|
||||
}
|
||||
|
||||
class Storage {
|
||||
constructor(readonly options?: StorageOptions) {
|
||||
readonly options?: StorageOptions;
|
||||
|
||||
constructor(options?: StorageOptions) {
|
||||
this.options = options;
|
||||
createdStorageOptions.push(options);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user