Example #1
0
        private TypeScriptType GetMaybeNullableComplexType(TypeScriptUnit unit, ITypeInfo type, IPropertyInfo property, bool isNullable)
        {
            var propertyType = BuildAndImportType(unit, property, type);

            if (property.PropertyType.IsGenericParameter)
            {
                propertyType = new TypeScriptTypeReference(property.PropertyType.Name);
            }

            return(TypeScriptGeneratorHelpers.BuildTargetNullableTypeByOptions(propertyType, isNullable, Options));
        }
Example #2
0
 public TypeScriptGenericTypeReference(TypeScriptTypeReference genericTypeReference, TypeScriptType[] genericArguments)
 {
     this.genericTypeReference = genericTypeReference;
     this.genericArguments     = genericArguments;
 }