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 function fun1(v: string): string; 19 function fun2(v1: string, v2: string[]): string[]; 20 function fun3(v1: Array<string>, v2: string): Array<string>; 21 function fun4(v: { [key: string]: string }): string; 22 function fun5(v1: Map<string, string>, v2: string): string; 23 function fun6(v1: string, callback: AsyncCallback<string>): void; 24 function fun6(v1: string): Promise<string>; 25 function fun7(v: string, v1: AsyncCallback<Array<string>>): void; 26 function fun7(v: string): Promise<Array<string>>; 27 function fun9(v1: string, callback: Callback<string>): void; 28 function fun10(v1: Test): Test; 29 function fun11(v: string, v1: string, v2: string): void; 30 function fun12(v1: Test1): void; 31 function fun13(v: number, v1: string, v2: string): void; 32 function fun14(v: string, v1: string, v2: number): void; 33 interface Test { 34 age: string; 35 height: string[]; 36 width: Array<string>; 37 } 38 39 interface Test1 { 40 address: {[key: string]: string}; 41 lon: Map<string, string>; 42 } 43 44 function fun8(v1: string, callback: AsyncCallback<string[]>): void; 45 function fun8(v1: string): Promise<string[]>; 46} 47 48export default napitest; 49