Skip to content

Commit

Permalink
_allEntries isn't API, #10659
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Jun 20, 2018
1 parent 48d37fc commit b749318
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/vs/workbench/api/node/extHostTypeConverters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export namespace WorkspaceEdit {
const result: WorkspaceEditDto = {
edits: []
};
for (const entry of (value as types.WorkspaceEdit).allEntries()) {
for (const entry of (value as types.WorkspaceEdit)._allEntries()) {
const [uri, uriOrEdits] = entry;
if (Array.isArray(uriOrEdits)) {
// text edits
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/api/node/extHostTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ export class WorkspaceEdit implements vscode.WorkspaceEdit {
return values(textEdits);
}

allEntries(): ([URI, TextEdit[]] | [URI, URI, { overwrite?: boolean, ignoreIfExists?: boolean }])[] {
_allEntries(): ([URI, TextEdit[]] | [URI, URI, { overwrite?: boolean, ignoreIfExists?: boolean }])[] {
let res: ([URI, TextEdit[]] | [URI, URI, { overwrite?: boolean, ignoreIfExists?: boolean }])[] = [];
for (let edit of this._edits) {
if (edit._type === 1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ suite('ExtHostTypes', function () {
edit.replace(URI.parse('foo:a'), new types.Range(2, 1, 2, 1), 'bar');
edit.replace(URI.parse('foo:b'), new types.Range(3, 1, 3, 1), 'bazz');

const all = edit.allEntries();
const all = edit._allEntries();
assert.equal(all.length, 4);

function isFileChange(thing: [URI, types.TextEdit[]] | [URI, URI, { overwrite?: boolean }]): thing is [URI, URI, { overwrite?: boolean }] {
Expand Down Expand Up @@ -418,8 +418,8 @@ suite('ExtHostTypes', function () {
edit.insert(uri, new types.Position(0, 0), 'Hello');
edit.insert(uri, new types.Position(0, 0), 'Foo');

assert.equal(edit.allEntries().length, 2);
let [first, second] = edit.allEntries();
assert.equal(edit._allEntries().length, 2);
let [first, second] = edit._allEntries();
assert.equal((first as [URI, types.TextEdit[]])[1][0].newText, 'Hello');
assert.equal((second as [URI, types.TextEdit[]])[1][0].newText, 'Foo');
});
Expand Down

0 comments on commit b749318

Please sign in to comment.