Skip to content

Commit bf6101a

Browse files
kyliauKeen Yee Liau
authored andcommitted
fix: explicitly type argument for Promise in TS 4.1
TS 4.1 introduced a breaking change in which `resolve` no longer has an optional parameter, so by default, it must now be passed a value, or an explicit type argument must be added. See https://devblogs.microsoft.com/typescript/announcing-typescript-4-1/#resolves-parameters-are-no-longer-optional-in-promises
1 parent d056093 commit bf6101a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function registerNotificationHandlers(client: lsp.LanguageClient) {
6969
location: vscode.ProgressLocation.Window,
7070
title: 'Initializing Angular language features',
7171
},
72-
() => new Promise((resolve) => {
72+
() => new Promise<void>((resolve) => {
7373
client.onNotification(notification.ProjectLoadingFinish, resolve);
7474
}),
7575
);

0 commit comments

Comments
 (0)