/napi_generator/test/storytest/test_map/ |
D | @ohos.test.d.ts | 30 fun1(v: {[key: string]: string},v1:string): number; 31 fun2(v: {[key: string]: number}): number; 32 fun3(v: {[key: string]: boolean}): number; 33 fun4(v: {[key: string]: Array<string>}): number; 34 fun5(v: {[key: string]: Array<number>}): number; 35 fun6(v: {[key: string]: Array<boolean>}): number; 36 fun7(v: {[key: string]: {[key: string]: string}}): number; 37 fun8(v: Map<string,Map<string,string>>): number; 38 fun9(v: {[key: string]: Human}): number; 39 fun10(v: Map<string,Human>): number; [all …]
|
/napi_generator/test/storytest/test_type/ |
D | @ohos.test.d.ts | 44 catFunc1(v: MyString): MyString; 45 catFunc2(v: MyNumberType): MyNumberType; 46 catFunc3(v: MyBool): MyBool; 47 catFunc4(v: Plant): string; 48 catFunc5(v: number): Plant; 51 function fun1(v: Plant): number; 52 function fun2(v: boolean): Plant; 54 function fun4(v: string): MyString; 55 function fun5(v: number): MyNumberType; 56 function fun6(v: boolean): MyBool; [all …]
|
/napi_generator/src/gen/generate/ |
D | enum.js | 33 let v = data.element[i] 39 implH += ` static const std::string %s;\n`.format(v.name) 40 … implCpp += `\nconst std::string %s::%s = "%s";\n`.format(name, v.name, v.value) 41 …enumMap%s["%s"] = "%s";\n'.format(inNamespace, nameSpaceName, toolNamespace, name, v.name, v.value) 43 if (v.value == '') { 44 v.value = 0 46 implH += ` %s = %s,\n`.format(v.name, v.value) 47 …p%s["%s"] = %s;\n'.format(inNamespace, nameSpaceName, toolNamespace, name, v.name, v.value)
|
D | class.js | 130 let v = data.value[i] 131 generateVariable(v.name, v.type, variable, name) 135 ….format(v.name, inNamespace, toolNamespace, name, v.name, v.name, inNamespace, toolNamespace, name…
|
/napi_generator/test/storytest/test_array_map/ |
D | @ohos.test.d.ts | 42 function fun1(v: Array<{[key: string]:string}>): number; 43 function fun2(v: Array<{[key: string]:number}>): number; 44 function fun3(v: Array<{[key: string]:boolean}>): number; 46 function fun8(v: Array<Map<string, string>>): number; 47 function fun9(v: Array<Map<string, number>>): number; 48 function fun10(v: Array<Map<string, boolean>>): number;
|
/napi_generator/test/storytest/test_any/ |
D | @ohos.test.d.ts | 35 function fun1(v: any, v1: string): number; 36 function fun2(v: number, v1: TestClass1): number; 37 function fun4(v: number, v1: Array<any>): number; 38 function fun5(v: string, v1: any[]): number; 39 function $fun6(v: boolean, param: Array<any>): number; 40 function fun8(v1: string[], v?: any): number;
|
/napi_generator/src/gen/analyze/ |
D | function.js | 59 function getFuncParaType(v, interfaceName, data, results) { argument 60 let arrayType = re.match("(Async)*Callback<(Array<([a-zA-Z_0-9]+)>)>", v["type"]) 61 let parameter = v["type"] 63 parameter = re.getReg(v["type"], arrayType.regs[2]) 68 … v["type"] = v["type"].replace(parameter, "NUMBER_TYPE_" + NumberIncrease.getAndIncrease()) 70 v["type"] = v["type"].replace(parameter, "string") 81 v["type"] = v["type"].replace(parameter, "NUMBER_TYPE_" + NumberIncrease.getAndIncrease()) 82 v["realType"] = v["type"] 84 v["type"] = v["type"].replace(parameter, "string") 92 …terfaceType = re.match("{([A-Za-z0-9_]+:[A-Za-z0-9_,]+)([A-Za-z0-9_]+:[A-Za-z0-9_]+)}$", v["type"]) [all …]
|
D | params.js | 75 let v = checkOutBody(values, 0, ["", ","]) 76 if (v === null) { 77 v = values 80 values = values.substring(v.length, values.length) 81 let matchs = re.match("([a-zA-Z_0-9\\.]+)(\\?*): *([a-zA-Z<,>|_0-9\\[\\]\\(\\):='{}]+)", v) 84 matchs = re.match("([a-zA-Z_0-9\\.]+)(\\?*): *\"([a-zA-Z|_0-9\\[\\]\\(\\):='{}]+)\"", v) 87 let type = re.getReg(v, matchs.regs[3]) 92 let valueName = re.getReg(v, matchs.regs[1]) 95 let optionalFlag = re.getReg(v, matchs.regs[2]) === '?' ? true : false; 101 NapiLog.logError("Invalid parameter [%s] of function [%s],".format(v, funcName) [all …]
|
/napi_generator/test/storytest/test_class/ |
D | @ohos.test.d.ts | 62 fun1(v: number): number; 64 fun3: (v: number, v1: string, v2: boolean) => boolean; 65 fun4: (mancc: Map<string, string>,v?: string) => Array<number>; 67 fun6: (v: string[], v1: { [key: string]: boolean }) => string[]; 70 fun10(v: Image): string; 73 fun11(v: LaunchReason): string; 74 fun12(v: TestStatus): string; 75 fun13(v: TestEnumString): string; 86 function func4(v: TestClassLater): string; 179 function funcTest(v: Type): boolean; // enum为参数 [all …]
|
/napi_generator/test/storytest/test_string/ |
D | @ohos.test.d.ts | 18 function fun1(v: string): string; 21 function fun4(v: { [key: string]: string }): string; 25 function fun7(v: string, v1: AsyncCallback<Array<string>>): void; 26 function fun7(v: string): Promise<Array<string>>; 29 function fun11(v: string, v1: string, v2: string): void; 31 function fun13(v: number, v1: string, v2: string): void; 32 function fun14(v: string, v1: string, v2: number): void;
|
/napi_generator/hdc/appCodeGen/src/analyze/ |
D | params.js | 75 let v = checkOutBody(values, 0, ["", ","]) 76 if (v === null) { 77 v = values 80 values = values.substring(v.length, values.length) 81 let matchs = re.match("([a-zA-Z_0-9\\.]+)(\\?*): *([a-zA-Z<,>|_0-9\\[\\]\\(\\):='{}]+)", v) 84 matchs = re.match("([a-zA-Z_0-9\\.]+)(\\?*): *\"([a-zA-Z|_0-9\\[\\]\\(\\):='{}]+)\"", v) 87 let type = re.getReg(v, matchs.regs[3]) 92 let valueName = re.getReg(v, matchs.regs[1]) 95 let optionalFlag = re.getReg(v, matchs.regs[2]) === '?' ? true : false; 101 NapiLog.logError("Invalid parameter [%s] of function [%s],".format(v, funcName) [all …]
|
D | function.js | 59 function getFuncParaType(v, interfaceName, data, results) { argument 60 let arrayType = re.match("(Async)*Callback<(Array<([a-zA-Z_0-9]+)>)>", v["type"]) 61 let parameter = v["type"] 63 parameter = re.getReg(v["type"], arrayType.regs[2]) 68 … v["type"] = v["type"].replace(parameter, "NUMBER_TYPE_" + NumberIncrease.getAndIncrease()) 70 v["type"] = v["type"].replace(parameter, "string") 81 v["type"] = v["type"].replace(parameter, "NUMBER_TYPE_" + NumberIncrease.getAndIncrease()) 83 v["type"] = v["type"].replace(parameter, "string") 91 …terfaceType = re.match("{([A-Za-z0-9_]+:[A-Za-z0-9_,]+)([A-Za-z0-9_]+:[A-Za-z0-9_]+)}$", v["type"]) 93 v["type"] = interfaceName [all …]
|
/napi_generator/test/storytest/test_interface/ |
D | @ohos.test.d.ts | 39 fun1(v: number): number; 41 fun3: (v: number, v1: string, v2: boolean) => boolean; 42 fun4: (mancc: Map<string, string>,v?: string) => Array<number>; 44 fun6: (v: string[], v1: { [key: string]: boolean }) => string[]; 49 fun12(v: TestStatus): number; 50 fun13(v: TestEnumString): number; 114 function func2 (v: ComplexTest): string; 133 function func4(v: TestInterfaceLater): string;
|
/napi_generator/test/storytest/test_[]/ |
D | @ohos.test.d.ts | 29 function testArray(v: string[]): string[]; 30 function testArray1(v: number[]): number[]; 31 function testArray2(v: boolean[]): boolean[]; 35 function fun21(v: string, v1: Entry[]): Entry[];
|
/napi_generator/test/storytest/test_bool/ |
D | @ohos.test.d.ts | 23 function fun1(v: boolean): boolean; 26 function fun4(v: { [key: string]: boolean }): boolean; 30 function fun7(v: number, v1: AsyncCallback<Array<boolean>>): void; 31 function fun7(v: number): Promise<Array<boolean>>;
|
/napi_generator/test/storytest/test_number/ |
D | @ohos.test.d.ts | 18 function fun1(v: number): number; 21 function fun4(v: { [key: string]: number }): number; 25 function fun7(v: number, v1: AsyncCallback<Array<number>>): void; 26 function fun7(v: number): Promise<Array<number>>;
|
/napi_generator/hdc/ts/ts_IntelliJ_plugin/ |
D | README_zh.md | 59 void add(string v, long double v1[]); 61 double count(double v, double v1[]); 67 bool ifExist(bool v, bool v1[]); 69 uint32_t max(uint32_t v, uint32_t v1[]); 81 add(v: string, v1: Array<number>): void; 84 function max(v: number, v1: Array<number>): number; 87 ifExist(v: boolean, v1: Array<boolean>): boolean; 90 declare function count(v: number, v1: Array<number>): number;
|
/napi_generator/test/storytest/test_union/ |
D | @ohos.test.d.ts | 22 function fun1(v: number | string | boolean): string; 23 function fun2(v0: string, v: number | string | boolean): string; 24 function fun3(v0: string, v: number | string | boolean, no: number): string;
|
/napi_generator/test/storytest/test_any[]/ |
D | @ohos.test.d.ts | 23 function fun4(v1: Array<any>, v: number): number; 24 function fun5(v: number, v1: Array<any>): number; 25 function fun6(v: number, v1: any): number;
|
/napi_generator/hdc/ts/ts_vs_plugin/ |
D | README_zh.md | 53 void add(string v, long double v1[]); 55 double count(double v, double v1[]); 61 bool ifExist(bool v, bool v1[]); 63 uint32_t max(uint32_t v, uint32_t v1[]); 76 add(v: string, v1: Array<number>): void; 79 function max(v: number, v1: Array<number>): number; 82 ifExist(v: boolean, v1: Array<boolean>): boolean; 85 declare function count(v: number, v1: Array<number>): number;
|
/napi_generator/docs/guide/ts/ |
D | README_ZH.md | 59 void add(string v, long double v1[]); 61 double count(double v, double v1[]); 67 bool ifExist(bool v, bool v1[]); 69 uint32_t max(uint32_t v, uint32_t v1[]); 82 add(v: string, v1: Array<number>): void; 85 function max(v: number, v1: Array<number>): number; 88 ifExist(v: boolean, v1: Array<boolean>): boolean; 91 declare function count(v: number, v1: Array<number>): number;
|
/napi_generator/test/storytest/test_object/ |
D | @ohos.test.d.ts | 19 fun1(v: Object): number; //Interface func para1 20 fun2(num: number, v: Object): number; //Interface func para2 21 fun3(num: number, v: Object, Sam: string): number; //Interface func para3
|
/napi_generator/test/storytest/test_array/ |
D | @ohos.test.d.ts | 35 function testArray(v: Array<string>): Array<string>; 36 function testArray1(v: Array<number>): Array<number>; 37 function testArray2(v: Array<boolean>): Array<boolean>; 51 function fun21(v: string, v1: Array<Entry>): Array<Entry>;
|
/napi_generator/test/storytest/test_$/ |
D | @ohos.test.d.ts | 23 function $fun2(v: string): string; 24 function fun3(v: Test): number;
|
/napi_generator/test/storytest/test_direct/ |
D | @ohos.test.d.ts | 25 fun1(v: number): number; 26 fun2(v: string): Result;
|