Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wealthfront-data-fetching-blog-post/95ee689e987639cba31e3eca9562e230 to your computer and use it in GitHub Desktop.
Save wealthfront-data-fetching-blog-post/95ee689e987639cba31e3eca9562e230 to your computer and use it in GitHub Desktop.
interface User {
name: string;
}
const api = {
getUser: (userId: number) => {
return new Promise<User>((resolve) => {
resolve({
name: 'Elan',
});
});
},
};
const user = await api.getUser(userId)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment