reinforced-typings

Is there a configuration option in Reinforced.Typings to TsIgnore all properties and methods unless they have a TsProperty attribute set using?


I am using Reinforced.Typings to generate typescript from c#.

There is a way to prevent exporting a property/method by applying the [TsIgnore] attribute to the property/method but I would prefer for it to ignore all properties/methods that don't have [TsFile] or [TsProperty] applied to it.

Is this possible?


Solution

  • Seems like you need auto-export switches

    [TsClass(
        AutoExportMethods = false, 
        AutoExportProperties = false,
        AutoExportFields = false)]
    public class AutoA
    {
    
    }
    
    [TsInterface(AutoExportProperties = false, AutoExportMethods = false)]
    public class AutoB
    {
    
    }
    

    Note that if you are using fluent configuration then - only members will be exported that are specified explicitly e.g. by .WithPublicMethods() or .WithPublicProperties() invocations etc.