1 | (function (factory) {
|
---|
2 | if (typeof module === "object" && typeof module.exports === "object") {
|
---|
3 | var v = factory(require, exports);
|
---|
4 | if (v !== undefined) module.exports = v;
|
---|
5 | }
|
---|
6 | else if (typeof define === "function" && define.amd) {
|
---|
7 | define("@angular/compiler-cli/ngcc/src/dependencies/dts_dependency_host", ["require", "exports", "tslib", "@angular/compiler-cli/ngcc/src/dependencies/esm_dependency_host", "@angular/compiler-cli/ngcc/src/dependencies/module_resolver"], factory);
|
---|
8 | }
|
---|
9 | })(function (require, exports) {
|
---|
10 | "use strict";
|
---|
11 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
12 | exports.DtsDependencyHost = void 0;
|
---|
13 | var tslib_1 = require("tslib");
|
---|
14 | var esm_dependency_host_1 = require("@angular/compiler-cli/ngcc/src/dependencies/esm_dependency_host");
|
---|
15 | var module_resolver_1 = require("@angular/compiler-cli/ngcc/src/dependencies/module_resolver");
|
---|
16 | /**
|
---|
17 | * Helper functions for computing dependencies via typings files.
|
---|
18 | */
|
---|
19 | var DtsDependencyHost = /** @class */ (function (_super) {
|
---|
20 | tslib_1.__extends(DtsDependencyHost, _super);
|
---|
21 | function DtsDependencyHost(fs, pathMappings) {
|
---|
22 | return _super.call(this, fs, new module_resolver_1.ModuleResolver(fs, pathMappings, ['', '.d.ts', '/index.d.ts', '.js', '/index.js']), false) || this;
|
---|
23 | }
|
---|
24 | /**
|
---|
25 | * Attempts to process the `importPath` directly and also inside `@types/...`.
|
---|
26 | */
|
---|
27 | DtsDependencyHost.prototype.processImport = function (importPath, file, dependencies, missing, deepImports, alreadySeen) {
|
---|
28 | return _super.prototype.processImport.call(this, importPath, file, dependencies, missing, deepImports, alreadySeen) ||
|
---|
29 | _super.prototype.processImport.call(this, "@types/" + importPath, file, dependencies, missing, deepImports, alreadySeen);
|
---|
30 | };
|
---|
31 | return DtsDependencyHost;
|
---|
32 | }(esm_dependency_host_1.EsmDependencyHost));
|
---|
33 | exports.DtsDependencyHost = DtsDependencyH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