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<ITypeInfo, bool> accept,
             return this;
         }
 
+        public CustomTypeGenerator WithTypeBuildingContext(Func<ITypeInfo, bool> accept, Func<ITypeInfo, ITypeBuildingContext> createContext)
+        {
+            typeBuildingContextRules.Add(new TypeBuildingContextRule(accept, createContext));
+            return this;
+        }
+
         public CustomTypeGenerator WithPropertyResolver(IPropertyResolver propertyResolver)
         {
             propertyResolvers.Add(propertyResolver);