(packageInfo: PackageInfo, target: string)
| 137 | }) |
| 138 | |
| 139 | const targetToDeclaration = (packageInfo: PackageInfo, target: string): string | undefined => { |
| 140 | const relativeTarget = target.replace(/^\.\//, "") |
| 141 | const declaration = relativeTarget.endsWith(".d.ts") |
| 142 | ? relativeTarget |
| 143 | : relativeTarget.replace(/\.(?:mjs|cjs|js|mts|cts|ts)$/, ".d.ts") |
| 144 | return declaration.endsWith(".d.ts") ? path.resolve(packageInfo.root, declaration) : undefined |
| 145 | } |
| 146 | |
| 147 | const expandPattern = Effect.fnUntraced(function*( |
| 148 | packageInfo: PackageInfo, |