Skip to content

Commit 787b2bd

Browse files
committed
Updates typescript
1 parent 47a2c1d commit 787b2bd

17 files changed

+32
-26
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3339,7 +3339,7 @@
33393339
"husky": "0.14.3",
33403340
"ts-loader": "3.4.0",
33413341
"tslint": "5.9.1",
3342-
"typescript": "2.6.2",
3342+
"typescript": "2.7.1",
33433343
"uglify-es": "3.3.9",
33443344
"uglifyjs-webpack-plugin": "1.1.8",
33453345
"vscode": "1.1.10",

src/annotations/annotationProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export abstract class AnnotationProviderBase extends Disposable {
1919
return editor !== undefined ? (editor as any).id : '';
2020
}
2121

22-
annotationType: FileAnnotationType;
22+
annotationType: FileAnnotationType | undefined;
2323
correlationKey: TextEditorCorrelationKey;
2424
document: TextDocument;
2525
status: AnnotationStatus | undefined;

src/annotations/blameAnnotationProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { GitBlame, GitCommit, GitUri } from '../gitService';
1212
export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase {
1313

1414
protected _blame: Promise<GitBlame | undefined>;
15-
protected _hoverProviderDisposable: Disposable;
15+
protected _hoverProviderDisposable: Disposable | undefined;
1616
protected readonly _uri: GitUri;
1717

1818
constructor(

src/codeLensController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Logger } from './logger';
99

1010
export class CodeLensController extends Disposable {
1111

12-
private _canToggle: boolean;
12+
private _canToggle: boolean = false;
1313
private _disposable: Disposable | undefined;
1414
private _provider: GitCodeLensProvider | undefined;
1515
private _providerDisposable: Disposable | undefined;

src/currentLineController.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,8 @@ export class CurrentLineController extends Disposable {
391391
};
392392
}
393393

394-
private _updateBlameDebounced: ((line: number, editor: TextEditor, trackedDocument: TrackedDocument<GitDocumentState>) => void) & IDeferrable;
394+
private _updateBlameDebounced: (((line: number, editor: TextEditor, trackedDocument: TrackedDocument<GitDocumentState>) => void) & IDeferrable) | undefined;
395+
395396
private async refresh(editor: TextEditor | undefined, options: { full?: boolean, trackedDocument?: TrackedDocument<GitDocumentState> } = {}) {
396397
if (editor === undefined && this._editor === undefined) return;
397398

@@ -462,7 +463,7 @@ export class CurrentLineController extends Disposable {
462463
this._lineTracker.reset();
463464

464465
// Make sure we are still on the same line and not pending
465-
if (this._lineTracker.line !== line || this._updateBlameDebounced.pending!()) return;
466+
if (this._lineTracker.line !== line || (this._updateBlameDebounced && this._updateBlameDebounced.pending!())) return;
466467

467468
const blameLine = editor.document.isDirty
468469
? await Container.git.getBlameForLineContents(trackedDocument.uri, line, editor.document.getText())
@@ -472,7 +473,7 @@ export class CurrentLineController extends Disposable {
472473
let commitLine;
473474

474475
// Make sure we are still on the same line, blameable, and not pending, after the await
475-
if (this._lineTracker.line === line && trackedDocument.isBlameable && !this._updateBlameDebounced.pending!()) {
476+
if (this._lineTracker.line === line && trackedDocument.isBlameable && !(this._updateBlameDebounced && this._updateBlameDebounced.pending!())) {
476477
const state = this.getBlameAnnotationState();
477478
if (state.enabled) {
478479
commitLine = blameLine === undefined ? undefined : blameLine.line;

src/git/formatters/formatter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ type Constructor<T = {}> = new (...args: any[]) => T;
1010

1111
export abstract class Formatter<TItem = any, TOptions extends IFormatOptions = IFormatOptions> {
1212

13-
protected _item: TItem;
14-
protected _options: TOptions;
13+
protected _item!: TItem;
14+
protected _options!: TOptions;
1515

1616
constructor(item: TItem, options?: TOptions) {
1717
this.reset(item, options);

src/git/models/branch.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ export class GitBranch {
2323
branch = branch.substring(8);
2424
this.remote = true;
2525
}
26+
else {
27+
this.remote = false;
28+
}
2629

2730
this.current = current;
2831
this.name = branch;

src/gitCodeLensProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export class GitCodeLensProvider implements CodeLensProvider {
5656

5757
static selector: DocumentSelector = [{ scheme: DocumentSchemes.File }, { scheme: DocumentSchemes.Git }, { scheme: DocumentSchemes.GitLensGit }];
5858

59-
private _debug: boolean;
59+
private _debug: boolean = false;
6060

6161
constructor(
6262
context: ExtensionContext,

src/quickPicks/branches.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export class BranchQuickPickItem implements QuickPickItem {
88

99
label: string;
1010
description: string;
11-
detail: string;
11+
detail: string | undefined;
1212

1313
constructor(
1414
public readonly branch: GitBranch

0 commit comments

Comments
 (0)