Discrepancy between Javascript and Typescript in struct module - Effect Community