Created
August 26, 2018 22:03
-
-
Save glaucia86/abedf00f71d37b313b207567fe070e59 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
/** | |
* Arquivo: tuplas-spread-expression.ts | |
* Author: Glaucia Lemos | |
* Data: 23/08/2018 | |
*/ | |
// Exemplo de tuplas sem uso da expressão spread | |
const args: [number, string, boolean] = [32, 'chocolate', true]; | |
foo(32, 'chocolate', true); | |
// Exemplo da chamada da função com o uso da expressão spread | |
foo(args[0], args[1], args[2]); | |
foo(...args); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment