LeftRight to TopBottom TypeScript code.