wasm-ast-types 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -199,6 +199,8 @@ exports.createReactQueryHook = createReactQueryHook;
199
199
  ```
200
200
  */
201
201
  var createReactQueryMutationArgsInterface = function createReactQueryMutationArgsInterface(_ref4) {
202
+ var _createTypedObjectPar;
203
+
202
204
  var context = _ref4.context,
203
205
  ExecuteClient = _ref4.ExecuteClient,
204
206
  mutationHookParamsTypeName = _ref4.mutationHookParamsTypeName,
@@ -206,12 +208,15 @@ var createReactQueryMutationArgsInterface = function createReactQueryMutationArg
206
208
  jsonschema = _ref4.jsonschema;
207
209
  var typedUseMutationOptions = t.tsTypeReference(t.identifier('UseMutationOptions'), useMutationTypeParameter);
208
210
  var body = [(0, _utils.tsPropertySignature)(t.identifier('client'), t.tsTypeAnnotation(t.tsTypeReference(t.identifier(ExecuteClient))), false)];
209
- var msgType = (0, _utils.createTypedObjectParams)(context, jsonschema).typeAnnotation;
211
+ var msgType = (_createTypedObjectPar = (0, _utils.createTypedObjectParams)(context, jsonschema)) === null || _createTypedObjectPar === void 0 ? void 0 : _createTypedObjectPar.typeAnnotation;
210
212
 
211
213
  if (msgType) {
212
- body.push(t.tsPropertySignature(t.identifier('msg'), msgType));
214
+ body.push(t.tsPropertySignature(t.identifier('msg'), // @ts-ignore
215
+ msgType));
213
216
  }
214
217
 
218
+ context.addUtil('StdFee');
219
+ context.addUtil('Coin');
215
220
  var optionalArgs = t.tsPropertySignature(t.identifier('args'), t.tsTypeAnnotation( // @ts-ignore:next-line
216
221
  t.tsTypeLiteral(_client.FIXED_EXECUTE_PARAMS.map(function (param) {
217
222
  return (0, _babel.propertySignature)(param.name, // @ts-ignore:next-line
@@ -177,12 +177,15 @@ export const createReactQueryMutationArgsInterface = ({
177
177
  }) => {
178
178
  const typedUseMutationOptions = t.tsTypeReference(t.identifier('UseMutationOptions'), useMutationTypeParameter);
179
179
  const body = [tsPropertySignature(t.identifier('client'), t.tsTypeAnnotation(t.tsTypeReference(t.identifier(ExecuteClient))), false)];
180
- const msgType = createTypedObjectParams(context, jsonschema).typeAnnotation;
180
+ const msgType = createTypedObjectParams(context, jsonschema)?.typeAnnotation;
181
181
 
182
182
  if (msgType) {
183
- body.push(t.tsPropertySignature(t.identifier('msg'), msgType));
183
+ body.push(t.tsPropertySignature(t.identifier('msg'), // @ts-ignore
184
+ msgType));
184
185
  }
185
186
 
187
+ context.addUtil('StdFee');
188
+ context.addUtil('Coin');
186
189
  const optionalArgs = t.tsPropertySignature(t.identifier('args'), t.tsTypeAnnotation( // @ts-ignore:next-line
187
190
  t.tsTypeLiteral(FIXED_EXECUTE_PARAMS.map(param => propertySignature(param.name, // @ts-ignore:next-line
188
191
  param.typeAnnotation, param.optional)))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wasm-ast-types",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "CosmWasm TypeScript AST generation",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "homepage": "https://github.com/pyramation/cosmwasm-typescript-gen/tree/master/packages/wasm-ast-types#readme",
@@ -88,5 +88,5 @@
88
88
  "case": "1.6.3",
89
89
  "deepmerge": "4.2.2"
90
90
  },
91
- "gitHead": "9724a2787e6427b62e874ece3b733b5bfa5be2af"
91
+ "gitHead": "cffa2acebb86f3c1f96fb00c4abae5ba0987e63e"
92
92
  }
@@ -407,16 +407,20 @@ export const createReactQueryMutationArgsInterface = ({
407
407
  )
408
408
  ];
409
409
 
410
- const msgType = createTypedObjectParams(context, jsonschema).typeAnnotation as unknown as t.TSTypeAnnotation
410
+ const msgType = createTypedObjectParams(context, jsonschema)?.typeAnnotation
411
411
 
412
412
  if (msgType) {
413
413
  body.push(
414
414
  t.tsPropertySignature(
415
415
  t.identifier('msg'),
416
+ // @ts-ignore
416
417
  msgType
417
418
  ));
418
419
  }
419
420
 
421
+ context.addUtil('StdFee');
422
+ context.addUtil('Coin');
423
+
420
424
  const optionalArgs = t.tsPropertySignature(
421
425
  t.identifier('args'),
422
426
  t.tsTypeAnnotation(