Open this example in the interactive library
Source code
const load = async (id: number): Promise<{ id: number; ready: boolean }> => ({
id,
ready: true,
});
console.log(await load(2).then(({ id }): string => "job-" + id));
Sample output
job-2

Open this example in the interactive library
const load = async (id: number): Promise<{ id: number; ready: boolean }> => ({
id,
ready: true,
});
console.log(await load(2).then(({ id }): string => "job-" + id));
job-2