Created
March 26, 2020 01:17
-
-
Save trblackw/57683d59601bd8001df3455d8f8e6936 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 CreateUserRequest { | |
username: string; | |
age: number; | |
email: string; | |
} | |
interface UpdateUserRequest { | |
username?: string; | |
age?: number; | |
email?: string; | |
} | |
const createUser = (user: CreateUserRequest) => { | |
//fetch request that requires all User properties | |
} | |
const updateUser = (user: UpdateUserRequest) => { | |
//fetch request that doesn't require any User properties | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment