Skip to content

Instantly share code, notes, and snippets.

@Joe1220
Created September 30, 2018 07:04
Show Gist options
  • Save Joe1220/f9aeb84e775239b7c810b16454d42049 to your computer and use it in GitHub Desktop.
Save Joe1220/f9aeb84e775239b7c810b16454d42049 to your computer and use it in GitHub Desktop.
interface User {
id: number;
name: string;
address: string;
wait: boolean
}
const info = {
id: "1",
name: "joe1220",
address: "[email protected]",
wait: false
}
function create_mail(info: User): string { // what is info's type?
return `${name}'s id is ${id}. his email address is ${address}.
The email will be determined based on the wait(${wait}) value. `
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment