TypeScript ã® Promise ã®å ã ã¨ãåãã©ã¡ã¼ã¿ã Promise#then å´ãããªãã¦ã Promise#catch å´ã®åã any ã«ãªã£ã¦ãã¾ã£ã¦ä¸ä¾¿ã ã ãããcatch å´ã®åã«ã¤ãã¦ãåå¼æ°ã§æå®ã§ãããªããããå®å ¨ãªããã°ã©ãã³ã°ãã§ããã ããã§ãcatch å´ã®åãæå®ãã¦ããªãçç±ã«ã¤ãã¦èå¯ãã¦ã¿ãã çæ³ const promise: IdealPromise<T, E> = getPromise(); promise .then((x) => { /* x 㯠T å */ }); promise .catch((e) => { /* e 㯠E å */ }); å®é const promise: Promise<T> = getPromise(); promise .then((x) => { /* x 㯠T å */ }); prom
{{#tags}}- {{label}}
{{/tags}}