mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 15:01:57 +01:00
make vscode.d.ts use a declare module, #13990
* a declared module allows to have a sibling module containing experimental API * this change also cleans up some bogous type pollution that happened because vscode used to be both, a declare module and a global namespace
This commit is contained in:
@@ -6,14 +6,14 @@
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { workspace, window, Position, Range, commands } from 'vscode';
|
||||
import { workspace, window, Position, Range, commands, TextEditor, TextDocument } from 'vscode';
|
||||
import { createRandomFile, deleteFile, cleanUp } from './utils';
|
||||
|
||||
suite('editor tests', () => {
|
||||
|
||||
teardown(cleanUp);
|
||||
|
||||
function withRandomFileEditor(initialContents: string, run: (editor: vscode.TextEditor, doc: vscode.TextDocument) => Thenable<void>): Thenable<boolean> {
|
||||
function withRandomFileEditor(initialContents: string, run: (editor: TextEditor, doc: TextDocument) => Thenable<void>): Thenable<boolean> {
|
||||
return createRandomFile(initialContents).then(file => {
|
||||
return workspace.openTextDocument(file).then(doc => {
|
||||
return window.showTextDocument(doc).then((editor) => {
|
||||
@@ -57,7 +57,7 @@ suite('editor tests', () => {
|
||||
});
|
||||
});
|
||||
|
||||
function executeReplace(editor: vscode.TextEditor, range: Range, text: string, undoStopBefore: boolean, undoStopAfter: boolean): Thenable<boolean> {
|
||||
function executeReplace(editor: TextEditor, range: Range, text: string, undoStopBefore: boolean, undoStopAfter: boolean): Thenable<boolean> {
|
||||
return editor.edit((builder) => {
|
||||
builder.replace(range, text);
|
||||
}, { undoStopBefore: undoStopBefore, undoStopAfter: undoStopAfter });
|
||||
|
||||
Reference in New Issue
Block a user