Skip to content

Commit

Permalink
forgot to commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwhit committed Jan 11, 2025
1 parent 26fbf2e commit 5f6b59e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cli/tsc/99_main_compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@ delete Object.prototype.__proto__;
}
: arg;
if (fileReference.fileName.startsWith("npm:")) {
/** @type {[string, ts.Extension] | undefined} */
/** @type {[string, ts.Extension | null] | undefined} */
const resolved = ops.op_resolve(
containingFilePath,
[
Expand All @@ -735,7 +735,7 @@ delete Object.prototype.__proto__;
],
],
)?.[0];
if (resolved) {
if (resolved && resolved[1]) {
return {
resolvedTypeReferenceDirective: {
primary: true,
Expand Down Expand Up @@ -785,15 +785,15 @@ delete Object.prototype.__proto__;
debug(` base: ${base}`);
debug(` specifiers: ${specifiers.map((s) => s[1]).join(", ")}`);
}
/** @type {Array<[string, ts.Extension] | undefined>} */
/** @type {Array<[string, ts.Extension | null] | undefined>} */
const resolved = ops.op_resolve(
base,
specifiers,
);
if (resolved) {
/** @type {Array<ts.ResolvedModuleWithFailedLookupLocations>} */
const result = resolved.map((item) => {
if (item) {
if (item && item[1]) {
const [resolvedFileName, extension] = item;
return {
resolvedModule: {
Expand Down

0 comments on commit 5f6b59e

Please sign in to comment.