Depends on what you mean by edger. If you just mean a weedwacker turned sideways, a reasonably priced cordless can do that. If you mean digs a long lasting blade into the ground to provide a hard edge, you need a ~1.5 HP minimum gas edger to do that.
Weed wacker duty alone, sure a cordless can do that fine for grass and non-woody vegetation, with the 40V significantly closer to 2 cycle gas power. They are not as powerful as a commercial grade 2 cycle but can still get the job done if you don't have a lot needing more than a few tens of minutes use between recharges.
Are you already invested in a cordless tool set, maybe even one with 40V batteries? You can still get a bit done with 18V, but you might want to buy from somewhere with a good return policy.