1/* 2 * Copyright (c) 2024 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 16/** 17 * hello world1 18 */ 19console.log("--------") 20const str1 = `这是第一行 21这是第二行 22这是第三行`; 23console.log("----log 1----") 24class ClassTest { 25 prop1: string = '1'; // keep 26 prop2: number = 2; // keep 27 myprop: number = 3; // keep 28 aaaaaaaa: number = 4; // keep 29 h: number = 5; 30 // keep functionkeep 31 functionkeep() { 32 console.log("---log 2-----") 33 return `function name should be kept.`; 34 } 35 } 36 console.log("---log 3-----") 37 const str2 = `这是第四行 38 这是第五行 39 这是第六行`; 40 41 /** 42 * hello world2 43 */ 44 function foo() { 45 let var1 = 1; 46 let var2= 2 47 }