Skip to content

Commit e900285

Browse files
committed
Add comment
1 parent 0f14937 commit e900285

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/core/src/internal/checks/exportDefaultDisagreement.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ export default defineCheck({
2828
return [typesFileName, implementationFileName];
2929
},
3030
execute: ([typesFileName, implementationFileName], context) => {
31+
// Technically, much of this implementation should go in `dependencies`, since
32+
// different resolution modes can result in different program graphs, resulting
33+
// in different types, which are queried heavily here. However, it would be much
34+
// more expensive to run this type-heavy code in `dependencies`, where it would
35+
// reevaluate for every entrypoint/resolution matrix cell, when chances are
36+
// extremely high that a given pair of types/implementation files are intended
37+
// to act the same under all resolution modes.
3138
if (!typesFileName || !implementationFileName || !ts.hasTSFileExtension(typesFileName)) {
3239
return;
3340
}

0 commit comments

Comments
 (0)