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(3));
Sample output
{ id: 3, ready: true }
Open this example in the interactive library
const load = async (id: number): Promise<{ id: number; ready: boolean }> => ({
id,
ready: true,
});
console.log(await load(3));
{ id: 3, ready: true }