Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

Base classes and interfaces transform into invalid import statements #10

Description

@craigktreasure

Using MTT 0.4.7.

Transforming a class that inherits from an interface:

public class UserProfileViewModel : IIndividual

Results in an interface like the following:

/* Auto Generated */

import { IIndividual } from ""

export interface UserProfileViewModel extends IIndividual {
...
}

It would be great if there were options to specify how to handle these. For instance, in the example I gave, I don't care to emit the interface in the TypeScript definition.

I haven't dug into the code you're using to load the C# yet, but if you're only loading the C# files in the WorkingDirectory, you may never encounter these objects anyways.

If you're open to it, I think reflection could be used on the output binary to find attributed models. Then, those attributes could be used to configure how the model is transformed. Project references would likely need to be resolved, but I think that could be retrieved from msbuild. What do you think?

P.S. I still think it's crazy that after all this time, you're the only one I've found who cares to support .NET Core\Standard in the build rather than through a VS Extension. Thanks for your hard work.

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreflectionOnly possible with reflection

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions