promise: make sure as() returns promise like and fix errors

This commit is contained in:
Benjamin Pasero
2017-11-08 12:33:39 +01:00
parent 94e9b107fb
commit 4ec5250582
38 changed files with 66 additions and 58 deletions

View File

@@ -54,12 +54,12 @@ export class MainThreadTask implements MainThreadTaskShape {
}
});
this._activeHandles[handle] = true;
return TPromise.as<void>(undefined);
return TPromise.wrap<void>(undefined);
}
public $unregisterTaskProvider(handle: number): TPromise<any> {
this._taskService.unregisterTaskProvider(handle);
delete this._activeHandles[handle];
return TPromise.as<void>(undefined);
return TPromise.wrap<void>(undefined);
}
}