export function isRecentFolder(curr: IRecent): curr is IRecentFolder {
}
export function isRecentFile(curr: IRecent): curr is IRecentFile {
Frontier kind: Joint frontier
unlabeled · c_6d6c65d9c0be
2 tests · 9488 LOC · 45 files · introduces 1 test · 46 LOC · 1 file
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1Every collected test enters the hierarchy at exactly one concept.
1 test introduced at this concept.
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 46 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
export function isRecentFolder(curr: IRecent): curr is IRecentFolder {
}
export function isRecentFile(curr: IRecent): curr is IRecentFile {
export type RecentlyOpenedStorageData = object;
function isSerializedRecentWorkspace(data: unknown): data is ISerializedRecentWorkspace {
workspaces.ts
const candidate = data as ISerializedRecentWorkspace | undefined;
return typeof candidate?.workspace === 'object' && typeof candidate.workspace.id === 'string' && typeof candidate.workspace.configPath === 'string';
}
function isSerializedRecentFolder(data: unknown): data is ISerializedRecentFolder {
workspaces.ts
const candidate = data as ISerializedRecentFolder | undefined;
return typeof candidate?.folderUri === 'string';
}
const candidate = data as ISerializedRecentFile | undefined;
return typeof candidate?.fileUri === 'string';
}
export function restoreRecentlyOpened(data: RecentlyOpenedStorageData | undefined, logService: ILogService): IRecentlyOpened {
if (data) {
const restoreGracefully = function <T>(entries: T[], onEntry: (entry: T, index: number) => void) {
for (let i = 0; i < entries.length; i++) {
try {
onEntry(entries[i], i);
} catch (e) {
logService.warn(`Error restoring recent entry ${JSON.stringify(entries[i])}: ${e.toString()}. Skip entry.`);
}
};
const storedRecents = data as ISerializedRecentlyOpened;
if (Array.isArray(storedRecents.entries)) {
restoreGracefully(storedRecents.entries, entry => {
const label = entry.label;
const remoteAuthority = entry.remoteAuthority;
if (isSerializedRecentWorkspace(entry)) {
result.workspaces.push({ label, remoteAuthority, workspace: { id: entry.workspace.id, configPath: URI.parse(entry.workspace.configPath) } });
} else if (isSerializedRecentFolder(entry)) {
result.workspaces.push({ label, remoteAuthority, folderUri: URI.parse(entry.folderUri) });
} else if (isSerializedRecentFile(entry)) {
result.files.push({ label, remoteAuthority, fileUri: URI.parse(entry.fileUri) });
}
});
}
}
return result;
}
export function toStoreData(recents: IRecentlyOpened): RecentlyOpenedStorageData {