mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-07 23:08:20 -06:00
Enable the commented out test and convert folder entries to sorted list
This commit is contained in:
parent
72776b0881
commit
eb0955ce57
@ -2355,9 +2355,9 @@ declare module "fs" {
|
||||
verifyRenamingFileInSubFolder(TestFSWithWatch.Tsc_WatchDirectory.NonRecursiveWatchDirectory);
|
||||
});
|
||||
|
||||
// it("uses non recursive dynamic polling when renaming file in subfolder", () => {
|
||||
// verifyRenamingFileInSubFolder(TestFSWithWatch.Tsc_WatchDirectory.DynamicPolling);
|
||||
// });
|
||||
it("uses non recursive dynamic polling when renaming file in subfolder", () => {
|
||||
verifyRenamingFileInSubFolder(TestFSWithWatch.Tsc_WatchDirectory.DynamicPolling);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ interface Array<T> {}`
|
||||
}
|
||||
|
||||
interface Folder extends FSEntry {
|
||||
entries: FSEntry[];
|
||||
entries: SortedArray<FSEntry>;
|
||||
}
|
||||
|
||||
interface SymLink extends FSEntry {
|
||||
@ -512,7 +512,7 @@ interface Array<T> {}`
|
||||
}
|
||||
|
||||
private addFileOrFolderInFolder(folder: Folder, fileOrDirectory: File | Folder | SymLink, ignoreWatch?: boolean) {
|
||||
folder.entries.push(fileOrDirectory);
|
||||
insertSorted(folder.entries, fileOrDirectory, (a, b) => compareStringsCaseSensitive(getBaseFileName(a.path), getBaseFileName(b.path)));
|
||||
folder.modifiedTime = new Date();
|
||||
this.fs.set(fileOrDirectory.path, fileOrDirectory);
|
||||
|
||||
@ -622,7 +622,7 @@ interface Array<T> {}`
|
||||
|
||||
private toFolder(path: string): Folder {
|
||||
const folder = this.toFsEntry(path) as Folder;
|
||||
folder.entries = [];
|
||||
folder.entries = [] as SortedArray<FSEntry>;
|
||||
return folder;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user