1/* 2 * Copyright (c) 2025 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16let a = [1, , , 3]; 17let b = []; 18let c: number[] = []; 19 20let d = Promise.race<number>([]); 21let e = Promise.all<number>([]); 22let f = Promise.allSettled<number>([]); 23let g = Promise.any<number>([]); 24let h = Promise.resolve<number[]>([]); 25 26let d1 = Promise.race([]); 27let e1 = Promise.all([]); 28let f1 = Promise.allSettled([]); 29let g1 = Promise.any([]); 30let h1 = Promise.resolve([]); 31 32let i = Promise.race<number>([1.0]); 33let j = Promise.all<number>([2.0]); 34let k = Promise.allSettled<number>([3.0]); 35let l = Promise.any<number>([4.0]); 36let m = Promise.resolve<number[]>([5.0]); 37 38let i1 = Promise.race([1]); 39let j1 = Promise.all([2]); 40let k1 = Promise.allSettled([3]); 41let l1 = Promise.any([4]); 42let m1 = Promise.resolve([5]);