public static TRoot ReplaceType <TRoot>(this TRoot node, TypeSyntax type, TypeInfo typeInfo) where TRoot : SyntaxNode
        {
            TypeSyntax mappedType = type.GetMappedType(typeInfo);

            return(mappedType.ToString() == type.ToString() ? node : node.ReplaceNode(type, type.GetMappedType(typeInfo).WithTriviaFrom(type)));
        }