Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mariasolos/path-rewrite-bug


https://github.com/mariasolos/path-rewrite-bug

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

## To repro:

Run:

```bash
pnpm install
pnpm build
```

Package `mod3` produces an invalid type declaration file:

```typescript
export declare const getFoo: () => import("mod1").Foo;
//# sourceMappingURL=index.d.ts.map
```

Despite not depending on `mod1`, its types import from it. Since `mod2` re-exports `mod1`s types, and since `mod3` depends on `mod2`, compiling `mod3` should produce this:

```typescript
export declare const getFoo: () => import("mod2").Foo;
//# sourceMappingURL=index.d.ts.map
```

```diff
-export declare const getFoo: () => import("mod1").Foo;
+export declare const getFoo: () => import("mod2").Foo;
//# sourceMappingURL=index.d.ts.map
```

Because `mod3` has an invalid `index.d.ts`, `mod4` fails compilation when doing a lib check of `mod3`'s type declaration files.