Another option is to use SDL's main callbacks, which handle this for you without platform-specific code in your app. Please refer to the wiki or docs/README-main-functions.md in the SDL source code.
Write functions, generics, classes and modules in TypeScript 7 that Node.js runs exactly as you wrote them, and that the compiler checks before they ever run. This repository holds every example from ...