Skip to content

Instantly share code, notes, and snippets.

@amcdnl
Created April 12, 2019 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amcdnl/ecde687d07fb023ec4e5cff31ba4ba71 to your computer and use it in GitHub Desktop.
Save amcdnl/ecde687d07fb023ec4e5cff31ba4ba71 to your computer and use it in GitHub Desktop.
class Foo {
do(name: string, userObj: object);
do(name: string, age: string | object, birthday: string) {
if (typeof age !== 'string') {
// do thing
} else {
// do other thing
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment