Created
August 10, 2021 15:41
-
-
Save Ebazhanov/f010dae7ae25e6dbc78d75dfea9636b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface IUser { | |
name: string; | |
email: string; | |
age: number; | |
isMarried: boolean; | |
} | |
const fetchData = (apiUrl: string): Promise<IUser> => { | |
return fetch(apiUrl) | |
.then((response)=> response.json()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment