Skip to content

Named re-exports do not include type representations #634

@marcus-sa

Description

@marcus-sa

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';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions