[playground](https://typescripttolua.github.io/play#code/PQKhAIAEDsHsGUCmAbAZgSWgMQJbMeCMAFAAmiAxsgIYBOBqArtBQC46zTgAOtO0rABQA6UXQDmAZwBc4ZgGs4Ad2gBtALoBKWQDdYOUgG5ixfK3CTGAI0kU+VxLVmDN4ALwA+cHoPHi-VkdUagoCAAlqaFJ8cABvVFhYKzpZSVY+aHEAXxNEAA9uWFpzJhZ2TgtrW3tEQQorZ1dPb31SbXAIqJjY4nA+yps7HAdad3B6437welZGWi54xOSncAAiBKS6VazjHOIKTjTwAAsxy0GawV7+l3cvHqmp3gDBY+EN5c1J-pyvk3PqsNHABCFyGcDAYCSY6wRjIUg8DLmdZLLbEIA) This is a similar situation to recursive functions. The correct lua should declare the variable separately from assigning it in these circumstances. ```lua local h h = ____exports.subscribe( function() print(h.foobar) end ) ```
playground
This is a similar situation to recursive functions. The correct lua should declare the variable separately from assigning it in these circumstances.