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 Test { 19 name: string; 20 age: number; 21 } 22 23 interface Entry { 24 key: number[]; 25 value: string[]; 26 isExit: boolean[]; 27 } 28 29 function testArray(v: string[]): string[]; 30 function testArray1(v: number[]): number[]; 31 function testArray2(v: boolean[]): boolean[]; 32 function fun4(v1: string[], v2: Test[]): number[]; 33 function fun5(v1: number[], v2: Test[]): string[]; 34 function fun6(v1: boolean[], v2: Test[]): boolean[]; 35 function fun21(v: string, v1: Entry[]): Entry[]; 36 37 /* ----以下接口,当前工具不支持,Aarray<>书写方式支持 38 function fun1(v1: string[], v2: AsyncCallback<string[]>): void; 39 function fun1(v1: string[]): Promise<string[]>; 40 function fun2(v1: number[], v2: AsyncCallback<number[]>): void; 41 function fun2(v1: number[]): Promise<number[]>; 42 function fun3(v1: boolean[], v2: AsyncCallback<boolean[]>): void; 43 function fun3(v1: boolean[]): Promise<boolean[]>; 44 function fun7(v0: string[], v1: { [key: string]: string[] }): number; 45 function fun8(v0: number[], v1: { [key: string]: number[] }): number; 46 function fun9(v0: boolean[], v1: { [key: string]: boolean[] }): number; 47 function fun10(v1: { [key: string]: Test[] }): void; 48 function fun11(v1: Map<string, string[]>): number; 49 function fun12(v1: Map<string, number[]>): string; 50 function fun13(v1: Map<string, boolean[]>): boolean; 51 function fun14(v1: string[], callback: Callback<string[]>): void; 52 function fun15(v1: number[], callback: Callback<number[]>): void; 53 function fun16(v1: boolean[], callback: Callback<boolean[]>): void; 54 function fun17(callback: Callback<Test[]>): void; 55 function fun18(v2: AsyncCallback<Test[]>): void; 56 function fun18(): Promise<Test[]>;*/ 57} 58 59export default napitest;