Creatio mobile app - use setTimeout or setInterval

Hi,
is it possible to use setTimeout or setInterval functionality in the remote module for the Creatio Freedom UI mobile app? Unfortunately, when trying to build the project, I get an error:

TS2304: Cannot find name 'setTimeout'

Like 1

Like

2 comments

Hello,

Regarding the TS2304: Cannot find name 'setTimeout' error you’re encountering, there are two possible solutions:

  • Install the @types/node package to include Node.js type definitions.
  • Alternatively, you can use (globalThis as any).setTimeout() in place of setTimeout().

Either approach should resolve the issue.

Hi, thanks for the reply. I already had the @types/node package installed before, but the (globalThis as any).setTimeout workaround did the trick, thank you! Interestingly, it seems like the setTimeout function was added intentionally, since it doesn't exist in JavaScriptCore natively. However, I don't see clearTimeout there.

Show all comments