Remove repository.ts default parameter types (#155908)

* Remove closeDiffEditors inferred parameter type

* Remove pushTo inferred parameter type

* Remove _push inferred parameter type

* Remove isBranchProtected inferred parameter type
This commit is contained in:
Mikl Wolfe 2022-12-06 12:30:26 -07:00 committed by GitHub
parent e381480cd4
commit 1d7f930246
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1456,7 +1456,7 @@ export class Repository implements Disposable {
});
}
closeDiffEditors(indexResources: string[] | undefined, workingTreeResources: string[] | undefined, ignoreSetting: boolean = false): void {
closeDiffEditors(indexResources: string[] | undefined, workingTreeResources: string[] | undefined, ignoreSetting = false): void {
const config = workspace.getConfiguration('git', Uri.file(this.root));
if (!config.get<boolean>('closeDiffOnOperation', false) && !ignoreSetting) { return; }
@ -1693,7 +1693,7 @@ export class Repository implements Disposable {
await this.run(Operation.Push, () => this._push(remote, branch, undefined, undefined, forcePushMode));
}
async pushTo(remote?: string, name?: string, setUpstream: boolean = false, forcePushMode?: ForcePushMode): Promise<void> {
async pushTo(remote?: string, name?: string, setUpstream = false, forcePushMode?: ForcePushMode): Promise<void> {
await this.run(Operation.Push, () => this._push(remote, name, setUpstream, undefined, forcePushMode));
}
@ -1983,7 +1983,7 @@ export class Repository implements Disposable {
return ignored;
}
private async _push(remote?: string, refspec?: string, setUpstream: boolean = false, followTags = false, forcePushMode?: ForcePushMode, tags = false): Promise<void> {
private async _push(remote?: string, refspec?: string, setUpstream = false, followTags = false, forcePushMode?: ForcePushMode, tags = false): Promise<void> {
try {
await this.repository.push(remote, refspec, setUpstream, followTags, forcePushMode, tags);
} catch (err) {
@ -2524,7 +2524,7 @@ export class Repository implements Disposable {
return true;
}
public isBranchProtected(name: string = this.HEAD?.name ?? ''): boolean {
public isBranchProtected(name = this.HEAD?.name ?? ''): boolean {
return this.isBranchProtectedMatcher ? this.isBranchProtectedMatcher(name) : false;
}