mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
Use .?method() in more places (#152112)
Switches simple patterns like:
```ts
if (some.thing) {
some.thing.method();
}
```
to:
```ts
some.thing?.method()
```
This is more concise and avoids having to repeat the `some.thing` part
This commit is contained in:
@@ -326,9 +326,7 @@ export class ExtensionHostConnection {
|
||||
const namedPipeServer = net.createServer();
|
||||
namedPipeServer.on('error', reject);
|
||||
namedPipeServer.listen(pipeName, () => {
|
||||
if (namedPipeServer) {
|
||||
namedPipeServer.removeListener('error', reject);
|
||||
}
|
||||
namedPipeServer?.removeListener('error', reject);
|
||||
resolve({ pipeName, namedPipeServer });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user