It looks like the TypeScript compiler removes unused imports by default, which doesn't work for importsForEvents.js, because it adds code after the import later on but the TypeScript compiler doesn't know about that.
It looks like adding the option "verbatimModuleSyntax": true
in tsconfig.json fixes this - I'll add that to the next beta so it's a default setting.