Need some help with MIDI clock sync [RESOLVED]

Hi, I need some help with MIDI Sync. The idea is to use external MIDI clock signal to sync an LFO that in turn controls a synth parameters.

I have made a generic function nextTick, where all that needs to happen is foreseen.
The idea is to trigger nextTick via timer.onTick or via transport.onClock, whatever is enabled (it’s currently always one or the other).

So my program foresees the following instructions:

function timer.onTick ()
nextTick()
end

function transport.onClock (midiInput)
nextTick()
end

When the timer is enabled, the logic works fine. But when transport is enabled (and timer disabled) and a MIDI clock is received, the logger states :

22:13:23.718 lua: function onClock does not exist
22:13:23.754 lua: function onClock does not exist

etc

And the nextTick function is obviously not invoked. I thought that by creating the function transport.onClock this error would not happen. What should I be doing differently?

EDIT
Figured it out: the documentation is outdated.
The function is no longer transport.onClock but midi.onClock.