( srcs: string, replacer: (arg: ImageCandidate) => Promise<string>, )
| 796 | } |
| 797 | |
| 798 | export function processSrcSet( |
| 799 | srcs: string, |
| 800 | replacer: (arg: ImageCandidate) => Promise<string>, |
| 801 | ): Promise<string> { |
| 802 | return Promise.all( |
| 803 | parseSrcset(srcs).map(async ({ url, descriptor }) => ({ |
| 804 | url: await replacer({ url, descriptor }), |
| 805 | descriptor, |
| 806 | })), |
| 807 | ).then(joinSrcset) |
| 808 | } |
| 809 | |
| 810 | export function processSrcSetSync( |
| 811 | srcs: string, |
no test coverage detected