Maybe there could be some #ifdef to not include those NFC methods at all. In fact it is almost like that already and the methods are still there but empty, see https://github.com/espruino/Espruino/blob/master/libs/bluetooth/jswrap_bluetooth.c#L2026
there is check for USE_NFC making the method to do nothing. So not sure why not to remove whole method, I think in other cases methods are removed from same object based on build flags.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
The NRF object has both bluetooth and NFC functionality see header jswrap_bluetooth.h -
https://github.com/espruino/Espruino/blob/master/libs/bluetooth/jswrap_bluetooth.h#L88
Maybe there could be some #ifdef to not include those NFC methods at all. In fact it is almost like that already and the methods are still there but empty, see
https://github.com/espruino/Espruino/blob/master/libs/bluetooth/jswrap_bluetooth.c#L2026
there is check for
USE_NFC
making the method to do nothing. So not sure why not to remove whole method, I think in other cases methods are removed from same object based on build flags.