• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
16import {
17    TsExport
18} from './cpp_test_dynamic_js.js'
19
20@interface MyAnnoName {
21    a: number = 3
22    b: number[] = [13, 9]
23    d: boolean = false
24    str: string = 'Hello'
25}
26
27export function bar() {
28    print('bar logic')
29}
30
31
32
33@__$$ETS_ANNOTATION$$__MyAnnoName({
34    a: 20,
35    b: [13, 10],
36    d: true,
37    str: 'ABC'
38})
39class A {
40    @__$$ETS_ANNOTATION$$__MyAnnoName({
41        a: 10,
42        b: [1, 2, 3],
43        d: true,
44        str: 'DEF'
45    })
46    foo() {
47        print('foo logic')
48        bar()
49    }
50}
51
52namespace MyNamespace {
53    class B {
54        zet() {
55            return new TsExport()
56        }
57    }
58}
59
60(new A()).foo()
61