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 16let ohIndirectObj = { 17 ohIndirectProp1: 123 18} 19 20let ohShorthand = { 21 ohShorthandProp: 123 22} 23 24module.exports = { 25 // PropertyAssignment 26 ohPropertyAssignment1: 123, 27 'ohPropertyAssignment2': 123, 28 ['ohPropertyAssignment3']: 123, 29 ohPropertyAssignment4: ohIndirectObj, 30 31 // ShorthandPropertyAssignment 32 ohShorthand, 33 34 // MethodDeclaration 35 ohMethod1() {}, 36 'ohMethod2'() {}, 37 ['ohMethod3']() {}, 38 39 // AccessorDeclaration 40 get ohGetProp1() {}, 41 get 'ohGetProp2'() {}, 42 get ['ohGetProp3']() {}, 43 set ohSetProp1(value) {}, 44 set 'ohSetProp2'(value) {}, 45 set ['ohSetProp3'](value) {}, 46} 47 48exports.ohExportElement1 = 1; 49class ohIndirectClass1 { 50 ohIndirectProp2 = 123; 51} 52exports.ohExportElement2 = ohIndirectClass1; 53exports.ohExportElement3 = class ohIndirectClass2 { 54 ohIndirectProp3 = 123; 55} 56exports.ohExportElement4 = class { 57 ohIndirectProp4 = 123; 58} 59 60module.exports.ohExportElement5 = 1; 61module.exports['ohExportElement6'] = 1; 62class ohIndirectClass3 { 63 ohIndirectProp5 = 123; 64} 65module.exports.ohExportElement7 = ohIndirectClass3; 66exports.ohExportElement8 = class ohIndirectClass4 { 67 ohIndirectProp6 = 123; 68} 69module.exports.ohExportElement9 = class { 70 ohIndirectProp7 = 123; 71} 72