(typesVersions)
| 42472 | var typeScriptVersion; |
| 42473 | /* @internal */ |
| 42474 | function getPackageJsonTypesVersionsPaths(typesVersions) { |
| 42475 | if (!typeScriptVersion) |
| 42476 | typeScriptVersion = new ts.Version(ts.version); |
| 42477 | for (var key in typesVersions) { |
| 42478 | if (!ts.hasProperty(typesVersions, key)) |
| 42479 | continue; |
| 42480 | var keyRange = ts.VersionRange.tryParse(key); |
| 42481 | if (keyRange === undefined) { |
| 42482 | continue; |
| 42483 | } |
| 42484 | // return the first entry whose range matches the current compiler version. |
| 42485 | if (keyRange.test(typeScriptVersion)) { |
| 42486 | return { version: key, paths: typesVersions[key] }; |
| 42487 | } |
| 42488 | } |
| 42489 | } |
| 42490 | ts.getPackageJsonTypesVersionsPaths = getPackageJsonTypesVersionsPaths; |
| 42491 | function getEffectiveTypeRoots(options, host) { |
| 42492 | if (options.typeRoots) { |
no test coverage detected