Skip to content

Commit b9cf960

Browse files
authored
Merge pull request #229 from arethetypeswrong/bug/224
Fix named exports check crash when resolution is JS-only
2 parents c09df85 + def786e commit b9cf960

File tree

4 files changed

+795
-1
lines changed

4 files changed

+795
-1
lines changed

.changeset/dry-jokes-accept.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@arethetypeswrong/core": patch
3+
---
4+
5+
Fix named exports check crash when resolution is JS-only

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineCheck({
77
name: "NamedExports",
88
dependencies: ({ entrypoints, subpath, resolutionKind, programInfo }) => {
99
const entrypoint = entrypoints[subpath].resolutions[resolutionKind];
10-
const typesFileName = entrypoint.resolution?.fileName;
10+
const typesFileName = entrypoint.resolution?.isTypeScript && entrypoint.resolution.fileName;
1111
const resolutionOption = getResolutionOption(resolutionKind);
1212
const typesModuleKind = typesFileName ? programInfo[resolutionOption].moduleKinds?.[typesFileName] : undefined;
1313
const implementationFileName = entrypoint.implementationResolution?.fileName;
416 KB
Binary file not shown.

0 commit comments

Comments
 (0)