@dedot/codegen 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -20,7 +20,7 @@ class ConstructorQueryGen extends QueryGen_js_1.QueryGen {
|
|
|
20
20
|
const typeOutRaw = this.typesGen.generateType(returnType.type, 0, true);
|
|
21
21
|
// Unwrap langError result
|
|
22
22
|
const typeOut = typeOutRaw.match(/^(\w+)<(.*), (.*)>$/).at(2);
|
|
23
|
-
return `GenericConstructorQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}
|
|
23
|
+
return `GenericConstructorQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}?: ConstructorCallOptions) => Promise<GenericConstructorCallResult<${typeOut}, ContractInstantiateResult<ChainApi>>>>`;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
exports.ConstructorQueryGen = ConstructorQueryGen;
|
|
@@ -40,7 +40,7 @@ class QueryGen {
|
|
|
40
40
|
const typeOutRaw = this.typesGen.generateType(returnType.type, 0, true);
|
|
41
41
|
// Unwrap langError result
|
|
42
42
|
const typeOut = typeOutRaw.match(/^(\w+)<(.*), (.*)>$/).at(2);
|
|
43
|
-
return `GenericContractQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}
|
|
43
|
+
return `GenericContractQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}?: ContractCallOptions) => Promise<GenericContractCallResult<${typeOut}, ContractCallResult<ChainApi>>>>`;
|
|
44
44
|
}
|
|
45
45
|
generateParamsOut(args) {
|
|
46
46
|
return args
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dedot/codegen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Generate types",
|
|
5
5
|
"author": "Thang X. Vu <thang@coongcrafts.io>",
|
|
6
6
|
"homepage": "https://github.com/dedotdev/dedot/tree/main/packages/codegen",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"copy": "cp -R ./src/chaintypes/templates ./dist/chaintypes && cp -R ./src/chaintypes/templates ./dist/cjs/chaintypes && cp -R ./src/typink/templates ./dist/typink && cp -R ./src/typink/templates ./dist/cjs/typink"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dedot/api": "0.
|
|
22
|
-
"@dedot/codecs": "0.
|
|
23
|
-
"@dedot/contracts": "0.
|
|
24
|
-
"@dedot/providers": "0.
|
|
25
|
-
"@dedot/runtime-specs": "0.
|
|
26
|
-
"@dedot/shape": "0.
|
|
27
|
-
"@dedot/types": "0.
|
|
28
|
-
"@dedot/utils": "0.
|
|
21
|
+
"@dedot/api": "0.6.0",
|
|
22
|
+
"@dedot/codecs": "0.6.0",
|
|
23
|
+
"@dedot/contracts": "0.6.0",
|
|
24
|
+
"@dedot/providers": "0.6.0",
|
|
25
|
+
"@dedot/runtime-specs": "0.6.0",
|
|
26
|
+
"@dedot/shape": "0.6.0",
|
|
27
|
+
"@dedot/types": "0.6.0",
|
|
28
|
+
"@dedot/utils": "0.6.0",
|
|
29
29
|
"handlebars": "^4.7.8",
|
|
30
30
|
"prettier": "^3.3.3"
|
|
31
31
|
},
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"directory": "dist"
|
|
35
35
|
},
|
|
36
36
|
"license": "Apache-2.0",
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "80e64c7da483c4f5b757f6af7259aa4fdd5397fc",
|
|
38
38
|
"module": "./index.js",
|
|
39
39
|
"types": "./index.d.ts",
|
|
40
40
|
"exports": {
|
|
@@ -17,6 +17,6 @@ export class ConstructorQueryGen extends QueryGen {
|
|
|
17
17
|
const typeOutRaw = this.typesGen.generateType(returnType.type, 0, true);
|
|
18
18
|
// Unwrap langError result
|
|
19
19
|
const typeOut = typeOutRaw.match(/^(\w+)<(.*), (.*)>$/).at(2);
|
|
20
|
-
return `GenericConstructorQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}
|
|
20
|
+
return `GenericConstructorQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}?: ConstructorCallOptions) => Promise<GenericConstructorCallResult<${typeOut}, ContractInstantiateResult<ChainApi>>>>`;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -37,7 +37,7 @@ export class QueryGen {
|
|
|
37
37
|
const typeOutRaw = this.typesGen.generateType(returnType.type, 0, true);
|
|
38
38
|
// Unwrap langError result
|
|
39
39
|
const typeOut = typeOutRaw.match(/^(\w+)<(.*), (.*)>$/).at(2);
|
|
40
|
-
return `GenericContractQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}
|
|
40
|
+
return `GenericContractQueryCall<ChainApi, (${paramsOut && `${paramsOut},`} ${optionsParamName}?: ContractCallOptions) => Promise<GenericContractCallResult<${typeOut}, ContractCallResult<ChainApi>>>>`;
|
|
41
41
|
}
|
|
42
42
|
generateParamsOut(args) {
|
|
43
43
|
return args
|