Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with latest TS nightly #120690

Merged
merged 2 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"p-limit": "^3.1.0",
"plist": "^3.0.1",
"source-map": "0.6.1",
"typescript": "^4.3.0-dev.20210330",
"typescript": "^4.3.0-dev.20210407",
"vsce": "1.48.0",
"vscode-universal": "deepak1556/universal#61454d96223b774c53cda10f72c2098c0ce02d58"
},
Expand Down
8 changes: 4 additions & 4 deletions build/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1884,10 +1884,10 @@ typescript@^4.1.3:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==

typescript@^4.3.0-dev.20210330:
version "4.3.0-dev.20210330"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.0-dev.20210330.tgz#d8ac321a4083b30159b47c9aa21d9026d66bc3c5"
integrity sha512-QvcevtZWd2yflF5499EUAxao78bIHRzvzoZdPZKB0V+nh5RkTPQzrQXPxd76pv/cIaumqUhvlB+SEI8KB2COIw==
typescript@^4.3.0-dev.20210407:
version "4.3.0-dev.20210407"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.0-dev.20210407.tgz#9a64dab0cd55c3baaee9a08d5eba5b6d2bee586c"
integrity sha512-zblU754+4x72OX0sWijDz/XmW6K4rgJ5DDYxLfrySU8QJWXR4i6VRgkBP03Jq1EjUfOR6cYsRXl5/wU0LNrhpA==

uc.micro@^1.0.1, uc.micro@^1.0.5:
version "1.0.5"
Expand Down
6 changes: 3 additions & 3 deletions extensions/git/src/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ class CheckoutItem implements QuickPickItem {

class CheckoutTagItem extends CheckoutItem {

get description(): string {
override get description(): string {
return localize('tag at', "Tag at {0}", this.shortCommit);
}
}

class CheckoutRemoteHeadItem extends CheckoutItem {

get description(): string {
override get description(): string {
return localize('remote branch at', "Remote branch at {0}", this.shortCommit);
}

async run(repository: Repository, opts?: { detached?: boolean }): Promise<void> {
override async run(repository: Repository, opts?: { detached?: boolean }): Promise<void> {
if (!this.ref.name) {
return;
}
Expand Down
6 changes: 3 additions & 3 deletions extensions/markdown-language-features/src/features/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class MarkdownPreview extends Disposable implements WebviewResourceProvider {
this.updatePreview();
}

dispose() {
override dispose() {
super.dispose();
this._disposed = true;
clearTimeout(this.throttleTimer);
Expand Down Expand Up @@ -537,7 +537,7 @@ export class StaticMarkdownPreview extends Disposable implements ManagedMarkdown
private readonly _onDidChangeViewState = this._register(new vscode.EventEmitter<vscode.WebviewPanelOnDidChangeViewStateEvent>());
public readonly onDidChangeViewState = this._onDidChangeViewState.event;

dispose() {
override dispose() {
this._onDispose.fire();
super.dispose();
}
Expand Down Expand Up @@ -682,7 +682,7 @@ export class DynamicMarkdownPreview extends Disposable implements ManagedMarkdow
private readonly _onDidChangeViewStateEmitter = this._register(new vscode.EventEmitter<vscode.WebviewPanelOnDidChangeViewStateEvent>());
public readonly onDidChangeViewState = this._onDidChangeViewStateEmitter.event;

dispose() {
override dispose() {
this._preview.dispose();
this._webviewPanel.dispose();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PreviewStore<T extends ManagedMarkdownPreview> extends Disposable {

private readonly _previews = new Set<T>();

public dispose(): void {
public override dispose(): void {
super.dispose();
for (const preview of this._previews) {
preview.dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class ThrottledDelayer<T> extends Delayer<Promise<T>> {
this.throttler = new Throttler<T>();
}

public trigger(promiseFactory: ITask<Promise<T>>, delay?: number): Promise<Promise<T>> {
public override trigger(promiseFactory: ITask<Promise<T>>, delay?: number): Promise<Promise<T>> {
return super.trigger(() => this.throttler.queue(promiseFactory), delay);
}
}
2 changes: 1 addition & 1 deletion extensions/simple-browser/src/simpleBrowserView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class SimpleBrowserView extends Disposable {
this.show(url);
}

public dispose() {
public override dispose() {
this._onDidDispose.fire();
super.dispose();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const localize = nls.loadMessageBundle();

export class TypeScriptReferencesCodeLensProvider extends TypeScriptBaseCodeLensProvider {
public constructor(
protected client: ITypeScriptServiceClient,
client: ITypeScriptServiceClient,
protected _cachedResponse: CachedResponse<Proto.NavTreeResponse>,
private modeId: string
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class DiagnosticsManager extends Disposable {
this._currentDiagnostics = this._register(vscode.languages.createDiagnosticCollection(owner));
}

public dispose() {
public override dispose() {
super.dispose();

for (const value of this._pendingUpdates.values) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class TagClosing extends Disposable {
this._disposables);
}

public dispose() {
public override dispose() {
super.dispose();
this._disposed = true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class ProcessBasedTsServer extends Disposable implements ITypeScriptServe
this._process.write(serverRequest);
}

public dispose() {
public override dispose() {
super.dispose();
this._callbacks.destroy('server disposed');
this._pendingResponses.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType
return this._configuration;
}

public dispose() {
public override dispose() {
super.dispose();

this.bufferSyncSupport.dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class TypingsStatus extends Disposable {
this._client.onDidEndInstallTypings(event => this.onEndInstallTypings(event.eventId)));
}

public dispose(): void {
public override dispose(): void {
super.dispose();

for (const timeout of this._acquiringTypings.values()) {
Expand Down Expand Up @@ -68,7 +68,7 @@ export class AtaProgressReporter extends Disposable {
this._register(client.onTypesInstallerInitializationFailed(_ => this.onTypesInstallerInitializationFailed()));
}

dispose(): void {
override dispose(): void {
super.dispose();
this._promises.forEach(value => value());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ class AbcEditor extends Disposable {
});
}

public dispose() {
public override dispose() {
if (this.isDisposed) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"style-loader": "^1.0.0",
"ts-loader": "^6.2.1",
"tsec": "0.1.4",
"typescript": "^4.3.0-dev.20210330",
"typescript": "^4.3.0-dev.20210407",
"typescript-formatter": "7.1.0",
"underscore": "^1.8.2",
"vinyl": "^2.0.0",
Expand Down
18 changes: 9 additions & 9 deletions src/vs/base/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,19 +240,19 @@ export function withUndefinedAsNull<T>(x: T | undefined): T | null {
return typeof x === 'undefined' ? null : x;
}

type AddFirstParameterToFunction<T, TargetFunctionsReturnType, FirstParameter> = T extends (...args: any[]) => TargetFunctionsReturnType ?
// Function: add param to function
(firstArg: FirstParameter, ...args: Parameters<T>) => ReturnType<T> :

// Else: just leave as is
T;

/**
* Allows to add a first parameter to functions of a type.
*/
export type AddFirstParameterToFunctions<Target, TargetFunctionsReturnType, FirstParameter> = {

// For every property
[K in keyof Target]:

// Function: add param to function
Target[K] extends (...args: any[]) => TargetFunctionsReturnType ? (firstArg: FirstParameter, ...args: Parameters<Target[K]>) => ReturnType<Target[K]> :

// Else: just leave as is
Target[K]
// For every property
[K in keyof Target]: AddFirstParameterToFunction<Target[K], TargetFunctionsReturnType, FirstParameter>;
};

/**
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9648,10 +9648,10 @@ typescript@^2.6.2:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4"
integrity sha1-PFtv1/beCRQmkCfwPAlGdY92c6Q=

typescript@^4.3.0-dev.20210330:
version "4.3.0-dev.20210330"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.0-dev.20210330.tgz#d8ac321a4083b30159b47c9aa21d9026d66bc3c5"
integrity sha512-QvcevtZWd2yflF5499EUAxao78bIHRzvzoZdPZKB0V+nh5RkTPQzrQXPxd76pv/cIaumqUhvlB+SEI8KB2COIw==
typescript@^4.3.0-dev.20210407:
version "4.3.0-dev.20210407"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.0-dev.20210407.tgz#9a64dab0cd55c3baaee9a08d5eba5b6d2bee586c"
integrity sha512-zblU754+4x72OX0sWijDz/XmW6K4rgJ5DDYxLfrySU8QJWXR4i6VRgkBP03Jq1EjUfOR6cYsRXl5/wU0LNrhpA==

typical@^4.0.0:
version "4.0.0"
Expand Down