1/*
2* Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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*/
15import { AsyncCallback, Callback } from './../basic';
16
17declare namespace napitest {
18    interface DataInfo {
19        dataName: string;
20        dataIndex: number;
21    }
22
23    export enum EOptions {
24        OPTION0 = 0,
25        OPTION1 = 500,
26        OPTION2 = 503,
27    }
28
29    class TestClass1 {
30        fun10(): Promise<void>;
31        fun11(): Promise<number>;
32        fun12(): Promise<boolean>;
33        fun13(): Promise<string>;
34        fun14(v1: number): Promise<DataInfo>;
35        fun15(v1: number): Promise<DataInfo>;
36        fun16(v1: number): Promise<Array<string>>;
37
38        funX11(v1: number, v2: string, cb: AsyncCallback<string>): void;
39        funX11(v1: number, v2: string, ): Promise<string>;
40
41        funX12(v1: number, v2: string, ): Promise<number>;
42        funX12(v1: number, v2: string, cb: AsyncCallback<number>): void;
43    }
44
45    function fun0(): Promise<void>;
46    function fun1(): Promise<number>;
47    function fun2(): Promise<boolean>;
48    function fun3(): Promise<string>;
49    function fun4(v1: number): Promise<DataInfo>;
50    function fun5(v1: number): Promise<EOptions>;
51    function fun6(v1: number): Promise<Array<string>>;
52
53    function funX1(v1: number, v2: string, cb: AsyncCallback<string>): void;
54    function funX1(v1: number, v2: string): Promise<string>;
55
56    function funX2(v1: number, v2: string): Promise<number>;
57    function funX2(v1: number, v2: string, cb: AsyncCallback<number>): void;
58}
59
60export default napitest;
61