debug.createProcess better signature

This commit is contained in:
isidor
2017-06-21 15:41:28 +02:00
parent a44d58c776
commit ba1b600620
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -527,7 +527,7 @@ export interface IDebugService {
/**
* Creates a new debug process. Depending on the configuration will either 'launch' or 'attach'.
*/
createProcess(config: IConfig): TPromise<any>;
createProcess(config: IConfig): TPromise<IProcess>;
/**
* Restarts a process or creates a new one if there is no active session.
@@ -664,7 +664,7 @@ export class DebugService implements debug.IDebugService {
));
}
public createProcess(config: debug.IConfig): TPromise<any> {
public createProcess(config: debug.IConfig): TPromise<debug.IProcess> {
return this.textFileService.saveAll().then(() =>
this.configurationManager.resloveConfiguration(config).then(resolvedConfig => {
if (!resolvedConfig) {
@@ -724,7 +724,7 @@ export class DebugService implements debug.IDebugService {
);
}
private doCreateProcess(configuration: debug.IConfig): TPromise<any> {
private doCreateProcess(configuration: debug.IConfig): TPromise<debug.IProcess> {
const sessionId = generateUuid();
this.updateStateAndEmit(sessionId, debug.State.Initializing);
@@ -817,8 +817,8 @@ export class DebugService implements debug.IDebugService {
extensionName: `${adapter.extensionDescription.publisher}.${adapter.extensionDescription.name}`,
isBuiltin: adapter.extensionDescription.isBuiltin,
launchJsonExists: !!this.configurationService.getConfiguration<debug.IGlobalConfig>('launch')
});
}).then(undefined, (error: any) => {
}).then(() => process);
}).then(p => p, (error: any) => {
if (error instanceof Error && error.message === 'Canceled') {
// Do not show 'canceled' error messages to the user #7906
return TPromise.as(null);