@hey-api/openapi-ts 0.80.1 → 0.80.2
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.
- package/README.md +8 -0
- package/dist/chunk-K4TMWMUE.js +39 -0
- package/dist/chunk-K4TMWMUE.js.map +1 -0
- package/dist/clients/axios/client.ts +10 -4
- package/dist/clients/axios/types.ts +3 -3
- package/dist/index.cjs +53 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +503 -200
- package/dist/index.d.ts +503 -200
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +9 -9
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/{types.d-CXdSuWix.d.cts → types.d-CCdoSF-L.d.cts} +31 -20
- package/dist/{types.d-CXdSuWix.d.ts → types.d-CCdoSF-L.d.ts} +31 -20
- package/package.json +1 -1
- package/dist/chunk-RLV6NJ5Q.js +0 -39
- package/dist/chunk-RLV6NJ5Q.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as Comments,
|
|
2
|
-
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, L as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject } from './types.d-
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
1
|
+
import { C as Comments, P as PluginHandler, a as Plugin, I as ImportExportItemObject, t as tsNodeToString, S as StringCase, U as UserConfig, b as Client, c as IR } from './types.d-CCdoSF-L.cjs';
|
|
2
|
+
export { j as Client, D as DefinePlugin, E as ExpressionTransformer, L as LegacyIR, O as OpenApi, d as OpenApiMetaObject, e as OpenApiOperationObject, f as OpenApiParameterObject, g as OpenApiRequestBodyObject, h as OpenApiResponseObject, i as OpenApiSchemaObject, T as TypeTransformer } from './types.d-CCdoSF-L.cjs';
|
|
3
|
+
import * as typescript from 'typescript';
|
|
4
|
+
import typescript__default from 'typescript';
|
|
5
5
|
import 'semver';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
|
|
@@ -12,19 +12,19 @@ type FunctionParameter = {
|
|
|
12
12
|
isReadOnly?: boolean;
|
|
13
13
|
isRequired?: boolean;
|
|
14
14
|
name: string;
|
|
15
|
-
type?: any |
|
|
15
|
+
type?: any | typescript__default.TypeNode;
|
|
16
16
|
} | {
|
|
17
17
|
destructure: ReadonlyArray<FunctionParameter>;
|
|
18
|
-
type?: any |
|
|
18
|
+
type?: any | typescript__default.TypeNode;
|
|
19
19
|
};
|
|
20
20
|
interface FunctionTypeParameter {
|
|
21
21
|
default?: any;
|
|
22
|
-
extends?: string |
|
|
23
|
-
name: string |
|
|
22
|
+
extends?: string | typescript__default.TypeNode;
|
|
23
|
+
name: string | typescript__default.Identifier;
|
|
24
24
|
}
|
|
25
25
|
type SyntaxKindKeyword = 'any' | 'async' | 'boolean' | 'export' | 'never' | 'number' | 'private' | 'protected' | 'public' | 'readonly' | 'static' | 'string' | 'undefined' | 'unknown' | 'void';
|
|
26
26
|
type ObjectValue = {
|
|
27
|
-
assertion?: 'any' |
|
|
27
|
+
assertion?: 'any' | typescript__default.TypeNode;
|
|
28
28
|
comments?: Comments;
|
|
29
29
|
spread: string;
|
|
30
30
|
} | {
|
|
@@ -35,64 +35,94 @@ type ObjectValue = {
|
|
|
35
35
|
value: any;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
declare const defaultPaginationKeywords: readonly ["after", "before", "cursor", "offset", "page", "start"];
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Default plugins used to generate artifacts if plugins aren't specified.
|
|
42
|
+
*/
|
|
43
|
+
declare const defaultPlugins: readonly ["@hey-api/typescript", "@hey-api/sdk"];
|
|
44
|
+
|
|
45
|
+
declare const clientDefaultConfig: {
|
|
46
|
+
readonly baseUrl: true;
|
|
47
|
+
readonly bundle: true;
|
|
48
|
+
readonly exportFromIndex: false;
|
|
49
|
+
};
|
|
50
|
+
declare const clientDefaultMeta: {
|
|
51
|
+
readonly dependencies: readonly ["@hey-api/typescript"];
|
|
52
|
+
readonly output: "client";
|
|
53
|
+
readonly tags: readonly ["client"];
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
declare const clientPluginHandler: ({ plugin, }: Parameters<PluginHandler>[0]) => void;
|
|
57
|
+
|
|
58
|
+
declare const definePluginConfig: <T extends Plugin.Types>(defaultConfig: Plugin.Config<T>) => (userConfig?: Omit<Plugin.UserConfig<T["config"]>, "name">) => Omit<Plugin.Config<T>, "name"> & {
|
|
59
|
+
/**
|
|
60
|
+
* Cast name to `any` so it doesn't throw type error in `plugins` array.
|
|
61
|
+
* We could allow any `string` as plugin `name` in the object syntax, but
|
|
62
|
+
* that TypeScript trick would cause all string methods to appear as
|
|
63
|
+
* suggested auto completions, which is undesirable.
|
|
64
|
+
*/
|
|
65
|
+
name: any;
|
|
66
|
+
};
|
|
67
|
+
|
|
38
68
|
type ImportExportItem = ImportExportItemObject | string;
|
|
39
69
|
|
|
40
70
|
type Property = {
|
|
41
71
|
comment?: Comments;
|
|
42
72
|
isReadOnly?: boolean;
|
|
43
73
|
isRequired?: boolean;
|
|
44
|
-
name: string |
|
|
45
|
-
type: any |
|
|
74
|
+
name: string | typescript__default.PropertyName;
|
|
75
|
+
type: any | typescript__default.TypeNode;
|
|
46
76
|
};
|
|
47
77
|
|
|
48
|
-
declare const
|
|
78
|
+
declare const tsc: {
|
|
49
79
|
anonymousFunction: ({ async, comment, multiLine, parameters, returnType, statements, types, }: {
|
|
50
80
|
async?: boolean;
|
|
51
81
|
comment?: Comments;
|
|
52
82
|
multiLine?: boolean;
|
|
53
83
|
parameters?: FunctionParameter[];
|
|
54
|
-
returnType?: string |
|
|
55
|
-
statements?: ReadonlyArray<
|
|
84
|
+
returnType?: string | typescript.TypeNode;
|
|
85
|
+
statements?: ReadonlyArray<typescript.Statement>;
|
|
56
86
|
types?: FunctionTypeParameter[];
|
|
57
|
-
}) =>
|
|
87
|
+
}) => typescript.FunctionExpression;
|
|
58
88
|
arrayLiteralExpression: <T>({ elements, multiLine, }: {
|
|
59
89
|
elements: T[];
|
|
60
90
|
multiLine?: boolean;
|
|
61
|
-
}) =>
|
|
91
|
+
}) => typescript.ArrayLiteralExpression;
|
|
62
92
|
arrowFunction: ({ async, comment, multiLine, parameters, returnType, statements, types, }: {
|
|
63
93
|
async?: boolean;
|
|
64
94
|
comment?: Comments;
|
|
65
95
|
multiLine?: boolean;
|
|
66
96
|
parameters?: ReadonlyArray<FunctionParameter>;
|
|
67
|
-
returnType?: string |
|
|
68
|
-
statements?:
|
|
97
|
+
returnType?: string | typescript.TypeNode;
|
|
98
|
+
statements?: typescript.Statement[] | typescript.Expression;
|
|
69
99
|
types?: FunctionTypeParameter[];
|
|
70
|
-
}) =>
|
|
100
|
+
}) => typescript.ArrowFunction;
|
|
71
101
|
asExpression: ({ expression, type, }: {
|
|
72
|
-
expression:
|
|
73
|
-
type:
|
|
74
|
-
}) =>
|
|
102
|
+
expression: typescript.Expression;
|
|
103
|
+
type: typescript.TypeNode;
|
|
104
|
+
}) => typescript.AsExpression;
|
|
75
105
|
assignment: ({ left, right, }: {
|
|
76
|
-
left:
|
|
77
|
-
right:
|
|
78
|
-
}) =>
|
|
106
|
+
left: typescript.Expression;
|
|
107
|
+
right: typescript.Expression;
|
|
108
|
+
}) => typescript.AssignmentExpression<typescript.EqualsToken>;
|
|
79
109
|
awaitExpression: ({ expression, }: {
|
|
80
|
-
expression:
|
|
81
|
-
}) =>
|
|
110
|
+
expression: typescript.Expression;
|
|
111
|
+
}) => typescript.AwaitExpression;
|
|
82
112
|
binaryExpression: ({ left, operator, right, }: {
|
|
83
|
-
left:
|
|
113
|
+
left: typescript.Expression;
|
|
84
114
|
operator?: "=" | "===" | "in" | "??";
|
|
85
|
-
right:
|
|
86
|
-
}) =>
|
|
115
|
+
right: typescript.Expression | string;
|
|
116
|
+
}) => typescript.BinaryExpression;
|
|
87
117
|
block: ({ multiLine, statements, }: {
|
|
88
118
|
multiLine?: boolean;
|
|
89
|
-
statements: ReadonlyArray<
|
|
90
|
-
}) =>
|
|
119
|
+
statements: ReadonlyArray<typescript.Statement>;
|
|
120
|
+
}) => typescript.Block;
|
|
91
121
|
callExpression: ({ functionName, parameters, types, }: {
|
|
92
|
-
functionName: string |
|
|
93
|
-
parameters?: Array<string |
|
|
94
|
-
types?: ReadonlyArray<
|
|
95
|
-
}) =>
|
|
122
|
+
functionName: string | typescript.PropertyAccessExpression | typescript.PropertyAccessChain | typescript.ElementAccessExpression | typescript.Expression;
|
|
123
|
+
parameters?: Array<string | typescript.Expression | undefined>;
|
|
124
|
+
types?: ReadonlyArray<typescript.TypeNode>;
|
|
125
|
+
}) => typescript.CallExpression;
|
|
96
126
|
classDeclaration: ({ decorator, exportClass, extendedClasses, name, nodes, }: {
|
|
97
127
|
decorator?: {
|
|
98
128
|
args: any[];
|
|
@@ -101,88 +131,88 @@ declare const compiler: {
|
|
|
101
131
|
exportClass?: boolean;
|
|
102
132
|
extendedClasses?: ReadonlyArray<string>;
|
|
103
133
|
name: string;
|
|
104
|
-
nodes: ReadonlyArray<
|
|
105
|
-
}) =>
|
|
134
|
+
nodes: ReadonlyArray<typescript.ClassElement>;
|
|
135
|
+
}) => typescript.ClassDeclaration;
|
|
106
136
|
conditionalExpression: ({ condition, whenFalse, whenTrue, }: {
|
|
107
|
-
condition:
|
|
108
|
-
whenFalse:
|
|
109
|
-
whenTrue:
|
|
110
|
-
}) =>
|
|
137
|
+
condition: typescript.Expression;
|
|
138
|
+
whenFalse: typescript.Expression;
|
|
139
|
+
whenTrue: typescript.Expression;
|
|
140
|
+
}) => typescript.ConditionalExpression;
|
|
111
141
|
constVariable: ({ assertion, comment, destructure, exportConst, expression, name, typeName, }: {
|
|
112
|
-
assertion?: "const" |
|
|
142
|
+
assertion?: "const" | typescript.TypeNode;
|
|
113
143
|
comment?: Comments;
|
|
114
144
|
destructure?: boolean;
|
|
115
145
|
exportConst?: boolean;
|
|
116
|
-
expression:
|
|
117
|
-
name: string |
|
|
118
|
-
typeName?: string |
|
|
119
|
-
}) =>
|
|
146
|
+
expression: typescript.Expression;
|
|
147
|
+
name: string | typescript.TypeReferenceNode;
|
|
148
|
+
typeName?: string | typescript.IndexedAccessTypeNode | typescript.TypeNode;
|
|
149
|
+
}) => typescript.VariableStatement;
|
|
120
150
|
constructorDeclaration: ({ accessLevel, comment, multiLine, parameters, statements, }: {
|
|
121
151
|
accessLevel?: AccessLevel;
|
|
122
152
|
comment?: Comments;
|
|
123
153
|
multiLine?: boolean;
|
|
124
154
|
parameters?: FunctionParameter[];
|
|
125
|
-
statements?:
|
|
126
|
-
}) =>
|
|
155
|
+
statements?: typescript.Statement[];
|
|
156
|
+
}) => typescript.ConstructorDeclaration;
|
|
127
157
|
enumDeclaration: <T extends Record<string, any> | Array<ObjectValue>>({ comments: enumMemberComments, leadingComment: comments, name, obj, }: {
|
|
128
158
|
comments?: Record<string | number, Comments>;
|
|
129
159
|
leadingComment?: Comments;
|
|
130
|
-
name: string |
|
|
160
|
+
name: string | typescript.TypeReferenceNode;
|
|
131
161
|
obj: T;
|
|
132
|
-
}) =>
|
|
162
|
+
}) => typescript.EnumDeclaration;
|
|
133
163
|
exportAllDeclaration: ({ module, }: {
|
|
134
164
|
module: string;
|
|
135
|
-
}) =>
|
|
165
|
+
}) => typescript.ExportDeclaration;
|
|
136
166
|
exportNamedDeclaration: ({ exports, module, }: {
|
|
137
167
|
exports: Array<ImportExportItem> | ImportExportItem;
|
|
138
168
|
module: string;
|
|
139
|
-
}) =>
|
|
169
|
+
}) => typescript.ExportDeclaration;
|
|
140
170
|
expressionToStatement: ({ expression, }: {
|
|
141
|
-
expression:
|
|
142
|
-
}) =>
|
|
171
|
+
expression: typescript.Expression;
|
|
172
|
+
}) => typescript.ExpressionStatement;
|
|
143
173
|
forOfStatement: ({ awaitModifier, expression, initializer, statement, }: {
|
|
144
|
-
awaitModifier?:
|
|
145
|
-
expression:
|
|
146
|
-
initializer:
|
|
147
|
-
statement:
|
|
148
|
-
}) =>
|
|
174
|
+
awaitModifier?: typescript.AwaitKeyword;
|
|
175
|
+
expression: typescript.Expression;
|
|
176
|
+
initializer: typescript.ForInitializer;
|
|
177
|
+
statement: typescript.Statement;
|
|
178
|
+
}) => typescript.ForOfStatement;
|
|
149
179
|
functionTypeNode: ({ parameters, returnType, typeParameters, }: {
|
|
150
|
-
parameters?:
|
|
151
|
-
returnType:
|
|
152
|
-
typeParameters?:
|
|
153
|
-
}) =>
|
|
180
|
+
parameters?: typescript.ParameterDeclaration[];
|
|
181
|
+
returnType: typescript.TypeNode;
|
|
182
|
+
typeParameters?: typescript.TypeParameterDeclaration[];
|
|
183
|
+
}) => typescript.FunctionTypeNode;
|
|
154
184
|
getAccessorDeclaration: ({ name, returnType, statements, }: {
|
|
155
|
-
name: string |
|
|
156
|
-
returnType?: string |
|
|
157
|
-
statements: ReadonlyArray<
|
|
158
|
-
}) =>
|
|
185
|
+
name: string | typescript.PropertyName;
|
|
186
|
+
returnType?: string | typescript.Identifier;
|
|
187
|
+
statements: ReadonlyArray<typescript.Statement>;
|
|
188
|
+
}) => typescript.GetAccessorDeclaration;
|
|
159
189
|
identifier: ({ text }: {
|
|
160
190
|
text: string;
|
|
161
|
-
}) =>
|
|
191
|
+
}) => typescript.Identifier;
|
|
162
192
|
ifStatement: ({ elseStatement, expression, thenStatement, }: {
|
|
163
|
-
elseStatement?:
|
|
164
|
-
expression:
|
|
165
|
-
thenStatement:
|
|
166
|
-
}) =>
|
|
193
|
+
elseStatement?: typescript.Statement;
|
|
194
|
+
expression: typescript.Expression;
|
|
195
|
+
thenStatement: typescript.Statement;
|
|
196
|
+
}) => typescript.IfStatement;
|
|
167
197
|
indexedAccessTypeNode: ({ indexType, objectType, }: {
|
|
168
|
-
indexType:
|
|
169
|
-
objectType:
|
|
170
|
-
}) =>
|
|
171
|
-
isTsNode: (node: any) => node is
|
|
198
|
+
indexType: typescript.TypeNode;
|
|
199
|
+
objectType: typescript.TypeNode;
|
|
200
|
+
}) => typescript.IndexedAccessTypeNode;
|
|
201
|
+
isTsNode: (node: any) => node is typescript.Expression;
|
|
172
202
|
keywordTypeNode: ({ keyword, }: {
|
|
173
203
|
keyword: Extract<SyntaxKindKeyword, "any" | "boolean" | "never" | "number" | "string" | "undefined" | "unknown" | "void">;
|
|
174
|
-
}) =>
|
|
204
|
+
}) => typescript.KeywordTypeNode<typescript.SyntaxKind.VoidKeyword | typescript.SyntaxKind.AnyKeyword | typescript.SyntaxKind.BooleanKeyword | typescript.SyntaxKind.NeverKeyword | typescript.SyntaxKind.NumberKeyword | typescript.SyntaxKind.StringKeyword | typescript.SyntaxKind.UndefinedKeyword | typescript.SyntaxKind.UnknownKeyword>;
|
|
175
205
|
literalTypeNode: ({ literal, }: {
|
|
176
|
-
literal:
|
|
177
|
-
}) =>
|
|
206
|
+
literal: typescript.LiteralTypeNode["literal"];
|
|
207
|
+
}) => typescript.LiteralTypeNode;
|
|
178
208
|
mappedTypeNode: ({ members, nameType, questionToken, readonlyToken, type, typeParameter, }: {
|
|
179
|
-
members?:
|
|
180
|
-
nameType?:
|
|
181
|
-
questionToken?:
|
|
182
|
-
readonlyToken?:
|
|
183
|
-
type?:
|
|
184
|
-
typeParameter:
|
|
185
|
-
}) =>
|
|
209
|
+
members?: typescript.NodeArray<typescript.TypeElement>;
|
|
210
|
+
nameType?: typescript.TypeNode;
|
|
211
|
+
questionToken?: typescript.QuestionToken | typescript.PlusToken | typescript.MinusToken;
|
|
212
|
+
readonlyToken?: typescript.ReadonlyKeyword | typescript.PlusToken | typescript.MinusToken;
|
|
213
|
+
type?: typescript.TypeNode;
|
|
214
|
+
typeParameter: typescript.TypeParameterDeclaration;
|
|
215
|
+
}) => typescript.MappedTypeNode;
|
|
186
216
|
methodDeclaration: ({ accessLevel, comment, isStatic, multiLine, name, parameters, returnType, statements, types, }: {
|
|
187
217
|
accessLevel?: AccessLevel;
|
|
188
218
|
comment?: Comments;
|
|
@@ -190,25 +220,25 @@ declare const compiler: {
|
|
|
190
220
|
multiLine?: boolean;
|
|
191
221
|
name: string;
|
|
192
222
|
parameters?: ReadonlyArray<FunctionParameter>;
|
|
193
|
-
returnType?: string |
|
|
194
|
-
statements?:
|
|
223
|
+
returnType?: string | typescript.TypeNode;
|
|
224
|
+
statements?: typescript.Statement[];
|
|
195
225
|
types?: FunctionTypeParameter[];
|
|
196
|
-
}) =>
|
|
226
|
+
}) => typescript.MethodDeclaration;
|
|
197
227
|
namedImportDeclarations: ({ imports, module, }: {
|
|
198
228
|
imports: Array<ImportExportItem> | ImportExportItem;
|
|
199
229
|
module: string;
|
|
200
|
-
}) =>
|
|
230
|
+
}) => typescript.ImportDeclaration;
|
|
201
231
|
namespaceDeclaration: ({ name, statements, }: {
|
|
202
232
|
name: string;
|
|
203
|
-
statements: Array<
|
|
204
|
-
}) =>
|
|
233
|
+
statements: Array<typescript.Statement>;
|
|
234
|
+
}) => typescript.ModuleDeclaration;
|
|
205
235
|
newExpression: ({ argumentsArray, expression, typeArguments, }: {
|
|
206
|
-
argumentsArray?: Array<
|
|
207
|
-
expression:
|
|
208
|
-
typeArguments?: Array<
|
|
209
|
-
}) =>
|
|
236
|
+
argumentsArray?: Array<typescript.Expression>;
|
|
237
|
+
expression: typescript.Expression;
|
|
238
|
+
typeArguments?: Array<typescript.TypeNode>;
|
|
239
|
+
}) => typescript.NewExpression;
|
|
210
240
|
nodeToString: typeof tsNodeToString;
|
|
211
|
-
null: () =>
|
|
241
|
+
null: () => typescript.NullLiteral;
|
|
212
242
|
objectExpression: <T extends Record<string, any> | Array<ObjectValue>>({ comments, identifiers, multiLine, obj, shorthand, unescape, }: {
|
|
213
243
|
comments?: Comments;
|
|
214
244
|
identifiers?: string[];
|
|
@@ -216,168 +246,441 @@ declare const compiler: {
|
|
|
216
246
|
obj: T;
|
|
217
247
|
shorthand?: boolean;
|
|
218
248
|
unescape?: boolean;
|
|
219
|
-
}) =>
|
|
249
|
+
}) => typescript.ObjectLiteralExpression;
|
|
220
250
|
ots: {
|
|
221
|
-
boolean: (value: boolean) =>
|
|
222
|
-
export: ({ alias, asType, name }: ImportExportItemObject) =>
|
|
223
|
-
import: ({ alias, asType, name }: ImportExportItemObject) =>
|
|
224
|
-
number: (value: number) =>
|
|
225
|
-
string: (value: string, unescape?: boolean) =>
|
|
251
|
+
boolean: (value: boolean) => typescript.TrueLiteral | typescript.FalseLiteral;
|
|
252
|
+
export: ({ alias, asType, name }: ImportExportItemObject) => typescript.ExportSpecifier;
|
|
253
|
+
import: ({ alias, asType, name }: ImportExportItemObject) => typescript.ImportSpecifier;
|
|
254
|
+
number: (value: number) => typescript.NumericLiteral | typescript.PrefixUnaryExpression;
|
|
255
|
+
string: (value: string, unescape?: boolean) => typescript.Identifier | typescript.StringLiteral;
|
|
226
256
|
};
|
|
227
257
|
parameterDeclaration: ({ initializer, modifiers, name, required, type, }: {
|
|
228
|
-
initializer?:
|
|
229
|
-
modifiers?: ReadonlyArray<
|
|
230
|
-
name: string |
|
|
258
|
+
initializer?: typescript.Expression;
|
|
259
|
+
modifiers?: ReadonlyArray<typescript.ModifierLike>;
|
|
260
|
+
name: string | typescript.BindingName;
|
|
231
261
|
required?: boolean;
|
|
232
|
-
type?:
|
|
233
|
-
}) =>
|
|
262
|
+
type?: typescript.TypeNode;
|
|
263
|
+
}) => typescript.ParameterDeclaration;
|
|
234
264
|
propertyAccessExpression: ({ expression, isOptional, name, }: {
|
|
235
|
-
expression: string |
|
|
265
|
+
expression: string | typescript.Expression;
|
|
236
266
|
isOptional?: boolean;
|
|
237
|
-
name: string | number |
|
|
238
|
-
}) =>
|
|
267
|
+
name: string | number | typescript.MemberName;
|
|
268
|
+
}) => typescript.PropertyAccessChain | typescript.PropertyAccessExpression | typescript.ElementAccessExpression;
|
|
239
269
|
propertyAccessExpressions: ({ expressions, }: {
|
|
240
|
-
expressions: Array<string |
|
|
241
|
-
}) =>
|
|
270
|
+
expressions: Array<string | typescript.Expression | typescript.MemberName>;
|
|
271
|
+
}) => typescript.PropertyAccessExpression;
|
|
242
272
|
propertyAssignment: ({ initializer, name, }: {
|
|
243
|
-
initializer:
|
|
244
|
-
name: string |
|
|
245
|
-
}) =>
|
|
273
|
+
initializer: typescript.Expression;
|
|
274
|
+
name: string | typescript.PropertyName;
|
|
275
|
+
}) => typescript.PropertyAssignment;
|
|
246
276
|
propertyDeclaration: ({ initializer, modifier, name, type, }: {
|
|
247
|
-
initializer?:
|
|
277
|
+
initializer?: typescript.Expression;
|
|
248
278
|
modifier?: AccessLevel | "async" | "export" | "readonly" | "static";
|
|
249
|
-
name: string |
|
|
250
|
-
type?:
|
|
251
|
-
}) =>
|
|
279
|
+
name: string | typescript.PropertyName;
|
|
280
|
+
type?: typescript.TypeNode;
|
|
281
|
+
}) => typescript.PropertyDeclaration;
|
|
252
282
|
regularExpressionLiteral: ({ flags, text, }: {
|
|
253
283
|
flags?: ReadonlyArray<"g" | "i" | "m" | "s" | "u" | "y">;
|
|
254
284
|
text: string;
|
|
255
|
-
}) =>
|
|
285
|
+
}) => typescript.RegularExpressionLiteral;
|
|
256
286
|
returnFunctionCall: ({ args, name, types, }: {
|
|
257
287
|
args: any[];
|
|
258
|
-
name: string |
|
|
259
|
-
types?: ReadonlyArray<string |
|
|
260
|
-
}) =>
|
|
288
|
+
name: string | typescript.Expression;
|
|
289
|
+
types?: ReadonlyArray<string | typescript.StringLiteral>;
|
|
290
|
+
}) => typescript.ReturnStatement;
|
|
261
291
|
returnStatement: ({ expression, }: {
|
|
262
|
-
expression?:
|
|
263
|
-
}) =>
|
|
292
|
+
expression?: typescript.Expression;
|
|
293
|
+
}) => typescript.ReturnStatement;
|
|
264
294
|
returnVariable: ({ expression, }: {
|
|
265
|
-
expression: string |
|
|
266
|
-
}) =>
|
|
267
|
-
safeAccessExpression: (path: string[]) =>
|
|
295
|
+
expression: string | typescript.Expression;
|
|
296
|
+
}) => typescript.ReturnStatement;
|
|
297
|
+
safeAccessExpression: (path: string[]) => typescript.Expression;
|
|
268
298
|
stringLiteral: ({ isSingleQuote, text, }: {
|
|
269
299
|
isSingleQuote?: boolean;
|
|
270
300
|
text: string;
|
|
271
|
-
}) =>
|
|
272
|
-
stringToTsNodes: typeof stringToTsNodes;
|
|
301
|
+
}) => typescript.StringLiteral;
|
|
273
302
|
templateLiteralType: ({ value, }: {
|
|
274
|
-
value: ReadonlyArray<string |
|
|
275
|
-
}) =>
|
|
276
|
-
this: () =>
|
|
303
|
+
value: ReadonlyArray<string | typescript.TypeNode>;
|
|
304
|
+
}) => typescript.TemplateLiteralTypeNode;
|
|
305
|
+
this: () => typescript.ThisExpression;
|
|
277
306
|
transformArrayMap: ({ path, transformExpression, }: {
|
|
278
307
|
path: string[];
|
|
279
|
-
transformExpression:
|
|
280
|
-
}) =>
|
|
308
|
+
transformExpression: typescript.Expression;
|
|
309
|
+
}) => typescript.IfStatement;
|
|
281
310
|
transformArrayMutation: ({ path, transformerName, }: {
|
|
282
311
|
path: string[];
|
|
283
312
|
transformerName: string;
|
|
284
|
-
}) =>
|
|
313
|
+
}) => typescript.Statement;
|
|
285
314
|
transformDateMutation: ({ path, }: {
|
|
286
315
|
path: string[];
|
|
287
|
-
}) =>
|
|
316
|
+
}) => typescript.Statement;
|
|
288
317
|
transformFunctionMutation: ({ path, transformerName, }: {
|
|
289
318
|
path: string[];
|
|
290
319
|
transformerName: string;
|
|
291
|
-
}) =>
|
|
320
|
+
}) => typescript.IfStatement[];
|
|
292
321
|
transformNewDate: ({ parameterName, }: {
|
|
293
322
|
parameterName: string;
|
|
294
|
-
}) =>
|
|
323
|
+
}) => typescript.NewExpression;
|
|
295
324
|
typeAliasDeclaration: ({ comment, exportType, name, type, typeParameters, }: {
|
|
296
325
|
comment?: Comments;
|
|
297
326
|
exportType?: boolean;
|
|
298
|
-
name: string |
|
|
299
|
-
type: string |
|
|
327
|
+
name: string | typescript.TypeReferenceNode;
|
|
328
|
+
type: string | typescript.TypeNode | typescript.Identifier;
|
|
300
329
|
typeParameters?: FunctionTypeParameter[];
|
|
301
|
-
}) =>
|
|
302
|
-
typeArrayNode: (types: ReadonlyArray<any |
|
|
330
|
+
}) => typescript.TypeAliasDeclaration;
|
|
331
|
+
typeArrayNode: (types: ReadonlyArray<any | typescript.TypeNode> | typescript.TypeNode | typescript.Identifier | string, isNullable?: boolean) => typescript.TypeNode;
|
|
303
332
|
typeInterfaceNode: ({ indexKey, indexProperty, isNullable, properties, useLegacyResolution, }: {
|
|
304
|
-
indexKey?:
|
|
333
|
+
indexKey?: typescript.TypeReferenceNode;
|
|
305
334
|
indexProperty?: Property;
|
|
306
335
|
isNullable?: boolean;
|
|
307
336
|
properties: Property[];
|
|
308
337
|
useLegacyResolution: boolean;
|
|
309
|
-
}) =>
|
|
338
|
+
}) => typescript.TypeNode;
|
|
310
339
|
typeIntersectionNode: ({ isNullable, types, }: {
|
|
311
340
|
isNullable?: boolean;
|
|
312
|
-
types: (any |
|
|
313
|
-
}) =>
|
|
314
|
-
typeNode: (base: any |
|
|
341
|
+
types: (any | typescript.TypeNode)[];
|
|
342
|
+
}) => typescript.TypeNode;
|
|
343
|
+
typeNode: (base: any | typescript.TypeNode, args?: (any | typescript.TypeNode)[]) => typescript.TypeNode;
|
|
315
344
|
typeOfExpression: ({ text, }: {
|
|
316
|
-
text: string |
|
|
317
|
-
}) =>
|
|
345
|
+
text: string | typescript.Identifier;
|
|
346
|
+
}) => typescript.TypeOfExpression;
|
|
318
347
|
typeOperatorNode: ({ operator, type, }: {
|
|
319
348
|
operator: "keyof" | "readonly" | "unique";
|
|
320
|
-
type:
|
|
321
|
-
}) =>
|
|
349
|
+
type: typescript.TypeNode;
|
|
350
|
+
}) => typescript.TypeOperatorNode;
|
|
322
351
|
typeParameterDeclaration: ({ constraint, defaultType, modifiers, name, }: {
|
|
323
|
-
constraint?:
|
|
324
|
-
defaultType?:
|
|
325
|
-
modifiers?: Array<
|
|
326
|
-
name: string |
|
|
327
|
-
}) =>
|
|
352
|
+
constraint?: typescript.TypeNode;
|
|
353
|
+
defaultType?: typescript.TypeNode;
|
|
354
|
+
modifiers?: Array<typescript.Modifier>;
|
|
355
|
+
name: string | typescript.Identifier;
|
|
356
|
+
}) => typescript.TypeParameterDeclaration;
|
|
328
357
|
typeParenthesizedNode: ({ type }: {
|
|
329
|
-
type:
|
|
330
|
-
}) =>
|
|
331
|
-
typeRecordNode: (keys: (any |
|
|
358
|
+
type: typescript.TypeNode;
|
|
359
|
+
}) => typescript.ParenthesizedTypeNode;
|
|
360
|
+
typeRecordNode: (keys: (any | typescript.TypeNode)[], values: (any | typescript.TypeNode)[], isNullable?: boolean, useLegacyResolution?: boolean) => typescript.TypeNode;
|
|
332
361
|
typeReferenceNode: ({ typeArguments, typeName, }: {
|
|
333
|
-
typeArguments?:
|
|
334
|
-
typeName: string |
|
|
335
|
-
}) =>
|
|
362
|
+
typeArguments?: typescript.TypeNode[];
|
|
363
|
+
typeName: string | typescript.EntityName;
|
|
364
|
+
}) => typescript.TypeReferenceNode;
|
|
336
365
|
typeTupleNode: ({ isNullable, types, }: {
|
|
337
366
|
isNullable?: boolean;
|
|
338
|
-
types: Array<any |
|
|
339
|
-
}) =>
|
|
367
|
+
types: Array<any | typescript.TypeNode>;
|
|
368
|
+
}) => typescript.TypeNode;
|
|
340
369
|
typeUnionNode: ({ isNullable, types, }: {
|
|
341
370
|
isNullable?: boolean;
|
|
342
|
-
types: ReadonlyArray<any |
|
|
343
|
-
}) =>
|
|
371
|
+
types: ReadonlyArray<any | typescript.TypeNode>;
|
|
372
|
+
}) => typescript.TypeNode;
|
|
344
373
|
valueToExpression: <T = unknown>({ identifiers, isValueAccess, shorthand, unescape, value, }: {
|
|
345
374
|
identifiers?: string[];
|
|
346
375
|
isValueAccess?: boolean;
|
|
347
376
|
shorthand?: boolean;
|
|
348
377
|
unescape?: boolean;
|
|
349
378
|
value: T;
|
|
350
|
-
}) =>
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
declare const defaultPaginationKeywords: readonly ["after", "before", "cursor", "offset", "page", "start"];
|
|
354
|
-
|
|
355
|
-
/**
|
|
356
|
-
* Default plugins used to generate artifacts if plugins aren't specified.
|
|
357
|
-
*/
|
|
358
|
-
declare const defaultPlugins: readonly ["@hey-api/typescript", "@hey-api/sdk"];
|
|
359
|
-
|
|
360
|
-
declare const clientDefaultConfig: {
|
|
361
|
-
readonly baseUrl: true;
|
|
362
|
-
readonly bundle: true;
|
|
363
|
-
readonly exportFromIndex: false;
|
|
379
|
+
}) => typescript.Expression | undefined;
|
|
364
380
|
};
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
+
/** @deprecated use tsc */
|
|
382
|
+
declare const compiler: {
|
|
383
|
+
anonymousFunction: ({ async, comment, multiLine, parameters, returnType, statements, types, }: {
|
|
384
|
+
async?: boolean;
|
|
385
|
+
comment?: Comments;
|
|
386
|
+
multiLine?: boolean;
|
|
387
|
+
parameters?: FunctionParameter[];
|
|
388
|
+
returnType?: string | typescript.TypeNode;
|
|
389
|
+
statements?: ReadonlyArray<typescript.Statement>;
|
|
390
|
+
types?: FunctionTypeParameter[];
|
|
391
|
+
}) => typescript.FunctionExpression;
|
|
392
|
+
arrayLiteralExpression: <T>({ elements, multiLine, }: {
|
|
393
|
+
elements: T[];
|
|
394
|
+
multiLine?: boolean;
|
|
395
|
+
}) => typescript.ArrayLiteralExpression;
|
|
396
|
+
arrowFunction: ({ async, comment, multiLine, parameters, returnType, statements, types, }: {
|
|
397
|
+
async?: boolean;
|
|
398
|
+
comment?: Comments;
|
|
399
|
+
multiLine?: boolean;
|
|
400
|
+
parameters?: ReadonlyArray<FunctionParameter>;
|
|
401
|
+
returnType?: string | typescript.TypeNode;
|
|
402
|
+
statements?: typescript.Statement[] | typescript.Expression;
|
|
403
|
+
types?: FunctionTypeParameter[];
|
|
404
|
+
}) => typescript.ArrowFunction;
|
|
405
|
+
asExpression: ({ expression, type, }: {
|
|
406
|
+
expression: typescript.Expression;
|
|
407
|
+
type: typescript.TypeNode;
|
|
408
|
+
}) => typescript.AsExpression;
|
|
409
|
+
assignment: ({ left, right, }: {
|
|
410
|
+
left: typescript.Expression;
|
|
411
|
+
right: typescript.Expression;
|
|
412
|
+
}) => typescript.AssignmentExpression<typescript.EqualsToken>;
|
|
413
|
+
awaitExpression: ({ expression, }: {
|
|
414
|
+
expression: typescript.Expression;
|
|
415
|
+
}) => typescript.AwaitExpression;
|
|
416
|
+
binaryExpression: ({ left, operator, right, }: {
|
|
417
|
+
left: typescript.Expression;
|
|
418
|
+
operator?: "=" | "===" | "in" | "??";
|
|
419
|
+
right: typescript.Expression | string;
|
|
420
|
+
}) => typescript.BinaryExpression;
|
|
421
|
+
block: ({ multiLine, statements, }: {
|
|
422
|
+
multiLine?: boolean;
|
|
423
|
+
statements: ReadonlyArray<typescript.Statement>;
|
|
424
|
+
}) => typescript.Block;
|
|
425
|
+
callExpression: ({ functionName, parameters, types, }: {
|
|
426
|
+
functionName: string | typescript.PropertyAccessExpression | typescript.PropertyAccessChain | typescript.ElementAccessExpression | typescript.Expression;
|
|
427
|
+
parameters?: Array<string | typescript.Expression | undefined>;
|
|
428
|
+
types?: ReadonlyArray<typescript.TypeNode>;
|
|
429
|
+
}) => typescript.CallExpression;
|
|
430
|
+
classDeclaration: ({ decorator, exportClass, extendedClasses, name, nodes, }: {
|
|
431
|
+
decorator?: {
|
|
432
|
+
args: any[];
|
|
433
|
+
name: string;
|
|
434
|
+
};
|
|
435
|
+
exportClass?: boolean;
|
|
436
|
+
extendedClasses?: ReadonlyArray<string>;
|
|
437
|
+
name: string;
|
|
438
|
+
nodes: ReadonlyArray<typescript.ClassElement>;
|
|
439
|
+
}) => typescript.ClassDeclaration;
|
|
440
|
+
conditionalExpression: ({ condition, whenFalse, whenTrue, }: {
|
|
441
|
+
condition: typescript.Expression;
|
|
442
|
+
whenFalse: typescript.Expression;
|
|
443
|
+
whenTrue: typescript.Expression;
|
|
444
|
+
}) => typescript.ConditionalExpression;
|
|
445
|
+
constVariable: ({ assertion, comment, destructure, exportConst, expression, name, typeName, }: {
|
|
446
|
+
assertion?: "const" | typescript.TypeNode;
|
|
447
|
+
comment?: Comments;
|
|
448
|
+
destructure?: boolean;
|
|
449
|
+
exportConst?: boolean;
|
|
450
|
+
expression: typescript.Expression;
|
|
451
|
+
name: string | typescript.TypeReferenceNode;
|
|
452
|
+
typeName?: string | typescript.IndexedAccessTypeNode | typescript.TypeNode;
|
|
453
|
+
}) => typescript.VariableStatement;
|
|
454
|
+
constructorDeclaration: ({ accessLevel, comment, multiLine, parameters, statements, }: {
|
|
455
|
+
accessLevel?: AccessLevel;
|
|
456
|
+
comment?: Comments;
|
|
457
|
+
multiLine?: boolean;
|
|
458
|
+
parameters?: FunctionParameter[];
|
|
459
|
+
statements?: typescript.Statement[];
|
|
460
|
+
}) => typescript.ConstructorDeclaration;
|
|
461
|
+
enumDeclaration: <T extends Record<string, any> | Array<ObjectValue>>({ comments: enumMemberComments, leadingComment: comments, name, obj, }: {
|
|
462
|
+
comments?: Record<string | number, Comments>;
|
|
463
|
+
leadingComment?: Comments;
|
|
464
|
+
name: string | typescript.TypeReferenceNode;
|
|
465
|
+
obj: T;
|
|
466
|
+
}) => typescript.EnumDeclaration;
|
|
467
|
+
exportAllDeclaration: ({ module, }: {
|
|
468
|
+
module: string;
|
|
469
|
+
}) => typescript.ExportDeclaration;
|
|
470
|
+
exportNamedDeclaration: ({ exports, module, }: {
|
|
471
|
+
exports: Array<ImportExportItem> | ImportExportItem;
|
|
472
|
+
module: string;
|
|
473
|
+
}) => typescript.ExportDeclaration;
|
|
474
|
+
expressionToStatement: ({ expression, }: {
|
|
475
|
+
expression: typescript.Expression;
|
|
476
|
+
}) => typescript.ExpressionStatement;
|
|
477
|
+
forOfStatement: ({ awaitModifier, expression, initializer, statement, }: {
|
|
478
|
+
awaitModifier?: typescript.AwaitKeyword;
|
|
479
|
+
expression: typescript.Expression;
|
|
480
|
+
initializer: typescript.ForInitializer;
|
|
481
|
+
statement: typescript.Statement;
|
|
482
|
+
}) => typescript.ForOfStatement;
|
|
483
|
+
functionTypeNode: ({ parameters, returnType, typeParameters, }: {
|
|
484
|
+
parameters?: typescript.ParameterDeclaration[];
|
|
485
|
+
returnType: typescript.TypeNode;
|
|
486
|
+
typeParameters?: typescript.TypeParameterDeclaration[];
|
|
487
|
+
}) => typescript.FunctionTypeNode;
|
|
488
|
+
getAccessorDeclaration: ({ name, returnType, statements, }: {
|
|
489
|
+
name: string | typescript.PropertyName;
|
|
490
|
+
returnType?: string | typescript.Identifier;
|
|
491
|
+
statements: ReadonlyArray<typescript.Statement>;
|
|
492
|
+
}) => typescript.GetAccessorDeclaration;
|
|
493
|
+
identifier: ({ text }: {
|
|
494
|
+
text: string;
|
|
495
|
+
}) => typescript.Identifier;
|
|
496
|
+
ifStatement: ({ elseStatement, expression, thenStatement, }: {
|
|
497
|
+
elseStatement?: typescript.Statement;
|
|
498
|
+
expression: typescript.Expression;
|
|
499
|
+
thenStatement: typescript.Statement;
|
|
500
|
+
}) => typescript.IfStatement;
|
|
501
|
+
indexedAccessTypeNode: ({ indexType, objectType, }: {
|
|
502
|
+
indexType: typescript.TypeNode;
|
|
503
|
+
objectType: typescript.TypeNode;
|
|
504
|
+
}) => typescript.IndexedAccessTypeNode;
|
|
505
|
+
isTsNode: (node: any) => node is typescript.Expression;
|
|
506
|
+
keywordTypeNode: ({ keyword, }: {
|
|
507
|
+
keyword: Extract<SyntaxKindKeyword, "any" | "boolean" | "never" | "number" | "string" | "undefined" | "unknown" | "void">;
|
|
508
|
+
}) => typescript.KeywordTypeNode<typescript.SyntaxKind.VoidKeyword | typescript.SyntaxKind.AnyKeyword | typescript.SyntaxKind.BooleanKeyword | typescript.SyntaxKind.NeverKeyword | typescript.SyntaxKind.NumberKeyword | typescript.SyntaxKind.StringKeyword | typescript.SyntaxKind.UndefinedKeyword | typescript.SyntaxKind.UnknownKeyword>;
|
|
509
|
+
literalTypeNode: ({ literal, }: {
|
|
510
|
+
literal: typescript.LiteralTypeNode["literal"];
|
|
511
|
+
}) => typescript.LiteralTypeNode;
|
|
512
|
+
mappedTypeNode: ({ members, nameType, questionToken, readonlyToken, type, typeParameter, }: {
|
|
513
|
+
members?: typescript.NodeArray<typescript.TypeElement>;
|
|
514
|
+
nameType?: typescript.TypeNode;
|
|
515
|
+
questionToken?: typescript.QuestionToken | typescript.PlusToken | typescript.MinusToken;
|
|
516
|
+
readonlyToken?: typescript.ReadonlyKeyword | typescript.PlusToken | typescript.MinusToken;
|
|
517
|
+
type?: typescript.TypeNode;
|
|
518
|
+
typeParameter: typescript.TypeParameterDeclaration;
|
|
519
|
+
}) => typescript.MappedTypeNode;
|
|
520
|
+
methodDeclaration: ({ accessLevel, comment, isStatic, multiLine, name, parameters, returnType, statements, types, }: {
|
|
521
|
+
accessLevel?: AccessLevel;
|
|
522
|
+
comment?: Comments;
|
|
523
|
+
isStatic?: boolean;
|
|
524
|
+
multiLine?: boolean;
|
|
525
|
+
name: string;
|
|
526
|
+
parameters?: ReadonlyArray<FunctionParameter>;
|
|
527
|
+
returnType?: string | typescript.TypeNode;
|
|
528
|
+
statements?: typescript.Statement[];
|
|
529
|
+
types?: FunctionTypeParameter[];
|
|
530
|
+
}) => typescript.MethodDeclaration;
|
|
531
|
+
namedImportDeclarations: ({ imports, module, }: {
|
|
532
|
+
imports: Array<ImportExportItem> | ImportExportItem;
|
|
533
|
+
module: string;
|
|
534
|
+
}) => typescript.ImportDeclaration;
|
|
535
|
+
namespaceDeclaration: ({ name, statements, }: {
|
|
536
|
+
name: string;
|
|
537
|
+
statements: Array<typescript.Statement>;
|
|
538
|
+
}) => typescript.ModuleDeclaration;
|
|
539
|
+
newExpression: ({ argumentsArray, expression, typeArguments, }: {
|
|
540
|
+
argumentsArray?: Array<typescript.Expression>;
|
|
541
|
+
expression: typescript.Expression;
|
|
542
|
+
typeArguments?: Array<typescript.TypeNode>;
|
|
543
|
+
}) => typescript.NewExpression;
|
|
544
|
+
nodeToString: typeof tsNodeToString;
|
|
545
|
+
null: () => typescript.NullLiteral;
|
|
546
|
+
objectExpression: <T extends Record<string, any> | Array<ObjectValue>>({ comments, identifiers, multiLine, obj, shorthand, unescape, }: {
|
|
547
|
+
comments?: Comments;
|
|
548
|
+
identifiers?: string[];
|
|
549
|
+
multiLine?: boolean;
|
|
550
|
+
obj: T;
|
|
551
|
+
shorthand?: boolean;
|
|
552
|
+
unescape?: boolean;
|
|
553
|
+
}) => typescript.ObjectLiteralExpression;
|
|
554
|
+
ots: {
|
|
555
|
+
boolean: (value: boolean) => typescript.TrueLiteral | typescript.FalseLiteral;
|
|
556
|
+
export: ({ alias, asType, name }: ImportExportItemObject) => typescript.ExportSpecifier;
|
|
557
|
+
import: ({ alias, asType, name }: ImportExportItemObject) => typescript.ImportSpecifier;
|
|
558
|
+
number: (value: number) => typescript.NumericLiteral | typescript.PrefixUnaryExpression;
|
|
559
|
+
string: (value: string, unescape?: boolean) => typescript.Identifier | typescript.StringLiteral;
|
|
560
|
+
};
|
|
561
|
+
parameterDeclaration: ({ initializer, modifiers, name, required, type, }: {
|
|
562
|
+
initializer?: typescript.Expression;
|
|
563
|
+
modifiers?: ReadonlyArray<typescript.ModifierLike>;
|
|
564
|
+
name: string | typescript.BindingName;
|
|
565
|
+
required?: boolean;
|
|
566
|
+
type?: typescript.TypeNode;
|
|
567
|
+
}) => typescript.ParameterDeclaration;
|
|
568
|
+
propertyAccessExpression: ({ expression, isOptional, name, }: {
|
|
569
|
+
expression: string | typescript.Expression;
|
|
570
|
+
isOptional?: boolean;
|
|
571
|
+
name: string | number | typescript.MemberName;
|
|
572
|
+
}) => typescript.PropertyAccessChain | typescript.PropertyAccessExpression | typescript.ElementAccessExpression;
|
|
573
|
+
propertyAccessExpressions: ({ expressions, }: {
|
|
574
|
+
expressions: Array<string | typescript.Expression | typescript.MemberName>;
|
|
575
|
+
}) => typescript.PropertyAccessExpression;
|
|
576
|
+
propertyAssignment: ({ initializer, name, }: {
|
|
577
|
+
initializer: typescript.Expression;
|
|
578
|
+
name: string | typescript.PropertyName;
|
|
579
|
+
}) => typescript.PropertyAssignment;
|
|
580
|
+
propertyDeclaration: ({ initializer, modifier, name, type, }: {
|
|
581
|
+
initializer?: typescript.Expression;
|
|
582
|
+
modifier?: AccessLevel | "async" | "export" | "readonly" | "static";
|
|
583
|
+
name: string | typescript.PropertyName;
|
|
584
|
+
type?: typescript.TypeNode;
|
|
585
|
+
}) => typescript.PropertyDeclaration;
|
|
586
|
+
regularExpressionLiteral: ({ flags, text, }: {
|
|
587
|
+
flags?: ReadonlyArray<"g" | "i" | "m" | "s" | "u" | "y">;
|
|
588
|
+
text: string;
|
|
589
|
+
}) => typescript.RegularExpressionLiteral;
|
|
590
|
+
returnFunctionCall: ({ args, name, types, }: {
|
|
591
|
+
args: any[];
|
|
592
|
+
name: string | typescript.Expression;
|
|
593
|
+
types?: ReadonlyArray<string | typescript.StringLiteral>;
|
|
594
|
+
}) => typescript.ReturnStatement;
|
|
595
|
+
returnStatement: ({ expression, }: {
|
|
596
|
+
expression?: typescript.Expression;
|
|
597
|
+
}) => typescript.ReturnStatement;
|
|
598
|
+
returnVariable: ({ expression, }: {
|
|
599
|
+
expression: string | typescript.Expression;
|
|
600
|
+
}) => typescript.ReturnStatement;
|
|
601
|
+
safeAccessExpression: (path: string[]) => typescript.Expression;
|
|
602
|
+
stringLiteral: ({ isSingleQuote, text, }: {
|
|
603
|
+
isSingleQuote?: boolean;
|
|
604
|
+
text: string;
|
|
605
|
+
}) => typescript.StringLiteral;
|
|
606
|
+
templateLiteralType: ({ value, }: {
|
|
607
|
+
value: ReadonlyArray<string | typescript.TypeNode>;
|
|
608
|
+
}) => typescript.TemplateLiteralTypeNode;
|
|
609
|
+
this: () => typescript.ThisExpression;
|
|
610
|
+
transformArrayMap: ({ path, transformExpression, }: {
|
|
611
|
+
path: string[];
|
|
612
|
+
transformExpression: typescript.Expression;
|
|
613
|
+
}) => typescript.IfStatement;
|
|
614
|
+
transformArrayMutation: ({ path, transformerName, }: {
|
|
615
|
+
path: string[];
|
|
616
|
+
transformerName: string;
|
|
617
|
+
}) => typescript.Statement;
|
|
618
|
+
transformDateMutation: ({ path, }: {
|
|
619
|
+
path: string[];
|
|
620
|
+
}) => typescript.Statement;
|
|
621
|
+
transformFunctionMutation: ({ path, transformerName, }: {
|
|
622
|
+
path: string[];
|
|
623
|
+
transformerName: string;
|
|
624
|
+
}) => typescript.IfStatement[];
|
|
625
|
+
transformNewDate: ({ parameterName, }: {
|
|
626
|
+
parameterName: string;
|
|
627
|
+
}) => typescript.NewExpression;
|
|
628
|
+
typeAliasDeclaration: ({ comment, exportType, name, type, typeParameters, }: {
|
|
629
|
+
comment?: Comments;
|
|
630
|
+
exportType?: boolean;
|
|
631
|
+
name: string | typescript.TypeReferenceNode;
|
|
632
|
+
type: string | typescript.TypeNode | typescript.Identifier;
|
|
633
|
+
typeParameters?: FunctionTypeParameter[];
|
|
634
|
+
}) => typescript.TypeAliasDeclaration;
|
|
635
|
+
typeArrayNode: (types: ReadonlyArray<any | typescript.TypeNode> | typescript.TypeNode | typescript.Identifier | string, isNullable?: boolean) => typescript.TypeNode;
|
|
636
|
+
typeInterfaceNode: ({ indexKey, indexProperty, isNullable, properties, useLegacyResolution, }: {
|
|
637
|
+
indexKey?: typescript.TypeReferenceNode;
|
|
638
|
+
indexProperty?: Property;
|
|
639
|
+
isNullable?: boolean;
|
|
640
|
+
properties: Property[];
|
|
641
|
+
useLegacyResolution: boolean;
|
|
642
|
+
}) => typescript.TypeNode;
|
|
643
|
+
typeIntersectionNode: ({ isNullable, types, }: {
|
|
644
|
+
isNullable?: boolean;
|
|
645
|
+
types: (any | typescript.TypeNode)[];
|
|
646
|
+
}) => typescript.TypeNode;
|
|
647
|
+
typeNode: (base: any | typescript.TypeNode, args?: (any | typescript.TypeNode)[]) => typescript.TypeNode;
|
|
648
|
+
typeOfExpression: ({ text, }: {
|
|
649
|
+
text: string | typescript.Identifier;
|
|
650
|
+
}) => typescript.TypeOfExpression;
|
|
651
|
+
typeOperatorNode: ({ operator, type, }: {
|
|
652
|
+
operator: "keyof" | "readonly" | "unique";
|
|
653
|
+
type: typescript.TypeNode;
|
|
654
|
+
}) => typescript.TypeOperatorNode;
|
|
655
|
+
typeParameterDeclaration: ({ constraint, defaultType, modifiers, name, }: {
|
|
656
|
+
constraint?: typescript.TypeNode;
|
|
657
|
+
defaultType?: typescript.TypeNode;
|
|
658
|
+
modifiers?: Array<typescript.Modifier>;
|
|
659
|
+
name: string | typescript.Identifier;
|
|
660
|
+
}) => typescript.TypeParameterDeclaration;
|
|
661
|
+
typeParenthesizedNode: ({ type }: {
|
|
662
|
+
type: typescript.TypeNode;
|
|
663
|
+
}) => typescript.ParenthesizedTypeNode;
|
|
664
|
+
typeRecordNode: (keys: (any | typescript.TypeNode)[], values: (any | typescript.TypeNode)[], isNullable?: boolean, useLegacyResolution?: boolean) => typescript.TypeNode;
|
|
665
|
+
typeReferenceNode: ({ typeArguments, typeName, }: {
|
|
666
|
+
typeArguments?: typescript.TypeNode[];
|
|
667
|
+
typeName: string | typescript.EntityName;
|
|
668
|
+
}) => typescript.TypeReferenceNode;
|
|
669
|
+
typeTupleNode: ({ isNullable, types, }: {
|
|
670
|
+
isNullable?: boolean;
|
|
671
|
+
types: Array<any | typescript.TypeNode>;
|
|
672
|
+
}) => typescript.TypeNode;
|
|
673
|
+
typeUnionNode: ({ isNullable, types, }: {
|
|
674
|
+
isNullable?: boolean;
|
|
675
|
+
types: ReadonlyArray<any | typescript.TypeNode>;
|
|
676
|
+
}) => typescript.TypeNode;
|
|
677
|
+
valueToExpression: <T = unknown>({ identifiers, isValueAccess, shorthand, unescape, value, }: {
|
|
678
|
+
identifiers?: string[];
|
|
679
|
+
isValueAccess?: boolean;
|
|
680
|
+
shorthand?: boolean;
|
|
681
|
+
unescape?: boolean;
|
|
682
|
+
value: T;
|
|
683
|
+
}) => typescript.Expression | undefined;
|
|
381
684
|
};
|
|
382
685
|
|
|
383
686
|
declare const utils: {
|
|
@@ -400,4 +703,4 @@ declare const createClient: (userConfig?: Configs) => Promise<ReadonlyArray<Clie
|
|
|
400
703
|
*/
|
|
401
704
|
declare const defineConfig: (config: Configs) => Promise<UserConfig>;
|
|
402
705
|
|
|
403
|
-
export { IR, Plugin, UserConfig, clientDefaultConfig, clientDefaultMeta, clientPluginHandler, compiler, createClient, defaultPaginationKeywords, defaultPlugins, defineConfig, definePluginConfig, utils };
|
|
706
|
+
export { IR, Plugin, UserConfig, clientDefaultConfig, clientDefaultMeta, clientPluginHandler, compiler, createClient, defaultPaginationKeywords, defaultPlugins, defineConfig, definePluginConfig, tsc, utils };
|