deepkit-framework icon indicating copy to clipboard operation
deepkit-framework copied to clipboard

Named re-exports do not include type representations

Open marcus-sa opened this issue 7 months ago • 0 comments

When authoring libraries, external APIs are typically exposed through named re-exports in entry points for explicit control. However, Deepkit doesn't properly modify these named re-exports to include the generated type representations, causing errors when users import types from the library.

Example

Given the following source files:

context.ts

export interface Context {
  // ...
}

index.ts

export { Context } from './context.js';

The current compiled output is:

context.d.ts

export declare type __ΩContext = any[];

context.js

const __ΩContext = [/* ... */];
export { __ΩContext as __ΩContext };

index.d.ts

export { Context } from './context.js';

index.js

export { Context } from './context.js';

Expected Behavior

The index.js and index.d.ts file should automatically include the generated type representation in their exports:

export { Context, __ΩContext } from './context.js';

marcus-sa avatar Mar 09 '25 14:03 marcus-sa