TSTL target environment is closer to node/bundler, where each module is isolated even if it doesn't contain any imports/exports. Even though in TypeScript the following code declares a global onEvent symbol (mostly because of legacy environments support) in runtime you usually won't expect _G.onEvent to be defined.
function onEvent() {}
listenToEvent(onEvent);
TSTL target environment is closer to node/bundler, where each module is isolated even if it doesn't contain any imports/exports. Even though in TypeScript the following code declares a global
onEventsymbol (mostly because of legacy environments support) in runtime you usually won't expect_G.onEventto be defined.