Skip to content

Partial interfaces generate duplicate classes #320

Closed

Description

@frederic-arr

Describe the bug

We have a pretty large hub and have decided to split the interface declaration into partial interfaces. Unfortunately, this causes duplicate code in the generated output.

To Reproduce

[Hub]
partial interface IClientHub
{
    Task Join(int clientId);
    Task Leave(int clientId);
}

partial interface IClientHub
{
    Task SomeFunction();
}

The TypedSignalR.Client/index.ts generated output will contain two declaration

class IClientHub_HubProxy implements IClientHub {
    // ...
}

class IClientHub_HubProxyFactory implements HubProxyFactory<IClientHub> {
    // ...
}

class IClientHub_HubProxy implements IClientHub {
    // ...
}

class IClientHub_HubProxyFactory implements HubProxyFactory<IClientHub> {
    // ...
}

Expected behavior

A single class should be generated containing all the declared method of the partial interfaces.

Activity

  1. nenoNaninu commented on Jan 14, 2026

    @nenoNaninu
    Owner

    /codex

  2. github-actions commented on Jan 14, 2026

    @github-actions

    ✅ PR created: #322

    #322

  3. nenoNaninu commented on Jan 14, 2026

    @nenoNaninu
    Owner

    /codex

  4. github-actions commented on Jan 14, 2026

    @github-actions

    ℹ️ Codex ran but no changes were made.

  5. nenoNaninu commented on Jan 14, 2026

    @nenoNaninu
    Owner

    /codex

  6. github-actions commented on Jan 14, 2026

    @github-actions

    ℹ️ Codex ran but no changes were made.

  7. nenoNaninu commented on Jan 15, 2026

    @nenoNaninu
    Owner

    Partial interfaces are supported from v1.17.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions