public static bool IsSame(this TypescriptTypeReference t1, TypescriptTypeReference t2) { if (t1 == null || t2 == null) { return(t1 == t2); } if (!IsSame(t1.GenericParameters, t2.GenericParameters)) { return(false); } if (t1.ReferencedType != null) { return(IsSame(t1.ReferencedType, t2.ReferencedType)); } if (t1.TypeName != t2.TypeName) { return(false); } return(IsSame(t1.Raw, t2.Raw)); }
private void Generate(TypescriptTypeReference obj) { if (!String.IsNullOrEmpty(obj.TypeName)) { Formatter.Write(obj.TypeName); } else if (obj.Raw != null) { Generate(obj.Raw); } else { GenerateReference(obj.ReferencedType); } if (obj.GenericParameters.Count > 0) { Formatter.Write("<"); Formatter.WriteSeparated(", ", obj.GenericParameters, Generate); Formatter.Write(">"); } }
public ArrayType(TypescriptTypeReference elementType) { ElementType = elementType; }
public void Add(TypescriptTypeReference tref) { Add((RawStatementBase)tref); }
public RawStatementTypeReference(TypescriptTypeReference typeRef = null) { TypeReference = typeRef; }