Could you write me a fully type-safe TypeScript Array#map except with an async callback?
system
kya aap mujhe puri tarah se tip-sef tipscript sarani#maanchitr likh sakate hai, sivaay ek Async colbach ke saath?
user
yahan ek puri tarah se tip-sef acincronas aire#map fnction tipscript main likhaa gaya he.
async fnction asyncarraymap <tatv, vaapasi> (
        sarani: tatv [],
        colbach: (item: tatv, suchakank: sankhya, sarani: tatv []) => vaapasi |vaada <vaapasi>
): vaada <u []> {
        cast parinaam: vaapasi [] = [];
        for (let ai = 0; main <array.length; i ++) {
                results.push (pratiksha colbach (sarani [i], i, sarani));
        }
        parinaam lautaaen;
}

yah fnction ek loop ke liye pradaan karata he jo pradaan kiye gaye sarani main prayek tatv par punrariti karata he or us par colbach ko lagu karata he, phir parinami maanon ko ek nae sarani main dhakelta he, jise loop ke liye puraa hone ke baad vah lautataa he.yah sarani main tatwon ke prakaar kaa pratinidhitiv karne ke liye ek generik prakaar parameter tatv kaa upyog karata he, or colbach ke ritern prakaar kaa pratinidhitiv karne ke liye ek generik prakaar parameter ritern.
assistant
<|system|>
</s>
<|user|>
kya aap mujhe puri tarah se tip-sef tipscript sarani#maanchitr likh sakate hai, sivaay ek Async colbach ke saath?</s>
<|assistant|>
yahan ek puri tarah se tip-sef acincronas aire#map fnction tipscript main likhaa gaya he.
async fnction asyncarraymap <tatv, vaapasi> (
        sarani: tatv [],
        colbach: (item: tatv, suchakank: sankhya, sarani: tatv []) => vaapasi |vaada <vaapasi>
): vaada <u []> {
        cast parinaam: vaapasi [] = [];
        for (let ai = 0; main <array.length; i ++) {
                results.push (pratiksha colbach (sarani [i], i, sarani));
        }
        parinaam lautaaen;
}

yah fnction ek loop ke liye pradaan karata he jo pradaan kiye gaye sarani main prayek tatv par punrariti karata he or us par colbach ko lagu karata he, phir parinami maanon ko ek nae sarani main dhakelta he, jise loop ke liye puraa hone ke baad vah lautataa he.yah sarani main tatwon ke prakaar kaa pratinidhitiv karne ke liye ek generik prakaar parameter tatv kaa upyog karata he, or colbach ke ritern prakaar kaa pratinidhitiv karne ke liye ek generik prakaar parameter ritern.</s>
