I know I can do this:
function (value: [boolean, string]) { const [boolValue, stringValue] = value; // make use of boolValue and stringValue }
But can I do something like this?
// doesn't work function ([boolValue: boolean, stringValue: string]) { // make use of boolValue and stringValue }
Well, I figured this out, could also post an answer. It works:
function ([boolValue, stringValue]: [boolean, string]) { // make use of boolValue and stringValue }
Source: https://habr.com/ru/post/1657658/More articles:Angular 2 Application Structure: Circular Module Dependencies - angularHow can you correctly associate F # functions in a string for a set of operations performed in a list? - .netHow to combine `css-modules` with regular` sass`, preferably in `webpack` - sassvue.js, a simple v-for / v-bind to add an index to a class name - vue.jsКаков правильный подход к созданию UberShader с использованием функции function_constants в Metal? - iosUnable to install any ruby stones on Mac OS - SSL_connect error - ruby | fooobar.comAngular 2 Markup - if String is empty, display something else - operatorsVirtualBox Teleportation (VM migration) error: Could not load 'cpum' block - virtual-machineHow to use vao and buffers in OpenGL 4.5 - c ++How .map / works. Subscribe to Angular2? - angularAll Articles