Volvo says it is going all-in on electric cars in an effort to turn the company into something of a Tesla alternative.

To that end, the company has announced that half its cars will be battery electric models by 2024, according to a report in Road & Track earlier this year. It has also dedicated its high-performance Polestar brand to selling all-electric cars. As if to underline that statement, Volvo announced Thursday that it would introduce no new cars with diesel engines after 2019. Currently, Volvo sells diesels only outside the United States.

The Swedish company also told Road & Track that it will not develop any more gasoline engines when its current 2.0-liter turbo technology reaches the end of its life.

DON'T MISS: Volvo to electrify all cars from 2019: 'end of internal-combustion engine alone'

There's a big caveat to those electrification claims though. In an interview with The Drive, Volvo Cars CEO Hakan Samuelsson said that by 2024, "Half (of the cars in Volvo's lineup) will be fully electric, and the rest hybrid."

Then he added the all-important caveat: "Ultimately, it's the customer that will decide," he said. "We will be flexible."

Polestar 1

Polestar 1

Certainly it's encouraging to see an automaker as big as Volvo making such a commitment to electric cars, but that caveat can't be ignored. If Volvo built all its cars with batteries and consumers didn't turn up in showrooms to buy them, the company would go out of business. Volvo has to be flexible just as any business does.

On the other hand, if Volvo never built electric cars, or built only a few of them, its customers wouldn't have the opportunity to choose electric cars, and Volvo might not know if its customers wanted them.

Alongside the company's pledge to build EVs for half its fleet and not to develop any more internal combustion engines, the rest of its lineup will likely consist of plug-in hybrids, such as Volvo's T8 models, as well as conventional hybrids, likely with 48-volt mild-hybrid systems that are under development.

In any case, the Swedish car company is now owned by Geely Group, a Chinese automaker. Since China is likely to be the largest market for electric cars, Volvo could direct its sales there if it doesn't find enough takers in the West.

Volvo's public claims—and independent reports—signal that the company is looking toward the future with good intentions. But it's worth remembering that good intentions don't always pan out in business. It will be interesting to see if Volvo manages the transition.