/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import b from 'assert';
//array
let c = 1;
let d = [0, c, 3];
b(c === 1);
b(d[0] === 0);
b(d[1] === 1);
b(d[2] === 3);
let [e, f, g] = d;
b(e === 0);
b(f === 1);
b(g === 3);
[, ,] = [...d];
//object
let h = { a1: 1, b1: c + 1, c1: 3 };
b(h.a1 === 1);
b(h.b1 === 2);
b(h.c1 === 3);
let { c1: i, a1: j, b1: k } = h;
b(i === 3);
b(j === 1);
b(k === 2);
class l {
    a1: number;
    b1: number;
    c1: number;
    constructor([s, t, u]: Array<number>) {
        this.a1 = s;
        this.b1 = t;
        this.c1 = u;
    }
}
function a([m, n, o]: Array<number>, { a1: p, b1: q, c1: r }: l) {
    m;
    n;
    o;
    p;
    q;
    r;
    b(m === 10);
    b(n === 21);
    b(o === 20);
    b(p === 0);
    b(q === 1);
    b(r === 3);
}
a([10, c + 20, 20], new l([...d]));
