Skip to content

Instantly share code, notes, and snippets.

@tswistak
Last active July 31, 2018 11:19
Show Gist options
  • Save tswistak/40c4aac2e66312bf7c7bbfec36c72598 to your computer and use it in GitHub Desktop.
Save tswistak/40c4aac2e66312bf7c7bbfec36c72598 to your computer and use it in GitHub Desktop.
TypeScript 3.0, listing 4
// JavaScript
function jsHello() {
return [...arguments].join(',');
}
// JavaScript, second way
function jsHello1(...args) {
return args.join(',');
}
// TypeScript
function tsHello(...args: any[]): string {
return args.join(',');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment