diff --git a/TypeScript.ContractGenerator/CustomTypeGenerator.cs b/TypeScript.ContractGenerator/CustomTypeGenerator.cs index 4f50e9c..c4c2826 100644 --- a/TypeScript.ContractGenerator/CustomTypeGenerator.cs +++ b/TypeScript.ContractGenerator/CustomTypeGenerator.cs @@ -108,6 +108,12 @@ public CustomTypeGenerator WithTypeBuildingContext(Func accept, return this; } + public CustomTypeGenerator WithTypeBuildingContext(Func accept, Func createContext) + { + typeBuildingContextRules.Add(new TypeBuildingContextRule(accept, createContext)); + return this; + } + public CustomTypeGenerator WithPropertyResolver(IPropertyResolver propertyResolver) { propertyResolvers.Add(propertyResolver);