You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CLI uses fibers in order to use sync code instead of callbacks. Fibers are great, but most of the people are not familiar with them. Also Promises are more popular now and they are integrated in Node.js.
TypeScript allows using async/await for getting Promises results instead of chaining .then.
Here are the steps to be taken when fibers are removed and async/await is used instead:
Use sync API for Node core modules, like fs and child_process. Currently CLI uses async versions of the methods and wraps them with futures. In case they are replaced with Promises, each method that uses such method will have to be marked as async. However in case we use the sync versions of the methods (for example use fs.existsSync instead of fs.exists in CLI's file-system.ts). This way some of methods, which should be marked as async, will become absolutely synchronous and we'll not have to await them. PRs: Use sync api of fs telerik/mobile-cli-lib#853, Use sync api of fs #2347
Fix hooks which use $fs, $childProcess, etc. as the code of the methods is changed.
CLI uses fibers in order to use sync code instead of callbacks. Fibers are great, but most of the people are not familiar with them. Also Promises are more popular now and they are integrated in Node.js.
TypeScript allows using async/await for getting Promises results instead of chaining
.then
.Here are the steps to be taken when fibers are removed and async/await is used instead:
fs
andchild_process
. Currently CLI uses async versions of the methods and wraps them with futures. In case they are replaced with Promises, each method that uses such method will have to be marked as async. However in case we use the sync versions of the methods (for example usefs.existsSync
instead offs.exists
in CLI's file-system.ts). This way some of methods, which should be marked asasync
, will become absolutely synchronous and we'll not have toawait
them. PRs: Use sync api of fs telerik/mobile-cli-lib#853, Use sync api of fs #2347The text was updated successfully, but these errors were encountered: