Skip to content

Instantly share code, notes, and snippets.

@mfaridzia
Last active November 15, 2019 13:31
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 mfaridzia/4998e09818407d6963e863e029a2fb04 to your computer and use it in GitHub Desktop.
Save mfaridzia/4998e09818407d6963e863e029a2fb04 to your computer and use it in GitHub Desktop.
interface IPerson<T> {
name: T;
age: T;
[Key: string]: T;
}
const Arum: IPerson<string | number> = {
name: "Arum",
age: 21,
status: "I Don't Know"
}
console.log(`My name is ${Arum.name}, I am ${Arum.age} years old & status: ${Arum.status}`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment