mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-02 06:21:50 +01:00
debt - More precise typings
This commit is contained in:
@@ -169,11 +169,11 @@ export class MainThreadDocuments implements MainThreadDocumentsShape {
|
||||
|
||||
// --- from extension host process
|
||||
|
||||
$trySaveDocument(uri: UriComponents): TPromise<boolean> {
|
||||
$trySaveDocument(uri: UriComponents): Thenable<boolean> {
|
||||
return this._textFileService.save(URI.revive(uri));
|
||||
}
|
||||
|
||||
$tryOpenDocument(_uri: UriComponents): TPromise<any> {
|
||||
$tryOpenDocument(_uri: UriComponents): Thenable<any> {
|
||||
const uri = URI.revive(_uri);
|
||||
if (!uri.scheme || !(uri.fsPath || uri.authority)) {
|
||||
return TPromise.wrapError(new Error(`Invalid uri. Scheme and authority or path must be set.`));
|
||||
@@ -203,7 +203,7 @@ export class MainThreadDocuments implements MainThreadDocumentsShape {
|
||||
});
|
||||
}
|
||||
|
||||
$tryCreateDocument(options?: { language?: string, content?: string }): TPromise<URI> {
|
||||
$tryCreateDocument(options?: { language?: string, content?: string }): Thenable<URI> {
|
||||
return this._doCreateUntitled(void 0, options ? options.language : void 0, options ? options.content : void 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user