storage.ts ×7

Frontier kind: Code frontier

unlabeled · c_fa407e209a9f

464 tests · 12443 LOC · 50 files · introduces 0 tests · 17 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
10 ranges17 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1777 ranges12443 lines · 50 files · Browse complete extent
All tests (intent)
464 testsBrowse complete intent

Neighbourhood graph

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.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 17 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/platform/storage/common/storage.ts 13 introduced LOC · 7 ranges

Open complete file

312
313 export function loadKeyTargets(storage: IStorage): IKeyTargets {
314 > const keysRaw = storage.get(TARGET_KEY); storage.ts
315 > if (keysRaw) {
316 try {
317 return JSON.parse(keysRaw);
590
591 private getKeyTargets(scope: StorageScope): IKeyTargets {
592 > switch (scope) { storage.ts
593 > case StorageScope.APPLICATION_SHARED:
594 return this.applicationSharedKeyTargets;
595 > case StorageScope.APPLICATION: storage.ts
596 return this.applicationKeyTargets;
597 > case StorageScope.PROFILE: storage.ts
598 return this.profileKeyTargets;
599 > default: storage.ts
600 return this.workspaceKeyTargets;
601 > } storage.ts
602 > }
603
604 private loadKeyTargets(scope: StorageScope): { [key: string]: StorageTarget } {
605 > const storage = this.getStorage(scope); storage.ts
606 >
607 > return storage ? loadKeyTargets(storage) : Object.create(null);
608 > }
609
610 isNew(scope: StorageScope): boolean {
src/vs/base/parts/storage/common/storage.ts 4 introduced LOC · 3 ranges

Open complete file

358
359 private get hasPending() {
360 > return this.pendingInserts.size > 0 || this.pendingDeletes.size > 0; storage.ts
361 > }
362
363 private async flushPending(): Promise<void> {
396
397 private async doFlush(delay?: number): Promise<void> {
398 > if (this.options.hint === StorageHint.STORAGE_IN_MEMORY) { storage.ts
399 return this.flushPending(); // return early if in-memory
400 }
401
402 return this.flushDelayer.trigger(() => this.flushPending(), delay);
403 > } storage.ts
404
405 async whenFlushed(): Promise<void> {