Skip to content

Commit a862446

Browse files
committed
Uses backward compatible syntax structures
1 parent af97d76 commit a862446

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/moduleNameResolver.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,9 @@ namespace ts {
290290
const pnpapi = getPnpApi();
291291

292292
const currentPackage = pnpapi.findPackageLocator(`${currentDirectory}/`);
293-
Debug.assert(currentPackage);
293+
Debug.assert(!!currentPackage);
294294

295-
const {packageDependencies} = pnpapi.getPackageInformation(currentPackage);
295+
const {packageDependencies} = pnpapi.getPackageInformation(currentPackage!);
296296

297297
const typeRoots: string[] = [];
298298
for (const [name, referencish] of Array.from<any>(packageDependencies.entries())) {
@@ -1647,12 +1647,12 @@ namespace ts {
16471647
const pnpApi = getPnpApi();
16481648

16491649
const ownerPackage = pnpApi.findPackageLocator(resolvedValue.path);
1650-
Debug.assert(ownerPackage);
1650+
Debug.assert(!!ownerPackage);
16511651

16521652
const rootLocators = pnpApi.getDependencyTreeRoots();
16531653

16541654
return rootLocators.some(root => {
1655-
return root.name === ownerPackage.name && root.reference === ownerPackage.reference;
1655+
return root.name === ownerPackage!.name && root.reference === ownerPackage!.reference;
16561656
});
16571657
}
16581658
}

0 commit comments

Comments
 (0)