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:
@@ -495,9 +495,7 @@ export abstract class ExtHostDebugServiceBase implements IExtHostDebugService, E
|
||||
}
|
||||
|
||||
const da = this._debugAdapters.get(debugAdapterHandle);
|
||||
if (da) {
|
||||
da.sendMessage(message);
|
||||
}
|
||||
da?.sendMessage(message);
|
||||
}
|
||||
|
||||
public $stopDASession(debugAdapterHandle: number): Promise<void> {
|
||||
@@ -663,9 +661,7 @@ export abstract class ExtHostDebugServiceBase implements IExtHostDebugService, E
|
||||
|
||||
public async $acceptDebugSessionNameChanged(sessionDto: IDebugSessionDto, name: string): Promise<void> {
|
||||
const session = await this.getSession(sessionDto);
|
||||
if (session) {
|
||||
session._acceptNameChanged(name);
|
||||
}
|
||||
session?._acceptNameChanged(name);
|
||||
}
|
||||
|
||||
public async $acceptDebugSessionCustomEvent(sessionDto: IDebugSessionDto, event: any): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user