Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
let myOptions: int[] = [1, 2];
function test(option1: int, option2: int): void {}
test(...myOptions);
let defaultConfig: string[] = ['data1', 'data2'];
let userConfig: string[] = ['data3', 'data4'];
let finalConfig: string[] = [
...defaultConfig,
...userConfig
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment