The datasheet for the TP4056 LIPO charger I/C shows a 0.4Ω inline resistor between the USB 5V source and the TP4056 Vcc pin. It shows the resistor with a range of 0.2 - 0.5Ω, and it's in a dotted-line box, which may mean it's optional.

I've also found a schematic for the 18650 charger/regulator shield V3, and the relevant part shows both the 0.4Ω resistor and an inline Schottky diode.

I don't understand the purpose of these parts. It's hard to see what effect a 0.4Ω resistor would have on anything. And it's hard to see that the diode has any purpose other than to drop the voltage and generate some heat. Even without the diode, I don't think it's possible for current to flow back through the TP4056 from the battery or load to the VBUS pin. So is it just there to move some heat from the TP4056 (which is a linear part) to the diode, and keep the TP4056 from overheating? I didn't think overheating was a typical problem with the TP4056.
Anyway, if someone could enlighten me, I would appreciate it. I'm going to modify the shield, and could make use of the diode for another purpose if it isn't really needed where it is. If it matters, the charging current is set at 600mA.