write some typescript code below

the code will be executed in a dynamic worker. you must define a function called codemode.