Skip to content

Commit 124510e

Browse files
author
Andy
authored
Add comment clarifying isNotNeededPackage (#17321)
1 parent f667357 commit 124510e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/compiler/moduleNameResolver.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ namespace ts {
256256
for (const typeDirectivePath of host.getDirectories(root)) {
257257
const normalized = normalizePath(typeDirectivePath);
258258
const packageJsonPath = pathToPackageJson(combinePaths(root, normalized));
259+
// `types-publisher` sometimes creates packages with `"typings": null` for packages that don't provide their own types.
260+
// See `createNotNeededPackageJSON` in the types-publisher` repo.
259261
// tslint:disable-next-line:no-null-keyword
260262
const isNotNeededPackage = host.fileExists(packageJsonPath) && readJson(packageJsonPath, host).typings === null;
261263
if (!isNotNeededPackage) {

0 commit comments

Comments
 (0)