• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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@class
16interface IBase {
17    get(): String;
18    set(a: String): void;
19}
20
21@static("IBase")
22function sumSync(a: i32, b: i32): i32;
23
24@static("IBase")
25@gen_async("add")
26@gen_promise("add")
27function addSync(a: i32, b: i32): i32;
28
29@ctor("IBase")
30function getIBase(name: String): IBase;
31
32@ctor("IBase")
33function getIBase_test(name: String, test: String): IBase;
34
35interface ITest {
36    get(): String;
37    set(a: String): void;
38}
39
40@static("ITest")
41@overload("static_test")
42function static_func(a: i32, b: i32): i32;
43
44@static("ITest")
45function ctor_func(): ITest;
46
47@static("IBase")
48@get
49function getName(): String;
50
51@static("IBase")
52@set
53function setName(a: String);
54