Tankless water heaters usually have a warranty that covers the heat exchanger and the parts separately. The heat exchanger is the main part, much like the tank in a tank water hater. Normally, the warranty is for about 10 years on the heat exchanger and 3-5 years on the rest of the parts. This average warranty also reflects on the average life expectancy of tankless heaters – 20 years!
A brief word about warranties. Manufacturers (Of all Products) tend to set warranties at about half of the life expectancy. Your cars, your dishwasher, your water heater, all have a warranty that is about one half of the average life expectancy of that product.
The nice thing is that with a tankless water heater, even if the main part (the heat exchanger) fails after warranty, you have the choice. Replace the heat exchanger or replace the whole unit. You do not have this luxury if you tank fails.