source: trip-planner-front/node_modules/@ngtools/webpack/src/ivy/cache.js@ 1ad8e64

Last change on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.0 KB
Line 
1"use strict";
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.SourceFileCache = void 0;
11class SourceFileCache extends Map {
12 constructor() {
13 super(...arguments);
14 this.angularDiagnostics = new Map();
15 }
16 invalidate(file) {
17 const sourceFile = this.get(file);
18 if (sourceFile) {
19 this.delete(file);
20 this.angularDiagnostics.delete(sourceFile);
21 }
22 }
23 updateAngularDiagnostics(sourceFile, diagnostics) {
24 if (diagnostics.length > 0) {
25 this.angularDiagnostics.set(sourceFile, diagnostics);
26 }
27 else {
28 this.angularDiagnostics.delete(sourceFile);
29 }
30 }
31 getAngularDiagnostics(sourceFile) {
32 return this.angularDiagnostics.get(sourceFile);
33 }
34}
35exports.SourceFileCache = SourceFileCache;
Note: See TracBrowser for help on using the repository browser.