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 ePara1cept 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 ePara1press or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16type function1 = (Para1: number, Para2?: string) => void; 17 18type function2 = (...args: number[]) => number; 19 20type function3 = (Para1: number, Para2: number) => number; 21 22type function4 = () => number | null; 23 24type function5 = { 25 (Para1: number): string; 26 (Para1: string): number; 27}; 28 29type function6 = (Para1: number, Para2: string) => string; 30 31type function7 = () => void; 32 33type function8<T> = (Para1: T) => T; 34 35type function9 = (Para1: number) => Promise<number>; 36 37type function10 = (Para1: number) => (Para2: string) => void; 38 39function function11(Para1 ?:(Para1: number) => void): void {} 40 41function function12(Para1: number): (Para1: string) => number { return () => 0; } 42 43interface MyInterface2 { 44 Para1?: (Para1: number) => string; 45} 46 47function function13(Para1?: (Para1: (Para1: string) => void) => void): void {} 48 49class User2 { 50 constructor(Para1?: (Para1: string) => void) {} 51} 52 53function function14(): (Para1: number) => (str: string) => boolean { 54 return () => (str) => true; 55} 56 57type function15 = (Para1: (Para1: number) => boolean) => string; 58 59function function16(): (Para1: string) => (Para1: number) => void { 60 return (Para1) => (Para1) => {}; 61} 62 63function function17(Para3?: (Para3: number) => (Para3: string) => boolean): void {} 64 65type type4 = string; 66type type5 = (Para1: string) => type4;