Skip to content

Commit a316c83

Browse files
committed
Use void to ignore sendNotification Promise
Prefix this.languageClient.sendNotification calls with the void operator to explicitly discard the returned Promise and avoid floating-promise/unused-Promise warnings. Applied to notifications sent for DidCloseTextDocumentNotificationType and DidOpenTextDocumentNotificationType when iterating open PowerShell documents.
1 parent 4cf5e00 commit a316c83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/session.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,14 +1205,14 @@ Type 'help' to get help.
12051205

12061206
for (const document of openPowerShellDocuments) {
12071207
const uri = document.uri.toString();
1208-
this.languageClient.sendNotification(
1208+
void this.languageClient.sendNotification(
12091209
DidCloseTextDocumentNotificationType,
12101210
{
12111211
textDocument: { uri },
12121212
},
12131213
);
12141214

1215-
this.languageClient.sendNotification(
1215+
void this.languageClient.sendNotification(
12161216
DidOpenTextDocumentNotificationType,
12171217
{
12181218
textDocument: {

0 commit comments

Comments
 (0)