wasm-ast-types 0.13.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- package/main/client/client.js +3 -2
- package/main/client/test/ts-client.overrides.spec.js +37 -0
- package/main/context/context.js +2 -1
- package/main/react-query/react-query.js +140 -70
- package/main/react-query/react-query.spec.js +13 -0
- package/main/utils/babel.js +2 -0
- package/module/client/client.js +3 -2
- package/module/client/test/ts-client.overrides.spec.js +30 -0
- package/module/context/context.js +2 -1
- package/module/react-query/react-query.js +92 -22
- package/module/react-query/react-query.spec.js +13 -0
- package/module/utils/babel.js +2 -1
- package/package.json +2 -2
- package/src/client/client.ts +4 -2
- package/src/client/test/__snapshots__/ts-client.overrides.spec.ts.snap +709 -0
- package/src/client/test/ts-client.overrides.spec.ts +74 -0
- package/src/context/context.ts +4 -1
- package/src/react-query/__snapshots__/react-query.spec.ts.snap +396 -0
- package/src/react-query/react-query.spec.ts +17 -0
- package/src/react-query/react-query.ts +902 -750
- package/src/utils/babel.ts +8 -1
- package/types/context/context.d.ts +2 -0
- package/types/react-query/react-query.d.ts +2 -2
- package/types/utils/babel.d.ts +1 -1
package/src/utils/babel.ts
CHANGED
@@ -125,11 +125,18 @@ export const classDeclaration = (name: string, body: any[], implementsExressions
|
|
125
125
|
};
|
126
126
|
|
127
127
|
|
128
|
-
export const classProperty = (
|
128
|
+
export const classProperty = (
|
129
|
+
name: string,
|
130
|
+
typeAnnotation: TSTypeAnnotation = null,
|
131
|
+
isReadonly: boolean = false,
|
132
|
+
isStatic: boolean = false,
|
133
|
+
noImplicitOverride: boolean = false
|
134
|
+
) => {
|
129
135
|
const prop = t.classProperty(t.identifier(name));
|
130
136
|
if (isReadonly) prop.readonly = true;
|
131
137
|
if (isStatic) prop.static = true;
|
132
138
|
if (typeAnnotation) prop.typeAnnotation = typeAnnotation;
|
139
|
+
if (noImplicitOverride) prop.override = true;
|
133
140
|
return prop;
|
134
141
|
};
|
135
142
|
|
@@ -6,10 +6,12 @@ export interface ReactQueryOptions {
|
|
6
6
|
mutations?: boolean;
|
7
7
|
camelize?: boolean;
|
8
8
|
queryKeys?: boolean;
|
9
|
+
queryFactory?: boolean;
|
9
10
|
}
|
10
11
|
export interface TSClientOptions {
|
11
12
|
enabled?: boolean;
|
12
13
|
execExtendsQuery?: boolean;
|
14
|
+
noImplicitOverride?: boolean;
|
13
15
|
}
|
14
16
|
export interface MessageComposerOptions {
|
15
17
|
enabled?: boolean;
|
@@ -43,7 +43,7 @@ export interface Cw4UpdateMembersMutation {
|
|
43
43
|
}
|
44
44
|
```
|
45
45
|
*/
|
46
|
-
export declare const createReactQueryMutationArgsInterface: ({ context, ExecuteClient, mutationHookParamsTypeName, useMutationTypeParameter, jsonschema
|
46
|
+
export declare const createReactQueryMutationArgsInterface: ({ context, ExecuteClient, mutationHookParamsTypeName, useMutationTypeParameter, jsonschema }: ReactQueryMutationHookInterface) => t.ExportNamedDeclaration;
|
47
47
|
interface ReactQueryMutationHooks {
|
48
48
|
context: RenderContext;
|
49
49
|
execMsg: ExecuteMsg;
|
@@ -70,7 +70,7 @@ export const useCw4UpdateMembersMutation = ({ client, options }: Omit<Cw4UpdateM
|
|
70
70
|
)
|
71
71
|
```
|
72
72
|
*/
|
73
|
-
export declare const createReactQueryMutationHook: ({ context, mutationHookName, mutationHookParamsTypeName, execMethodName, useMutationTypeParameter, hasMsg
|
73
|
+
export declare const createReactQueryMutationHook: ({ context, mutationHookName, mutationHookParamsTypeName, execMethodName, useMutationTypeParameter, hasMsg }: ReactQueryMutationHook) => t.ExportNamedDeclaration;
|
74
74
|
interface ReactQueryHookQueryInterface {
|
75
75
|
context: RenderContext;
|
76
76
|
QueryClient: string;
|
package/types/utils/babel.d.ts
CHANGED
@@ -17,7 +17,7 @@ export declare const bindMethod: (name: string) => t.ExpressionStatement;
|
|
17
17
|
export declare const typedIdentifier: (name: string, typeAnnotation: TSTypeAnnotation, optional?: boolean) => t.Identifier;
|
18
18
|
export declare const promiseTypeAnnotation: (name: any) => t.TSTypeAnnotation;
|
19
19
|
export declare const classDeclaration: (name: string, body: any[], implementsExressions?: TSExpressionWithTypeArguments[], superClass?: t.Identifier) => t.ClassDeclaration;
|
20
|
-
export declare const classProperty: (name: string, typeAnnotation?: TSTypeAnnotation, isReadonly?: boolean, isStatic?: boolean) => t.ClassProperty;
|
20
|
+
export declare const classProperty: (name: string, typeAnnotation?: TSTypeAnnotation, isReadonly?: boolean, isStatic?: boolean, noImplicitOverride?: boolean) => t.ClassProperty;
|
21
21
|
export declare const arrowFunctionExpression: (params: (t.Identifier | t.Pattern | t.RestElement)[], body: t.BlockStatement, returnType: t.TSTypeAnnotation, isAsync?: boolean) => t.ArrowFunctionExpression;
|
22
22
|
export declare const recursiveNamespace: (names: any, moduleBlockBody: any) => any;
|
23
23
|
export declare const arrayTypeNDimensions: (body: any, n: any) => any;
|