The reverse of posFromIndex.
int? indexFromPos(Position pos) => callArg('indexFromPos', pos.toProxy());