• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 Human {
19        name: string;
20        age: number;
21    }
22
23    function fun1(v0:string, v1?: string, v2?: number, v3?: boolean): number;
24    interface TestClass1 {
25		interFun1(v0?:string, v1?: string, v2?: number, v3?: boolean): number;
26    }
27	function fun21(v0: string, v1?: Array<string>,v2?:Array<number>,v3?:Array<boolean>): number;
28    function fun22(v0: string, v1?: string[],v2?:number[],v3?:boolean[]): number;
29    function fun23(v0: string, v1?: AsyncCallback<string>): number;
30    function fun23(v0: string): Promise<string>;
31	interface TestClass2 {
32        interFun21(v0?: Array<number>, v1?: Array<string>, v2?: Array<boolean>): number;
33        interFun22(v0?: number[], v1?: string[], v2?: boolean[]): number;
34    }
35	function fun31(v0: string, v1?: {[key:string]:number}): number;
36    function fun32(v0: string, v1?: Map<string,string>): number;
37    interface TestClass3 {
38        interFun31(v0:string, v1?: {[key:string]:number}): number;
39        interFun32(v0:string, v1?: Map<string,boolean>): number;
40    }
41    export enum GrantStatus {
42        PERMISSION_DEFAULT = "",
43        PERMISSION_DENIED = "-1",
44        PERMISSION_GRANTED = "2",
45        PERMISSION_PASS = "3",
46    }
47    export enum HttpStatus {
48        STATUS0 = 0,
49        STATUS1 = 500,
50        STATUS2 = 503,
51    }
52    function fun41(v0?: HttpStatus, v1?: GrantStatus): number;
53    function fun42(reason: string, callback?: Callback<HttpStatus>): void;
54    function fun51(v0?: Human, v1?: Human, v2?: Human): number;
55    function fun52(v0?: Human, v2?: Array<Human>): number;
56    function fun53(v0?: Human, callback?: Callback<Human>): void;
57    interface TestClass4 {
58        interFun51(v0?: Human, v1?: Human, v2?: Human): number;
59    }
60    function fun61(v0?: {name: string, age: number}): number;
61}
62
63export default napitest;
64