using System.Diagnostics.CodeAnalysis;
namespace Jint.Runtime.Interop;
///
/// Handles conversions between CLR types.
///
public interface ITypeConverter
{
///
/// Converts value to to type. Throws exception if cannot be done.
///
object? Convert(object? value, Type type, IFormatProvider formatProvider);
///
/// Converts value to to type. Returns false if cannot be done.
///
bool TryConvert(object? value, Type type, IFormatProvider formatProvider, [NotNullWhen(true)] out object? converted);
}