Add comment clarifying isNotNeededPackage (#17321)

This commit is contained in:
Andy 2017-07-26 07:09:22 -07:00 committed by GitHub
parent f667357aad
commit 124510e409

View file

@ -256,6 +256,8 @@ namespace ts {
for (const typeDirectivePath of host.getDirectories(root)) {
const normalized = normalizePath(typeDirectivePath);
const packageJsonPath = pathToPackageJson(combinePaths(root, normalized));
// `types-publisher` sometimes creates packages with `"typings": null` for packages that don't provide their own types.
// See `createNotNeededPackageJSON` in the types-publisher` repo.
// tslint:disable-next-line:no-null-keyword
const isNotNeededPackage = host.fileExists(packageJsonPath) && readJson(packageJsonPath, host).typings === null;
if (!isNotNeededPackage) {