Typescript "Call by Reference"

Hi there,

Im new to this whole MakeCode Enviroment and im trying to build my own block which, for example, should just measure the time a process needs.
So I did a Bracket block and declared it like the following:

* Get Cycle time
//% block=“Cycle time obj $time”
//% inlineInputMode=inline
//% handlerStatement=1
//% group=“Time”
export function getCycleTime(time: any,body: () => void): void {
time = //here are some operations for the function the block should have

so now I got the problem that I cant give the function the reference of my variable in typescript and I cant pass it as a Object or Array.
Is there a chance to pass the variable as a reference or declare a static variable for the block that I can use afterwards ?

Hope someone can help me :dizzy_face: