ååããæ¢ã«ã¯ã¯ã¯ã¯ãããã®APIã¯ããªãã¨Promiseãè¿ãsetTimeoutãsetIntervalé¢æ°ãæä¾ãã¦ãã¾ãï¼æé«ã§ã⦠ã¨ããããã§ä»åã¯ããã®ç´¹ä»ã§ãã åºæ¬çãªä½¿ãæ¹ await setTimeout(1000) âãããã§ãããã§ãï¼ç´ æ´ããããªãã§ããï¼ï¼ top-level await ã for-awaitã¨çµã¿åãããã¨ãããªæãã§æ¸ãã¾ã import { setTimeout } from 'timers/promises'; console.log('start'); await setTimeout(1000); // ããã§ãããï¼ï¼ console.log('1s passed'); import { setInterval } from 'timers/promises'; console.log('start'); for await (
{{#tags}}- {{label}}
{{/tags}}