Skip to content

Commit 04dbcaf

Browse files
committed
strict null checks: debugConfigurationManager
1 parent 1973e28 commit 04dbcaf

3 files changed

Lines changed: 126 additions & 118 deletions

File tree

src/tsconfig.strictNullChecks.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@
166166
"./vs/workbench/contrib/debug/electron-browser/repl.ts",
167167
"./vs/workbench/contrib/debug/electron-browser/variablesView.ts",
168168
"./vs/workbench/contrib/debug/electron-browser/watchExpressionsView.ts",
169+
"./vs/workbench/contrib/debug/electron-browser/debugConfigurationManager.ts",
169170
"./vs/workbench/contrib/debug/test/browser/baseDebugView.test.ts",
170171
"./vs/workbench/contrib/debug/test/common/debugSource.test.ts",
171172
"./vs/workbench/contrib/debug/test/common/debugUtils.test.ts",

src/vs/workbench/contrib/debug/common/debug.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export interface IThread extends ITreeElement {
250250

251251
/**
252252
* Gets the callstack if it has already been received from the debug
253-
* adapter, otherwise it returns null.
253+
* adapter.
254254
*/
255255
getCallStack(): ReadonlyArray<IStackFrame>;
256256

@@ -618,7 +618,7 @@ export interface IConfigurationManager {
618618
getDebugAdapterDescriptor(session: IDebugSession): Promise<IAdapterDescriptor | undefined>;
619619

620620
registerDebugAdapterFactory(debugTypes: string[], debugAdapterFactory: IDebugAdapterFactory): IDisposable;
621-
createDebugAdapter(session: IDebugSession): IDebugAdapter;
621+
createDebugAdapter(session: IDebugSession): IDebugAdapter | undefined;
622622

623623
substituteVariables(debugType: string, folder: IWorkspaceFolder, config: IConfig): Promise<IConfig>;
624624
runInTerminal(debugType: string, args: DebugProtocol.RunInTerminalRequestArguments, config: ITerminalSettings): Promise<number | undefined>;
@@ -637,9 +637,9 @@ export interface ILaunch {
637637
readonly name: string;
638638

639639
/**
640-
* Workspace of the launch. Can be null.
640+
* Workspace of the launch. Can be undefined.
641641
*/
642-
readonly workspace: IWorkspaceFolder;
642+
readonly workspace: IWorkspaceFolder | undefined;
643643

644644
/**
645645
* Should this launch be shown in the debug dropdown.
@@ -648,15 +648,15 @@ export interface ILaunch {
648648

649649
/**
650650
* Returns a configuration with the specified name.
651-
* Returns null if there is no configuration with the specified name.
651+
* Returns undefined if there is no configuration with the specified name.
652652
*/
653-
getConfiguration(name: string): IConfig;
653+
getConfiguration(name: string): IConfig | undefined;
654654

655655
/**
656656
* Returns a compound with the specified name.
657-
* Returns null if there is no compound with the specified name.
657+
* Returns undefined if there is no compound with the specified name.
658658
*/
659-
getCompound(name: string): ICompound;
659+
getCompound(name: string): ICompound | undefined;
660660

661661
/**
662662
* Returns the names of all configurations and compounds.
@@ -667,7 +667,7 @@ export interface ILaunch {
667667
/**
668668
* Opens the launch.json file. Creates if it does not exist.
669669
*/
670-
openConfigFile(sideBySide: boolean, preserveFocus: boolean, type?: string): Promise<{ editor: IEditor, created: boolean }>;
670+
openConfigFile(sideBySide: boolean, preserveFocus: boolean, type?: string): Promise<{ editor: IEditor | null, created: boolean }>;
671671
}
672672

673673
// Debug service interfaces

0 commit comments

Comments
 (0)