@hey-api/openapi-ts 0.87.5 → 0.88.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.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,5 @@
1
- import { $ as Client$2, A as LiteralTsDsl, B as InitTsDsl, C as SetterTsDsl, D as NotTsDsl, E as ObjectTsDsl, F as TypeExprTsDsl, G as BinaryTsDsl, H as FieldTsDsl, I as TypeAttrTsDsl, J as AwaitTsDsl, K as ReturnTsDsl, L as DecoratorTsDsl, M as GetterTsDsl, N as FuncTsDsl, O as NewlineTsDsl, P as ExprTsDsl, Q as ExpressionTransformer, R as ClassTsDsl, S as TemplateTsDsl, T as PatternTsDsl, U as DescribeTsDsl, V as ParamTsDsl, W as AttrTsDsl, X as TsDsl, Y as ArrayTsDsl, Z as TypeTransformer, _ as VarTsDsl, a as Plugin, at as Client$1, b as TypeAliasTsDsl, c as OpenApiOperationObject, ct as IR, d as OpenApiResponseObject, et as PluginHandler, f as OpenApiSchemaObject, g as DollarTsDsl, h as $, i as DefinePlugin, it as Client$3, j as IfTsDsl, k as NewTsDsl, l as OpenApiParameterObject, lt as LazyOrAsync, m as Logger, n as UserConfig, nt as Client$5, o as OpenApi, ot as Client, p as Context, q as CallTsDsl, rt as Client$4, s as OpenApiMetaObject, st as StringCase, tt as Client$6, u as OpenApiRequestBodyObject, ut as MaybeArray, v as TypeObjectTsDsl, w as RegExpTsDsl, x as ThrowTsDsl, y as TypeLiteralTsDsl, z as MethodTsDsl } from "./config-DHUTNwtw.js";
1
+ import { A as StringCase, C as PluginHandler, D as Client$3, E as Client$4, M as LazyOrAsync, N as MaybeArray, O as Client$1, S as Client$2, T as Client$5, _ as $, a as Plugin, b as TsDsl, c as OpenApiOperationObject, d as OpenApiResponseObject, f as OpenApiSchemaObject, g as ExpressionTransformer, h as TypeTransformer, i as DefinePlugin, j as IR, k as Client, l as OpenApiParameterObject, m as Logger, n as UserConfig, o as OpenApi, p as Context, s as OpenApiMetaObject, u as OpenApiRequestBodyObject, v as DollarTsDsl, w as Client$6, x as TypeTsDsl, y as MaybeTsDsl } from "./config-DCoXG8pO.js";
2
2
  import "@hey-api/codegen-core";
3
- import * as typescript34 from "typescript";
4
- import ts from "typescript";
5
3
 
6
4
  //#region src/generate.d.ts
7
5
 
@@ -47,1622 +45,6 @@ declare const definePluginConfig: <T extends Plugin.Types>(defaultConfig: Plugin
47
45
  */
48
46
  name: any;
49
47
  };
50
- declare namespace types_d_exports {
51
- export { AccessLevel, FunctionParameter, FunctionTypeParameter, ObjectValue, SyntaxKindKeyword, createAnonymousFunction, createArrayLiteralExpression, createArrowFunction, createAsExpression, createAssignment, createAwaitExpression, createBlock, createConditionalExpression, createEnumDeclaration, createForOfStatement, createFunctionTypeNode, createGetAccessorDeclaration, createIndexedAccessTypeNode, createKeywordTypeNode, createLiteralTypeNode, createMappedTypeNode, createNamespaceDeclaration, createNewExpression, createNull, createObjectType, createParameterDeclaration, createPropertyAccessChain, createPropertyAccessExpression, createPropertyAssignment, createRegularExpressionLiteral, createStringLiteral, createTemplateLiteralType, createTypeAliasDeclaration, createTypeNode, createTypeOfExpression, createTypeOperatorNode, createTypeParameterDeclaration, createTypeParenthesizedNode, createTypeReferenceNode, syntaxKindKeyword, toExpression, toParameterDeclarations, toTypeParameters };
52
- }
53
- type AccessLevel = 'private' | 'protected' | 'public';
54
- type FunctionParameter = {
55
- accessLevel?: AccessLevel;
56
- default?: any;
57
- isReadOnly?: boolean;
58
- isRequired?: boolean;
59
- name: string;
60
- type?: any | ts.TypeNode;
61
- } | {
62
- destructure: ReadonlyArray<FunctionParameter>;
63
- type?: any | ts.TypeNode;
64
- };
65
- interface FunctionTypeParameter {
66
- default?: any;
67
- extends?: string | ts.TypeNode;
68
- name: string | ts.Identifier;
69
- }
70
- declare const createTypeNode: (base: any | ts.TypeNode, args?: (any | ts.TypeNode)[]) => ts.TypeNode;
71
- declare const createPropertyAccessChain: ({
72
- expression,
73
- name
74
- }: {
75
- expression: ts.Expression;
76
- name: string | ts.MemberName;
77
- }) => ts.PropertyAccessChain;
78
- declare const createPropertyAccessExpression: ({
79
- expression,
80
- isOptional,
81
- name
82
- }: {
83
- expression: string | ts.Expression;
84
- isOptional?: boolean;
85
- name: string | number | ts.MemberName;
86
- }) => ts.PropertyAccessChain | ts.PropertyAccessExpression | ts.ElementAccessExpression;
87
- declare const createNull: () => ts.NullLiteral;
88
- /**
89
- * Convert an unknown value to an expression.
90
- * @param identifiers - list of keys that are treated as identifiers.
91
- * @param shorthand - if shorthand syntax is allowed.
92
- * @param unescape - if string should be unescaped.
93
- * @param value - the unknown value.
94
- * @returns ts.Expression
95
- */
96
- declare const toExpression: <T = unknown>({
97
- identifiers,
98
- isValueAccess,
99
- shorthand,
100
- unescape,
101
- value
102
- }: {
103
- identifiers?: string[];
104
- isValueAccess?: boolean;
105
- shorthand?: boolean;
106
- unescape?: boolean;
107
- value: T;
108
- }) => ts.Expression | undefined;
109
- /**
110
- * Convert parameters to the declaration array expected by TypeScript
111
- * Compiler API.
112
- * @param parameters - the parameters to convert to declarations
113
- * @returns ts.ParameterDeclaration[]
114
- */
115
- declare const toParameterDeclarations: (parameters: ReadonlyArray<FunctionParameter>) => ts.ParameterDeclaration[];
116
- type SyntaxKindKeyword = 'any' | 'async' | 'boolean' | 'export' | 'never' | 'number' | 'private' | 'protected' | 'public' | 'readonly' | 'static' | 'string' | 'undefined' | 'unknown' | 'void';
117
- declare const syntaxKindKeyword: <T extends SyntaxKindKeyword>({
118
- keyword
119
- }: {
120
- keyword: T;
121
- }) => T extends "protected" ? ts.SyntaxKind.ProtectedKeyword : T extends "public" ? ts.SyntaxKind.PublicKeyword : T extends "private" ? ts.SyntaxKind.PrivateKeyword : T extends "export" ? ts.SyntaxKind.ExportKeyword : T extends "async" ? ts.SyntaxKind.ExportKeyword : T extends "readonly" ? ts.SyntaxKind.ExportKeyword : T extends "static" ? ts.SyntaxKind.ExportKeyword : ts.SyntaxKind.AnyKeyword | ts.SyntaxKind.BooleanKeyword | ts.SyntaxKind.NeverKeyword | ts.SyntaxKind.NumberKeyword | ts.SyntaxKind.StringKeyword | ts.SyntaxKind.UndefinedKeyword | ts.SyntaxKind.UnknownKeyword | ts.SyntaxKind.VoidKeyword;
122
- declare const createKeywordTypeNode: ({
123
- keyword
124
- }: {
125
- keyword: Extract<SyntaxKindKeyword, "any" | "boolean" | "never" | "number" | "string" | "undefined" | "unknown" | "void">;
126
- }) => ts.KeywordTypeNode<ts.SyntaxKind.VoidKeyword | ts.SyntaxKind.AnyKeyword | ts.SyntaxKind.BooleanKeyword | ts.SyntaxKind.NeverKeyword | ts.SyntaxKind.NumberKeyword | ts.SyntaxKind.StringKeyword | ts.SyntaxKind.UndefinedKeyword | ts.SyntaxKind.UnknownKeyword>;
127
- declare const toTypeParameters: (types: (FunctionTypeParameter | ts.TypeParameterDeclaration)[]) => ts.TypeParameterDeclaration[];
128
- declare const createTypeOperatorNode: ({
129
- operator,
130
- type
131
- }: {
132
- operator: "keyof" | "readonly" | "unique";
133
- type: ts.TypeNode;
134
- }) => ts.TypeOperatorNode;
135
- declare const createTypeParameterDeclaration: ({
136
- constraint,
137
- defaultType,
138
- modifiers,
139
- name
140
- }: {
141
- constraint?: ts.TypeNode;
142
- defaultType?: ts.TypeNode;
143
- modifiers?: Array<ts.Modifier>;
144
- name: string | ts.Identifier;
145
- }) => ts.TypeParameterDeclaration;
146
- declare const createMappedTypeNode: ({
147
- members,
148
- nameType,
149
- questionToken,
150
- readonlyToken,
151
- type,
152
- typeParameter
153
- }: {
154
- members?: ts.NodeArray<ts.TypeElement>;
155
- nameType?: ts.TypeNode;
156
- questionToken?: ts.QuestionToken | ts.PlusToken | ts.MinusToken;
157
- readonlyToken?: ts.ReadonlyKeyword | ts.PlusToken | ts.MinusToken;
158
- type?: ts.TypeNode;
159
- typeParameter: ts.TypeParameterDeclaration;
160
- }) => ts.MappedTypeNode;
161
- declare const createLiteralTypeNode: ({
162
- literal
163
- }: {
164
- literal: ts.LiteralTypeNode["literal"];
165
- }) => ts.LiteralTypeNode;
166
- /**
167
- * Create arrow function type expression.
168
- */
169
- declare const createArrowFunction: ({
170
- async,
171
- comment,
172
- multiLine,
173
- parameters,
174
- returnType,
175
- statements,
176
- types
177
- }: {
178
- async?: boolean;
179
- comment?: Comments;
180
- multiLine?: boolean;
181
- parameters?: ReadonlyArray<FunctionParameter>;
182
- returnType?: string | ts.TypeNode;
183
- statements?: ts.Statement[] | ts.Expression;
184
- types?: FunctionTypeParameter[];
185
- }) => ts.ArrowFunction;
186
- /**
187
- * Create anonymous function type expression.
188
- */
189
- declare const createAnonymousFunction: ({
190
- async,
191
- comment,
192
- multiLine,
193
- parameters,
194
- returnType,
195
- statements,
196
- types
197
- }: {
198
- async?: boolean;
199
- comment?: Comments;
200
- multiLine?: boolean;
201
- parameters?: FunctionParameter[];
202
- returnType?: string | ts.TypeNode;
203
- statements?: ReadonlyArray<ts.Statement>;
204
- types?: FunctionTypeParameter[];
205
- }) => ts.FunctionExpression;
206
- /**
207
- * Create Array type expression.
208
- */
209
- declare const createArrayLiteralExpression: <T>({
210
- elements,
211
- multiLine
212
- }: {
213
- /**
214
- * The array to create.
215
- */
216
- elements: T[];
217
- /**
218
- * Should the array be multi line?
219
- *
220
- * @default false
221
- */
222
- multiLine?: boolean;
223
- }) => ts.ArrayLiteralExpression;
224
- declare const createAwaitExpression: ({
225
- expression
226
- }: {
227
- expression: ts.Expression;
228
- }) => ts.AwaitExpression;
229
- declare const createFunctionTypeNode: ({
230
- parameters,
231
- returnType,
232
- typeParameters
233
- }: {
234
- parameters?: ts.ParameterDeclaration[];
235
- returnType: ts.TypeNode;
236
- typeParameters?: ts.TypeParameterDeclaration[];
237
- }) => ts.FunctionTypeNode;
238
- type ObjectValue = {
239
- assertion?: 'any' | ts.TypeNode;
240
- comments?: Comments;
241
- spread: string;
242
- } | {
243
- comments?: Comments;
244
- isValueAccess?: boolean;
245
- key: string;
246
- shorthand?: boolean;
247
- value: any;
248
- };
249
- /**
250
- * Create Object type expression.
251
- * @param comments - comments to add to each property.
252
- * @param identifier - keys that should be treated as identifiers.
253
- * @param multiLine - if the object should be multiline.
254
- * @param obj - the object to create expression with.
255
- * @param shorthand - if shorthand syntax should be used.
256
- * @param unescape - if properties strings should be unescaped.
257
- * @returns ts.ObjectLiteralExpression
258
- */
259
- declare const createObjectType: <T extends Record<string, any> | Array<ObjectValue>>({
260
- comments,
261
- identifiers,
262
- multiLine,
263
- obj,
264
- shorthand,
265
- unescape
266
- }: {
267
- comments?: Comments;
268
- identifiers?: string[];
269
- multiLine?: boolean;
270
- obj: T;
271
- shorthand?: boolean;
272
- unescape?: boolean;
273
- }) => ts.ObjectLiteralExpression;
274
- /**
275
- * Create enum declaration. Example `export enum T = { X, Y };`
276
- * @param asConst - whether to use const enums.
277
- * @param comments - comments to add to each property.
278
- * @param leadingComment - leading comment to add to enum.
279
- * @param name - the name of the enum.
280
- * @param obj - the object representing the enum.
281
- * @returns ts.EnumDeclaration
282
- */
283
- declare const createEnumDeclaration: <T extends Record<string, any> | Array<ObjectValue>>({
284
- asConst,
285
- comments: enumMemberComments,
286
- leadingComment: comments,
287
- name,
288
- obj
289
- }: {
290
- asConst: boolean;
291
- comments?: Record<string | number, Comments>;
292
- leadingComment?: Comments;
293
- name: string | ts.TypeReferenceNode;
294
- obj: T;
295
- }) => ts.EnumDeclaration;
296
- /**
297
- * Create namespace declaration. Example `export namespace MyNamespace { ... }`
298
- * @param name - the name of the namespace.
299
- * @param nodes - the nodes in the namespace.
300
- * @returns
301
- */
302
- declare const createNamespaceDeclaration: ({
303
- name,
304
- statements
305
- }: {
306
- name: string;
307
- statements: Array<ts.Statement>;
308
- }) => ts.ModuleDeclaration;
309
- declare const createIndexedAccessTypeNode: ({
310
- indexType,
311
- objectType
312
- }: {
313
- indexType: ts.TypeNode;
314
- objectType: ts.TypeNode;
315
- }) => ts.IndexedAccessTypeNode;
316
- declare const createGetAccessorDeclaration: ({
317
- modifiers,
318
- name,
319
- returnType,
320
- statements
321
- }: {
322
- modifiers?: Modifier | ReadonlyArray<Modifier>;
323
- name: string | ts.PropertyName;
324
- returnType?: string | ts.Identifier;
325
- statements: ReadonlyArray<ts.Statement>;
326
- }) => ts.GetAccessorDeclaration;
327
- declare const createStringLiteral: ({
328
- isSingleQuote,
329
- text
330
- }: {
331
- isSingleQuote?: boolean;
332
- text: string;
333
- }) => ts.StringLiteral;
334
- declare const createConditionalExpression: ({
335
- condition,
336
- whenFalse,
337
- whenTrue
338
- }: {
339
- condition: ts.Expression;
340
- whenFalse: ts.Expression;
341
- whenTrue: ts.Expression;
342
- }) => ts.ConditionalExpression;
343
- declare const createTypeOfExpression: ({
344
- text
345
- }: {
346
- text: string | ts.Identifier;
347
- }) => ts.TypeOfExpression;
348
- /**
349
- * Create a type alias declaration. Example `export type X = Y;`.
350
- * @param comment (optional) comments to add
351
- * @param name the name of the type
352
- * @param type the type
353
- * @returns ts.TypeAliasDeclaration
354
- */
355
- declare const createTypeAliasDeclaration: ({
356
- comment,
357
- exportType,
358
- name,
359
- type,
360
- typeParameters
361
- }: {
362
- comment?: Comments;
363
- exportType?: boolean;
364
- name: string | ts.TypeReferenceNode;
365
- type: string | ts.TypeNode | ts.Identifier;
366
- typeParameters?: FunctionTypeParameter[];
367
- }) => ts.TypeAliasDeclaration;
368
- declare const createTypeReferenceNode: ({
369
- typeArguments,
370
- typeName
371
- }: {
372
- typeArguments?: ts.TypeNode[];
373
- typeName: string | ts.EntityName;
374
- }) => ts.TypeReferenceNode;
375
- declare const createTypeParenthesizedNode: ({
376
- type
377
- }: {
378
- type: ts.TypeNode;
379
- }) => ts.ParenthesizedTypeNode;
380
- declare const createParameterDeclaration: ({
381
- initializer,
382
- modifiers,
383
- name,
384
- required,
385
- type
386
- }: {
387
- initializer?: ts.Expression;
388
- modifiers?: ReadonlyArray<ts.ModifierLike>;
389
- name: string | ts.BindingName;
390
- required?: boolean;
391
- type?: ts.TypeNode;
392
- }) => ts.ParameterDeclaration;
393
- declare const createNewExpression: ({
394
- argumentsArray,
395
- expression,
396
- typeArguments
397
- }: {
398
- argumentsArray?: Array<ts.Expression>;
399
- expression: ts.Expression;
400
- typeArguments?: Array<ts.TypeNode>;
401
- }) => ts.NewExpression;
402
- declare const createForOfStatement: ({
403
- awaitModifier,
404
- expression,
405
- initializer,
406
- statement
407
- }: {
408
- awaitModifier?: ts.AwaitKeyword;
409
- expression: ts.Expression;
410
- initializer: ts.ForInitializer;
411
- statement: ts.Statement;
412
- }) => ts.ForOfStatement;
413
- declare const createAssignment: ({
414
- left,
415
- right
416
- }: {
417
- left: ts.Expression;
418
- right: ts.Expression;
419
- }) => ts.AssignmentExpression<ts.EqualsToken>;
420
- declare const createBlock: ({
421
- multiLine,
422
- statements
423
- }: {
424
- multiLine?: boolean;
425
- statements: ReadonlyArray<ts.Statement>;
426
- }) => ts.Block;
427
- declare const createPropertyAssignment: ({
428
- initializer,
429
- name
430
- }: {
431
- initializer: ts.Expression;
432
- name: string | ts.PropertyName;
433
- }) => ts.PropertyAssignment;
434
- declare const createRegularExpressionLiteral: ({
435
- flags,
436
- text
437
- }: {
438
- flags?: ReadonlyArray<"g" | "i" | "m" | "s" | "u" | "y">;
439
- text: string;
440
- }) => ts.RegularExpressionLiteral;
441
- declare const createAsExpression: ({
442
- expression,
443
- type
444
- }: {
445
- expression: ts.Expression;
446
- type: ts.TypeNode;
447
- }) => ts.AsExpression;
448
- declare const createTemplateLiteralType: ({
449
- value
450
- }: {
451
- value: ReadonlyArray<string | ts.TypeNode>;
452
- }) => ts.TemplateLiteralTypeNode;
453
- //#endregion
454
- //#region src/tsc/utils.d.ts
455
- interface ImportExportItemObject<Name extends string | undefined = string | undefined, Alias extends string | undefined = undefined> {
456
- alias?: Alias;
457
- asType?: boolean;
458
- name: Name;
459
- }
460
- /**
461
- * Print a TypeScript node to a string.
462
- * @param node the node to print
463
- * @returns string
464
- */
465
- declare function tsNodeToString({
466
- node,
467
- unescape
468
- }: {
469
- node: ts.Node;
470
- unescape?: boolean;
471
- }): string;
472
- type Modifier = AccessLevel | 'async' | 'export' | 'readonly' | 'static';
473
- type CommentLines = Array<string | null | false | undefined>;
474
- type CommentObject = {
475
- jsdoc?: boolean;
476
- lines: CommentLines;
477
- };
478
- type Comments = CommentLines | Array<CommentObject>;
479
- declare namespace module_d_exports {
480
- export { ImportExportItem, createCallExpression, createConstVariable, createExportAllDeclaration, createNamedExportDeclarations, createNamedImportDeclarations };
481
- }
482
- /**
483
- * Create export all declaration. Example: `export * from './y'`.
484
- * @param module - module containing exports
485
- * @returns ts.ExportDeclaration
486
- */
487
- declare const createExportAllDeclaration: ({
488
- module,
489
- shouldAppendJs
490
- }: {
491
- module: string;
492
- shouldAppendJs?: boolean;
493
- }) => ts.ExportDeclaration;
494
- type ImportExportItem = ImportExportItemObject | string;
495
- declare const createCallExpression: ({
496
- functionName,
497
- parameters,
498
- types
499
- }: {
500
- functionName: string | ts.PropertyAccessExpression | ts.PropertyAccessChain | ts.ElementAccessExpression | ts.Expression;
501
- parameters?: Array<string | ts.Expression | undefined>;
502
- types?: ReadonlyArray<ts.TypeNode>;
503
- }) => ts.CallExpression;
504
- /**
505
- * Create a named export declaration. Example: `export { X } from './y'`.
506
- * @param exports - named imports to export
507
- * @param module - module containing exports
508
- * @returns ts.ExportDeclaration
509
- */
510
- declare const createNamedExportDeclarations: ({
511
- exports,
512
- module
513
- }: {
514
- exports: Array<ImportExportItem> | ImportExportItem;
515
- module: string;
516
- }) => ts.ExportDeclaration;
517
- /**
518
- * Create a const variable. Optionally, it can use const assertion or export
519
- * statement. Example: `export x = {} as const`.
520
- * @param assertion use const assertion?
521
- * @param exportConst export created variable?
522
- * @param expression expression for the variable.
523
- * @param name name of the variable.
524
- * @returns ts.VariableStatement
525
- */
526
- declare const createConstVariable: ({
527
- assertion,
528
- comment,
529
- destructure,
530
- exportConst,
531
- expression,
532
- name,
533
- typeName
534
- }: {
535
- assertion?: "const" | ts.TypeNode;
536
- comment?: Comments;
537
- destructure?: boolean;
538
- exportConst?: boolean;
539
- expression: ts.Expression;
540
- name: string | ts.TypeReferenceNode;
541
- typeName?: string | ts.IndexedAccessTypeNode | ts.TypeNode;
542
- }) => ts.VariableStatement;
543
- /**
544
- * Create a named import declaration. Example: `import { X } from './y'`.
545
- * @param imports - named exports to import
546
- * @param module - module containing imports
547
- * @returns ts.ImportDeclaration
548
- */
549
- declare const createNamedImportDeclarations: ({
550
- imports,
551
- module
552
- }: {
553
- imports: Array<ImportExportItem> | ImportExportItem;
554
- module: string;
555
- }) => ts.ImportDeclaration;
556
- //#endregion
557
- //#region src/tsc/typedef.d.ts
558
- type Property = {
559
- comment?: Comments;
560
- isReadOnly?: boolean;
561
- isRequired?: boolean;
562
- name: string | ts.PropertyName;
563
- type: any | ts.TypeNode;
564
- };
565
- //#endregion
566
- //#region src/tsc/index.d.ts
567
- declare const tsc: {
568
- anonymousFunction: ({
569
- async,
570
- comment,
571
- multiLine,
572
- parameters,
573
- returnType,
574
- statements,
575
- types: types_d_exports
576
- }: {
577
- async?: boolean;
578
- comment?: Comments;
579
- multiLine?: boolean;
580
- parameters?: FunctionParameter[];
581
- returnType?: string | typescript34.TypeNode;
582
- statements?: ReadonlyArray<typescript34.Statement>;
583
- types?: FunctionTypeParameter[];
584
- }) => typescript34.FunctionExpression;
585
- arrayLiteralExpression: <T>({
586
- elements,
587
- multiLine
588
- }: {
589
- elements: T[];
590
- multiLine?: boolean;
591
- }) => typescript34.ArrayLiteralExpression;
592
- arrowFunction: ({
593
- async,
594
- comment,
595
- multiLine,
596
- parameters,
597
- returnType,
598
- statements,
599
- types: types_d_exports
600
- }: {
601
- async?: boolean;
602
- comment?: Comments;
603
- multiLine?: boolean;
604
- parameters?: ReadonlyArray<FunctionParameter>;
605
- returnType?: string | typescript34.TypeNode;
606
- statements?: typescript34.Statement[] | typescript34.Expression;
607
- types?: FunctionTypeParameter[];
608
- }) => typescript34.ArrowFunction;
609
- asExpression: ({
610
- expression,
611
- type
612
- }: {
613
- expression: typescript34.Expression;
614
- type: typescript34.TypeNode;
615
- }) => typescript34.AsExpression;
616
- assignment: ({
617
- left,
618
- right
619
- }: {
620
- left: typescript34.Expression;
621
- right: typescript34.Expression;
622
- }) => typescript34.AssignmentExpression<typescript34.EqualsToken>;
623
- awaitExpression: ({
624
- expression
625
- }: {
626
- expression: typescript34.Expression;
627
- }) => typescript34.AwaitExpression;
628
- binaryExpression: ({
629
- left,
630
- operator,
631
- right
632
- }: {
633
- left: typescript34.Expression;
634
- operator?: "=" | "===" | "!==" | "in" | "??";
635
- right: typescript34.Expression | string;
636
- }) => typescript34.BinaryExpression;
637
- block: ({
638
- multiLine,
639
- statements
640
- }: {
641
- multiLine?: boolean;
642
- statements: ReadonlyArray<typescript34.Statement>;
643
- }) => typescript34.Block;
644
- callExpression: ({
645
- functionName,
646
- parameters,
647
- types: types_d_exports
648
- }: {
649
- functionName: string | typescript34.PropertyAccessExpression | typescript34.PropertyAccessChain | typescript34.ElementAccessExpression | typescript34.Expression;
650
- parameters?: Array<string | typescript34.Expression | undefined>;
651
- types?: ReadonlyArray<typescript34.TypeNode>;
652
- }) => typescript34.CallExpression;
653
- classDeclaration: ({
654
- decorator,
655
- exportClass,
656
- extendedClasses,
657
- name,
658
- nodes,
659
- typeParameters
660
- }: {
661
- decorator?: {
662
- args: any[];
663
- name: string;
664
- };
665
- exportClass?: boolean;
666
- extendedClasses?: ReadonlyArray<string>;
667
- name: string;
668
- nodes: ReadonlyArray<typescript34.ClassElement>;
669
- typeParameters?: ReadonlyArray<typescript34.TypeParameterDeclaration>;
670
- }) => typescript34.ClassDeclaration;
671
- conditionalExpression: ({
672
- condition,
673
- whenFalse,
674
- whenTrue
675
- }: {
676
- condition: typescript34.Expression;
677
- whenFalse: typescript34.Expression;
678
- whenTrue: typescript34.Expression;
679
- }) => typescript34.ConditionalExpression;
680
- constVariable: ({
681
- assertion,
682
- comment,
683
- destructure,
684
- exportConst,
685
- expression,
686
- name,
687
- typeName
688
- }: {
689
- assertion?: "const" | typescript34.TypeNode;
690
- comment?: Comments;
691
- destructure?: boolean;
692
- exportConst?: boolean;
693
- expression: typescript34.Expression;
694
- name: string | typescript34.TypeReferenceNode;
695
- typeName?: string | typescript34.IndexedAccessTypeNode | typescript34.TypeNode;
696
- }) => typescript34.VariableStatement;
697
- constructorDeclaration: ({
698
- accessLevel,
699
- comment,
700
- multiLine,
701
- parameters,
702
- statements
703
- }: {
704
- accessLevel?: AccessLevel;
705
- comment?: Comments;
706
- multiLine?: boolean;
707
- parameters?: FunctionParameter[];
708
- statements?: typescript34.Statement[];
709
- }) => typescript34.ConstructorDeclaration;
710
- enumDeclaration: <T extends Record<string, any> | Array<ObjectValue>>({
711
- asConst,
712
- comments: enumMemberComments,
713
- leadingComment: comments,
714
- name,
715
- obj
716
- }: {
717
- asConst: boolean;
718
- comments?: Record<string | number, Comments>;
719
- leadingComment?: Comments;
720
- name: string | typescript34.TypeReferenceNode;
721
- obj: T;
722
- }) => typescript34.EnumDeclaration;
723
- exportAllDeclaration: ({
724
- module: module_d_exports,
725
- shouldAppendJs
726
- }: {
727
- module: string;
728
- shouldAppendJs?: boolean;
729
- }) => typescript34.ExportDeclaration;
730
- exportNamedDeclaration: ({
731
- exports,
732
- module: module_d_exports
733
- }: {
734
- exports: Array<ImportExportItem> | ImportExportItem;
735
- module: string;
736
- }) => typescript34.ExportDeclaration;
737
- expressionToStatement: ({
738
- expression
739
- }: {
740
- expression: typescript34.Expression;
741
- }) => typescript34.ExpressionStatement;
742
- forOfStatement: ({
743
- awaitModifier,
744
- expression,
745
- initializer,
746
- statement
747
- }: {
748
- awaitModifier?: typescript34.AwaitKeyword;
749
- expression: typescript34.Expression;
750
- initializer: typescript34.ForInitializer;
751
- statement: typescript34.Statement;
752
- }) => typescript34.ForOfStatement;
753
- functionTypeNode: ({
754
- parameters,
755
- returnType,
756
- typeParameters
757
- }: {
758
- parameters?: typescript34.ParameterDeclaration[];
759
- returnType: typescript34.TypeNode;
760
- typeParameters?: typescript34.TypeParameterDeclaration[];
761
- }) => typescript34.FunctionTypeNode;
762
- getAccessorDeclaration: ({
763
- modifiers,
764
- name,
765
- returnType,
766
- statements
767
- }: {
768
- modifiers?: Modifier | ReadonlyArray<Modifier>;
769
- name: string | typescript34.PropertyName;
770
- returnType?: string | typescript34.Identifier;
771
- statements: ReadonlyArray<typescript34.Statement>;
772
- }) => typescript34.GetAccessorDeclaration;
773
- identifier: (args: string | {
774
- text: string;
775
- }) => typescript34.Identifier;
776
- ifStatement: ({
777
- elseStatement,
778
- expression,
779
- thenStatement
780
- }: {
781
- elseStatement?: typescript34.Statement;
782
- expression: typescript34.Expression;
783
- thenStatement: typescript34.Statement;
784
- }) => typescript34.IfStatement;
785
- indexedAccessTypeNode: ({
786
- indexType,
787
- objectType
788
- }: {
789
- indexType: typescript34.TypeNode;
790
- objectType: typescript34.TypeNode;
791
- }) => typescript34.IndexedAccessTypeNode;
792
- isTsNode: (node: any) => node is typescript34.Expression;
793
- keywordTypeNode: ({
794
- keyword
795
- }: {
796
- keyword: Extract<SyntaxKindKeyword, "any" | "boolean" | "never" | "number" | "string" | "undefined" | "unknown" | "void">;
797
- }) => typescript34.KeywordTypeNode<typescript34.SyntaxKind.VoidKeyword | typescript34.SyntaxKind.AnyKeyword | typescript34.SyntaxKind.BooleanKeyword | typescript34.SyntaxKind.NeverKeyword | typescript34.SyntaxKind.NumberKeyword | typescript34.SyntaxKind.StringKeyword | typescript34.SyntaxKind.UndefinedKeyword | typescript34.SyntaxKind.UnknownKeyword>;
798
- literalTypeNode: ({
799
- literal
800
- }: {
801
- literal: typescript34.LiteralTypeNode["literal"];
802
- }) => typescript34.LiteralTypeNode;
803
- mappedTypeNode: ({
804
- members,
805
- nameType,
806
- questionToken,
807
- readonlyToken,
808
- type,
809
- typeParameter
810
- }: {
811
- members?: typescript34.NodeArray<typescript34.TypeElement>;
812
- nameType?: typescript34.TypeNode;
813
- questionToken?: typescript34.QuestionToken | typescript34.PlusToken | typescript34.MinusToken;
814
- readonlyToken?: typescript34.ReadonlyKeyword | typescript34.PlusToken | typescript34.MinusToken;
815
- type?: typescript34.TypeNode;
816
- typeParameter: typescript34.TypeParameterDeclaration;
817
- }) => typescript34.MappedTypeNode;
818
- methodDeclaration: ({
819
- accessLevel,
820
- comment,
821
- isStatic,
822
- multiLine,
823
- name,
824
- parameters,
825
- returnType,
826
- statements,
827
- types: types_d_exports
828
- }: {
829
- accessLevel?: AccessLevel;
830
- comment?: Comments;
831
- isStatic?: boolean;
832
- multiLine?: boolean;
833
- name: string;
834
- parameters?: ReadonlyArray<FunctionParameter>;
835
- returnType?: string | typescript34.TypeNode;
836
- statements?: typescript34.Statement[];
837
- types?: FunctionTypeParameter[];
838
- }) => typescript34.MethodDeclaration;
839
- namedImportDeclarations: ({
840
- imports,
841
- module: module_d_exports
842
- }: {
843
- imports: Array<ImportExportItem> | ImportExportItem;
844
- module: string;
845
- }) => typescript34.ImportDeclaration;
846
- namespaceDeclaration: ({
847
- name,
848
- statements
849
- }: {
850
- name: string;
851
- statements: Array<typescript34.Statement>;
852
- }) => typescript34.ModuleDeclaration;
853
- newExpression: ({
854
- argumentsArray,
855
- expression,
856
- typeArguments
857
- }: {
858
- argumentsArray?: Array<typescript34.Expression>;
859
- expression: typescript34.Expression;
860
- typeArguments?: Array<typescript34.TypeNode>;
861
- }) => typescript34.NewExpression;
862
- nodeToString: typeof tsNodeToString;
863
- null: () => typescript34.NullLiteral;
864
- objectExpression: <T extends Record<string, any> | Array<ObjectValue>>({
865
- comments,
866
- identifiers,
867
- multiLine,
868
- obj,
869
- shorthand,
870
- unescape
871
- }: {
872
- comments?: Comments;
873
- identifiers?: string[];
874
- multiLine?: boolean;
875
- obj: T;
876
- shorthand?: boolean;
877
- unescape?: boolean;
878
- }) => typescript34.ObjectLiteralExpression;
879
- ots: {
880
- boolean: (value: boolean) => typescript34.TrueLiteral | typescript34.FalseLiteral;
881
- export: ({
882
- alias,
883
- asType,
884
- name
885
- }: ImportExportItemObject) => typescript34.ExportSpecifier;
886
- import: ({
887
- alias,
888
- asType,
889
- name
890
- }: ImportExportItemObject) => typescript34.ImportSpecifier;
891
- number: (value: number) => typescript34.NumericLiteral | typescript34.PrefixUnaryExpression;
892
- string: (value: string, unescape?: boolean) => typescript34.Identifier | typescript34.StringLiteral;
893
- };
894
- parameterDeclaration: ({
895
- initializer,
896
- modifiers,
897
- name,
898
- required,
899
- type
900
- }: {
901
- initializer?: typescript34.Expression;
902
- modifiers?: ReadonlyArray<typescript34.ModifierLike>;
903
- name: string | typescript34.BindingName;
904
- required?: boolean;
905
- type?: typescript34.TypeNode;
906
- }) => typescript34.ParameterDeclaration;
907
- prefixUnaryExpression: ({
908
- expression,
909
- prefix
910
- }: {
911
- expression: string | typescript34.Expression;
912
- prefix: ("-" | "!") | typescript34.PrefixUnaryOperator;
913
- }) => typescript34.PrefixUnaryExpression;
914
- propertyAccessExpression: ({
915
- expression,
916
- isOptional,
917
- name
918
- }: {
919
- expression: string | typescript34.Expression;
920
- isOptional?: boolean;
921
- name: string | number | typescript34.MemberName;
922
- }) => typescript34.PropertyAccessChain | typescript34.PropertyAccessExpression | typescript34.ElementAccessExpression;
923
- propertyAccessExpressions: ({
924
- expressions
925
- }: {
926
- expressions: Array<string | typescript34.Expression | typescript34.MemberName>;
927
- }) => typescript34.PropertyAccessExpression;
928
- propertyAssignment: ({
929
- initializer,
930
- name
931
- }: {
932
- initializer: typescript34.Expression;
933
- name: string | typescript34.PropertyName;
934
- }) => typescript34.PropertyAssignment;
935
- propertyDeclaration: ({
936
- initializer,
937
- modifiers,
938
- name,
939
- type
940
- }: {
941
- initializer?: typescript34.Expression;
942
- modifiers?: Modifier | ReadonlyArray<Modifier>;
943
- name: string | typescript34.PropertyName;
944
- type?: typescript34.TypeNode;
945
- }) => typescript34.PropertyDeclaration;
946
- regularExpressionLiteral: ({
947
- flags,
948
- text
949
- }: {
950
- flags?: ReadonlyArray<"g" | "i" | "m" | "s" | "u" | "y">;
951
- text: string;
952
- }) => typescript34.RegularExpressionLiteral;
953
- returnFunctionCall: ({
954
- args,
955
- name,
956
- types: types_d_exports
957
- }: {
958
- args: any[];
959
- name: string | typescript34.Expression;
960
- types?: ReadonlyArray<string | typescript34.StringLiteral>;
961
- }) => typescript34.ReturnStatement;
962
- returnStatement: ({
963
- expression
964
- }: {
965
- expression?: typescript34.Expression;
966
- }) => typescript34.ReturnStatement;
967
- returnVariable: ({
968
- expression
969
- }: {
970
- expression: string | typescript34.Expression;
971
- }) => typescript34.ReturnStatement;
972
- safeAccessExpression: (path: string[]) => typescript34.Expression;
973
- stringLiteral: ({
974
- isSingleQuote,
975
- text
976
- }: {
977
- isSingleQuote?: boolean;
978
- text: string;
979
- }) => typescript34.StringLiteral;
980
- templateLiteralType: ({
981
- value
982
- }: {
983
- value: ReadonlyArray<string | typescript34.TypeNode>;
984
- }) => typescript34.TemplateLiteralTypeNode;
985
- this: () => typescript34.ThisExpression;
986
- transformArrayMap: ({
987
- path,
988
- transformExpression
989
- }: {
990
- path: string[];
991
- transformExpression: typescript34.Expression;
992
- }) => typescript34.IfStatement;
993
- transformArrayMutation: ({
994
- path,
995
- transformerName
996
- }: {
997
- path: string[];
998
- transformerName: string;
999
- }) => typescript34.Statement;
1000
- transformDateMutation: ({
1001
- path
1002
- }: {
1003
- path: string[];
1004
- }) => typescript34.Statement;
1005
- transformFunctionMutation: ({
1006
- path,
1007
- transformerName
1008
- }: {
1009
- path: string[];
1010
- transformerName: string;
1011
- }) => typescript34.IfStatement[];
1012
- transformNewDate: ({
1013
- parameterName
1014
- }: {
1015
- parameterName: string;
1016
- }) => typescript34.NewExpression;
1017
- typeAliasDeclaration: ({
1018
- comment,
1019
- exportType,
1020
- name,
1021
- type,
1022
- typeParameters
1023
- }: {
1024
- comment?: Comments;
1025
- exportType?: boolean;
1026
- name: string | typescript34.TypeReferenceNode;
1027
- type: string | typescript34.TypeNode | typescript34.Identifier;
1028
- typeParameters?: FunctionTypeParameter[];
1029
- }) => typescript34.TypeAliasDeclaration;
1030
- typeArrayNode: (types: ReadonlyArray<any | typescript34.TypeNode> | typescript34.TypeNode | typescript34.Identifier | string, isNullable?: boolean) => typescript34.TypeNode;
1031
- typeInterfaceNode: ({
1032
- indexKey,
1033
- indexProperty,
1034
- isNullable,
1035
- properties,
1036
- useLegacyResolution
1037
- }: {
1038
- indexKey?: typescript34.TypeReferenceNode;
1039
- indexProperty?: Property;
1040
- isNullable?: boolean;
1041
- properties: Property[];
1042
- useLegacyResolution: boolean;
1043
- }) => typescript34.TypeNode;
1044
- typeIntersectionNode: ({
1045
- isNullable,
1046
- types: types_d_exports
1047
- }: {
1048
- isNullable?: boolean;
1049
- types: (any | typescript34.TypeNode)[];
1050
- }) => typescript34.TypeNode;
1051
- typeNode: (base: any | typescript34.TypeNode, args?: (any | typescript34.TypeNode)[]) => typescript34.TypeNode;
1052
- typeOfExpression: ({
1053
- text
1054
- }: {
1055
- text: string | typescript34.Identifier;
1056
- }) => typescript34.TypeOfExpression;
1057
- typeOperatorNode: ({
1058
- operator,
1059
- type
1060
- }: {
1061
- operator: "keyof" | "readonly" | "unique";
1062
- type: typescript34.TypeNode;
1063
- }) => typescript34.TypeOperatorNode;
1064
- typeParameterDeclaration: ({
1065
- constraint,
1066
- defaultType,
1067
- modifiers,
1068
- name
1069
- }: {
1070
- constraint?: typescript34.TypeNode;
1071
- defaultType?: typescript34.TypeNode;
1072
- modifiers?: Array<typescript34.Modifier>;
1073
- name: string | typescript34.Identifier;
1074
- }) => typescript34.TypeParameterDeclaration;
1075
- typeParenthesizedNode: ({
1076
- type
1077
- }: {
1078
- type: typescript34.TypeNode;
1079
- }) => typescript34.ParenthesizedTypeNode;
1080
- typeRecordNode: (keys: (any | typescript34.TypeNode)[], values: (any | typescript34.TypeNode)[], isNullable?: boolean, useLegacyResolution?: boolean) => typescript34.TypeNode;
1081
- typeReferenceNode: ({
1082
- typeArguments,
1083
- typeName
1084
- }: {
1085
- typeArguments?: typescript34.TypeNode[];
1086
- typeName: string | typescript34.EntityName;
1087
- }) => typescript34.TypeReferenceNode;
1088
- typeTupleNode: ({
1089
- isNullable,
1090
- types: types_d_exports
1091
- }: {
1092
- isNullable?: boolean;
1093
- types: Array<any | typescript34.TypeNode>;
1094
- }) => typescript34.TypeNode;
1095
- typeUnionNode: ({
1096
- isNullable,
1097
- types: types_d_exports
1098
- }: {
1099
- isNullable?: boolean;
1100
- types: ReadonlyArray<any | typescript34.TypeNode>;
1101
- }) => typescript34.TypeNode;
1102
- valueToExpression: <T = unknown>({
1103
- identifiers,
1104
- isValueAccess,
1105
- shorthand,
1106
- unescape,
1107
- value
1108
- }: {
1109
- identifiers?: string[];
1110
- isValueAccess?: boolean;
1111
- shorthand?: boolean;
1112
- unescape?: boolean;
1113
- value: T;
1114
- }) => typescript34.Expression | undefined;
1115
- };
1116
- /** @deprecated use tsc */
1117
- declare const compiler: {
1118
- anonymousFunction: ({
1119
- async,
1120
- comment,
1121
- multiLine,
1122
- parameters,
1123
- returnType,
1124
- statements,
1125
- types: types_d_exports
1126
- }: {
1127
- async?: boolean;
1128
- comment?: Comments;
1129
- multiLine?: boolean;
1130
- parameters?: FunctionParameter[];
1131
- returnType?: string | typescript34.TypeNode;
1132
- statements?: ReadonlyArray<typescript34.Statement>;
1133
- types?: FunctionTypeParameter[];
1134
- }) => typescript34.FunctionExpression;
1135
- arrayLiteralExpression: <T>({
1136
- elements,
1137
- multiLine
1138
- }: {
1139
- elements: T[];
1140
- multiLine?: boolean;
1141
- }) => typescript34.ArrayLiteralExpression;
1142
- arrowFunction: ({
1143
- async,
1144
- comment,
1145
- multiLine,
1146
- parameters,
1147
- returnType,
1148
- statements,
1149
- types: types_d_exports
1150
- }: {
1151
- async?: boolean;
1152
- comment?: Comments;
1153
- multiLine?: boolean;
1154
- parameters?: ReadonlyArray<FunctionParameter>;
1155
- returnType?: string | typescript34.TypeNode;
1156
- statements?: typescript34.Statement[] | typescript34.Expression;
1157
- types?: FunctionTypeParameter[];
1158
- }) => typescript34.ArrowFunction;
1159
- asExpression: ({
1160
- expression,
1161
- type
1162
- }: {
1163
- expression: typescript34.Expression;
1164
- type: typescript34.TypeNode;
1165
- }) => typescript34.AsExpression;
1166
- assignment: ({
1167
- left,
1168
- right
1169
- }: {
1170
- left: typescript34.Expression;
1171
- right: typescript34.Expression;
1172
- }) => typescript34.AssignmentExpression<typescript34.EqualsToken>;
1173
- awaitExpression: ({
1174
- expression
1175
- }: {
1176
- expression: typescript34.Expression;
1177
- }) => typescript34.AwaitExpression;
1178
- binaryExpression: ({
1179
- left,
1180
- operator,
1181
- right
1182
- }: {
1183
- left: typescript34.Expression;
1184
- operator?: "=" | "===" | "!==" | "in" | "??";
1185
- right: typescript34.Expression | string;
1186
- }) => typescript34.BinaryExpression;
1187
- block: ({
1188
- multiLine,
1189
- statements
1190
- }: {
1191
- multiLine?: boolean;
1192
- statements: ReadonlyArray<typescript34.Statement>;
1193
- }) => typescript34.Block;
1194
- callExpression: ({
1195
- functionName,
1196
- parameters,
1197
- types: types_d_exports
1198
- }: {
1199
- functionName: string | typescript34.PropertyAccessExpression | typescript34.PropertyAccessChain | typescript34.ElementAccessExpression | typescript34.Expression;
1200
- parameters?: Array<string | typescript34.Expression | undefined>;
1201
- types?: ReadonlyArray<typescript34.TypeNode>;
1202
- }) => typescript34.CallExpression;
1203
- classDeclaration: ({
1204
- decorator,
1205
- exportClass,
1206
- extendedClasses,
1207
- name,
1208
- nodes,
1209
- typeParameters
1210
- }: {
1211
- decorator?: {
1212
- args: any[];
1213
- name: string;
1214
- };
1215
- exportClass?: boolean;
1216
- extendedClasses?: ReadonlyArray<string>;
1217
- name: string;
1218
- nodes: ReadonlyArray<typescript34.ClassElement>;
1219
- typeParameters?: ReadonlyArray<typescript34.TypeParameterDeclaration>;
1220
- }) => typescript34.ClassDeclaration;
1221
- conditionalExpression: ({
1222
- condition,
1223
- whenFalse,
1224
- whenTrue
1225
- }: {
1226
- condition: typescript34.Expression;
1227
- whenFalse: typescript34.Expression;
1228
- whenTrue: typescript34.Expression;
1229
- }) => typescript34.ConditionalExpression;
1230
- constVariable: ({
1231
- assertion,
1232
- comment,
1233
- destructure,
1234
- exportConst,
1235
- expression,
1236
- name,
1237
- typeName
1238
- }: {
1239
- assertion?: "const" | typescript34.TypeNode;
1240
- comment?: Comments;
1241
- destructure?: boolean;
1242
- exportConst?: boolean;
1243
- expression: typescript34.Expression;
1244
- name: string | typescript34.TypeReferenceNode;
1245
- typeName?: string | typescript34.IndexedAccessTypeNode | typescript34.TypeNode;
1246
- }) => typescript34.VariableStatement;
1247
- constructorDeclaration: ({
1248
- accessLevel,
1249
- comment,
1250
- multiLine,
1251
- parameters,
1252
- statements
1253
- }: {
1254
- accessLevel?: AccessLevel;
1255
- comment?: Comments;
1256
- multiLine?: boolean;
1257
- parameters?: FunctionParameter[];
1258
- statements?: typescript34.Statement[];
1259
- }) => typescript34.ConstructorDeclaration;
1260
- enumDeclaration: <T extends Record<string, any> | Array<ObjectValue>>({
1261
- asConst,
1262
- comments: enumMemberComments,
1263
- leadingComment: comments,
1264
- name,
1265
- obj
1266
- }: {
1267
- asConst: boolean;
1268
- comments?: Record<string | number, Comments>;
1269
- leadingComment?: Comments;
1270
- name: string | typescript34.TypeReferenceNode;
1271
- obj: T;
1272
- }) => typescript34.EnumDeclaration;
1273
- exportAllDeclaration: ({
1274
- module: module_d_exports,
1275
- shouldAppendJs
1276
- }: {
1277
- module: string;
1278
- shouldAppendJs?: boolean;
1279
- }) => typescript34.ExportDeclaration;
1280
- exportNamedDeclaration: ({
1281
- exports,
1282
- module: module_d_exports
1283
- }: {
1284
- exports: Array<ImportExportItem> | ImportExportItem;
1285
- module: string;
1286
- }) => typescript34.ExportDeclaration;
1287
- expressionToStatement: ({
1288
- expression
1289
- }: {
1290
- expression: typescript34.Expression;
1291
- }) => typescript34.ExpressionStatement;
1292
- forOfStatement: ({
1293
- awaitModifier,
1294
- expression,
1295
- initializer,
1296
- statement
1297
- }: {
1298
- awaitModifier?: typescript34.AwaitKeyword;
1299
- expression: typescript34.Expression;
1300
- initializer: typescript34.ForInitializer;
1301
- statement: typescript34.Statement;
1302
- }) => typescript34.ForOfStatement;
1303
- functionTypeNode: ({
1304
- parameters,
1305
- returnType,
1306
- typeParameters
1307
- }: {
1308
- parameters?: typescript34.ParameterDeclaration[];
1309
- returnType: typescript34.TypeNode;
1310
- typeParameters?: typescript34.TypeParameterDeclaration[];
1311
- }) => typescript34.FunctionTypeNode;
1312
- getAccessorDeclaration: ({
1313
- modifiers,
1314
- name,
1315
- returnType,
1316
- statements
1317
- }: {
1318
- modifiers?: Modifier | ReadonlyArray<Modifier>;
1319
- name: string | typescript34.PropertyName;
1320
- returnType?: string | typescript34.Identifier;
1321
- statements: ReadonlyArray<typescript34.Statement>;
1322
- }) => typescript34.GetAccessorDeclaration;
1323
- identifier: (args: string | {
1324
- text: string;
1325
- }) => typescript34.Identifier;
1326
- ifStatement: ({
1327
- elseStatement,
1328
- expression,
1329
- thenStatement
1330
- }: {
1331
- elseStatement?: typescript34.Statement;
1332
- expression: typescript34.Expression;
1333
- thenStatement: typescript34.Statement;
1334
- }) => typescript34.IfStatement;
1335
- indexedAccessTypeNode: ({
1336
- indexType,
1337
- objectType
1338
- }: {
1339
- indexType: typescript34.TypeNode;
1340
- objectType: typescript34.TypeNode;
1341
- }) => typescript34.IndexedAccessTypeNode;
1342
- isTsNode: (node: any) => node is typescript34.Expression;
1343
- keywordTypeNode: ({
1344
- keyword
1345
- }: {
1346
- keyword: Extract<SyntaxKindKeyword, "any" | "boolean" | "never" | "number" | "string" | "undefined" | "unknown" | "void">;
1347
- }) => typescript34.KeywordTypeNode<typescript34.SyntaxKind.VoidKeyword | typescript34.SyntaxKind.AnyKeyword | typescript34.SyntaxKind.BooleanKeyword | typescript34.SyntaxKind.NeverKeyword | typescript34.SyntaxKind.NumberKeyword | typescript34.SyntaxKind.StringKeyword | typescript34.SyntaxKind.UndefinedKeyword | typescript34.SyntaxKind.UnknownKeyword>;
1348
- literalTypeNode: ({
1349
- literal
1350
- }: {
1351
- literal: typescript34.LiteralTypeNode["literal"];
1352
- }) => typescript34.LiteralTypeNode;
1353
- mappedTypeNode: ({
1354
- members,
1355
- nameType,
1356
- questionToken,
1357
- readonlyToken,
1358
- type,
1359
- typeParameter
1360
- }: {
1361
- members?: typescript34.NodeArray<typescript34.TypeElement>;
1362
- nameType?: typescript34.TypeNode;
1363
- questionToken?: typescript34.QuestionToken | typescript34.PlusToken | typescript34.MinusToken;
1364
- readonlyToken?: typescript34.ReadonlyKeyword | typescript34.PlusToken | typescript34.MinusToken;
1365
- type?: typescript34.TypeNode;
1366
- typeParameter: typescript34.TypeParameterDeclaration;
1367
- }) => typescript34.MappedTypeNode;
1368
- methodDeclaration: ({
1369
- accessLevel,
1370
- comment,
1371
- isStatic,
1372
- multiLine,
1373
- name,
1374
- parameters,
1375
- returnType,
1376
- statements,
1377
- types: types_d_exports
1378
- }: {
1379
- accessLevel?: AccessLevel;
1380
- comment?: Comments;
1381
- isStatic?: boolean;
1382
- multiLine?: boolean;
1383
- name: string;
1384
- parameters?: ReadonlyArray<FunctionParameter>;
1385
- returnType?: string | typescript34.TypeNode;
1386
- statements?: typescript34.Statement[];
1387
- types?: FunctionTypeParameter[];
1388
- }) => typescript34.MethodDeclaration;
1389
- namedImportDeclarations: ({
1390
- imports,
1391
- module: module_d_exports
1392
- }: {
1393
- imports: Array<ImportExportItem> | ImportExportItem;
1394
- module: string;
1395
- }) => typescript34.ImportDeclaration;
1396
- namespaceDeclaration: ({
1397
- name,
1398
- statements
1399
- }: {
1400
- name: string;
1401
- statements: Array<typescript34.Statement>;
1402
- }) => typescript34.ModuleDeclaration;
1403
- newExpression: ({
1404
- argumentsArray,
1405
- expression,
1406
- typeArguments
1407
- }: {
1408
- argumentsArray?: Array<typescript34.Expression>;
1409
- expression: typescript34.Expression;
1410
- typeArguments?: Array<typescript34.TypeNode>;
1411
- }) => typescript34.NewExpression;
1412
- nodeToString: typeof tsNodeToString;
1413
- null: () => typescript34.NullLiteral;
1414
- objectExpression: <T extends Record<string, any> | Array<ObjectValue>>({
1415
- comments,
1416
- identifiers,
1417
- multiLine,
1418
- obj,
1419
- shorthand,
1420
- unescape
1421
- }: {
1422
- comments?: Comments;
1423
- identifiers?: string[];
1424
- multiLine?: boolean;
1425
- obj: T;
1426
- shorthand?: boolean;
1427
- unescape?: boolean;
1428
- }) => typescript34.ObjectLiteralExpression;
1429
- ots: {
1430
- boolean: (value: boolean) => typescript34.TrueLiteral | typescript34.FalseLiteral;
1431
- export: ({
1432
- alias,
1433
- asType,
1434
- name
1435
- }: ImportExportItemObject) => typescript34.ExportSpecifier;
1436
- import: ({
1437
- alias,
1438
- asType,
1439
- name
1440
- }: ImportExportItemObject) => typescript34.ImportSpecifier;
1441
- number: (value: number) => typescript34.NumericLiteral | typescript34.PrefixUnaryExpression;
1442
- string: (value: string, unescape?: boolean) => typescript34.Identifier | typescript34.StringLiteral;
1443
- };
1444
- parameterDeclaration: ({
1445
- initializer,
1446
- modifiers,
1447
- name,
1448
- required,
1449
- type
1450
- }: {
1451
- initializer?: typescript34.Expression;
1452
- modifiers?: ReadonlyArray<typescript34.ModifierLike>;
1453
- name: string | typescript34.BindingName;
1454
- required?: boolean;
1455
- type?: typescript34.TypeNode;
1456
- }) => typescript34.ParameterDeclaration;
1457
- prefixUnaryExpression: ({
1458
- expression,
1459
- prefix
1460
- }: {
1461
- expression: string | typescript34.Expression;
1462
- prefix: ("-" | "!") | typescript34.PrefixUnaryOperator;
1463
- }) => typescript34.PrefixUnaryExpression;
1464
- propertyAccessExpression: ({
1465
- expression,
1466
- isOptional,
1467
- name
1468
- }: {
1469
- expression: string | typescript34.Expression;
1470
- isOptional?: boolean;
1471
- name: string | number | typescript34.MemberName;
1472
- }) => typescript34.PropertyAccessChain | typescript34.PropertyAccessExpression | typescript34.ElementAccessExpression;
1473
- propertyAccessExpressions: ({
1474
- expressions
1475
- }: {
1476
- expressions: Array<string | typescript34.Expression | typescript34.MemberName>;
1477
- }) => typescript34.PropertyAccessExpression;
1478
- propertyAssignment: ({
1479
- initializer,
1480
- name
1481
- }: {
1482
- initializer: typescript34.Expression;
1483
- name: string | typescript34.PropertyName;
1484
- }) => typescript34.PropertyAssignment;
1485
- propertyDeclaration: ({
1486
- initializer,
1487
- modifiers,
1488
- name,
1489
- type
1490
- }: {
1491
- initializer?: typescript34.Expression;
1492
- modifiers?: Modifier | ReadonlyArray<Modifier>;
1493
- name: string | typescript34.PropertyName;
1494
- type?: typescript34.TypeNode;
1495
- }) => typescript34.PropertyDeclaration;
1496
- regularExpressionLiteral: ({
1497
- flags,
1498
- text
1499
- }: {
1500
- flags?: ReadonlyArray<"g" | "i" | "m" | "s" | "u" | "y">;
1501
- text: string;
1502
- }) => typescript34.RegularExpressionLiteral;
1503
- returnFunctionCall: ({
1504
- args,
1505
- name,
1506
- types: types_d_exports
1507
- }: {
1508
- args: any[];
1509
- name: string | typescript34.Expression;
1510
- types?: ReadonlyArray<string | typescript34.StringLiteral>;
1511
- }) => typescript34.ReturnStatement;
1512
- returnStatement: ({
1513
- expression
1514
- }: {
1515
- expression?: typescript34.Expression;
1516
- }) => typescript34.ReturnStatement;
1517
- returnVariable: ({
1518
- expression
1519
- }: {
1520
- expression: string | typescript34.Expression;
1521
- }) => typescript34.ReturnStatement;
1522
- safeAccessExpression: (path: string[]) => typescript34.Expression;
1523
- stringLiteral: ({
1524
- isSingleQuote,
1525
- text
1526
- }: {
1527
- isSingleQuote?: boolean;
1528
- text: string;
1529
- }) => typescript34.StringLiteral;
1530
- templateLiteralType: ({
1531
- value
1532
- }: {
1533
- value: ReadonlyArray<string | typescript34.TypeNode>;
1534
- }) => typescript34.TemplateLiteralTypeNode;
1535
- this: () => typescript34.ThisExpression;
1536
- transformArrayMap: ({
1537
- path,
1538
- transformExpression
1539
- }: {
1540
- path: string[];
1541
- transformExpression: typescript34.Expression;
1542
- }) => typescript34.IfStatement;
1543
- transformArrayMutation: ({
1544
- path,
1545
- transformerName
1546
- }: {
1547
- path: string[];
1548
- transformerName: string;
1549
- }) => typescript34.Statement;
1550
- transformDateMutation: ({
1551
- path
1552
- }: {
1553
- path: string[];
1554
- }) => typescript34.Statement;
1555
- transformFunctionMutation: ({
1556
- path,
1557
- transformerName
1558
- }: {
1559
- path: string[];
1560
- transformerName: string;
1561
- }) => typescript34.IfStatement[];
1562
- transformNewDate: ({
1563
- parameterName
1564
- }: {
1565
- parameterName: string;
1566
- }) => typescript34.NewExpression;
1567
- typeAliasDeclaration: ({
1568
- comment,
1569
- exportType,
1570
- name,
1571
- type,
1572
- typeParameters
1573
- }: {
1574
- comment?: Comments;
1575
- exportType?: boolean;
1576
- name: string | typescript34.TypeReferenceNode;
1577
- type: string | typescript34.TypeNode | typescript34.Identifier;
1578
- typeParameters?: FunctionTypeParameter[];
1579
- }) => typescript34.TypeAliasDeclaration;
1580
- typeArrayNode: (types: ReadonlyArray<any | typescript34.TypeNode> | typescript34.TypeNode | typescript34.Identifier | string, isNullable?: boolean) => typescript34.TypeNode;
1581
- typeInterfaceNode: ({
1582
- indexKey,
1583
- indexProperty,
1584
- isNullable,
1585
- properties,
1586
- useLegacyResolution
1587
- }: {
1588
- indexKey?: typescript34.TypeReferenceNode;
1589
- indexProperty?: Property;
1590
- isNullable?: boolean;
1591
- properties: Property[];
1592
- useLegacyResolution: boolean;
1593
- }) => typescript34.TypeNode;
1594
- typeIntersectionNode: ({
1595
- isNullable,
1596
- types: types_d_exports
1597
- }: {
1598
- isNullable?: boolean;
1599
- types: (any | typescript34.TypeNode)[];
1600
- }) => typescript34.TypeNode;
1601
- typeNode: (base: any | typescript34.TypeNode, args?: (any | typescript34.TypeNode)[]) => typescript34.TypeNode;
1602
- typeOfExpression: ({
1603
- text
1604
- }: {
1605
- text: string | typescript34.Identifier;
1606
- }) => typescript34.TypeOfExpression;
1607
- typeOperatorNode: ({
1608
- operator,
1609
- type
1610
- }: {
1611
- operator: "keyof" | "readonly" | "unique";
1612
- type: typescript34.TypeNode;
1613
- }) => typescript34.TypeOperatorNode;
1614
- typeParameterDeclaration: ({
1615
- constraint,
1616
- defaultType,
1617
- modifiers,
1618
- name
1619
- }: {
1620
- constraint?: typescript34.TypeNode;
1621
- defaultType?: typescript34.TypeNode;
1622
- modifiers?: Array<typescript34.Modifier>;
1623
- name: string | typescript34.Identifier;
1624
- }) => typescript34.TypeParameterDeclaration;
1625
- typeParenthesizedNode: ({
1626
- type
1627
- }: {
1628
- type: typescript34.TypeNode;
1629
- }) => typescript34.ParenthesizedTypeNode;
1630
- typeRecordNode: (keys: (any | typescript34.TypeNode)[], values: (any | typescript34.TypeNode)[], isNullable?: boolean, useLegacyResolution?: boolean) => typescript34.TypeNode;
1631
- typeReferenceNode: ({
1632
- typeArguments,
1633
- typeName
1634
- }: {
1635
- typeArguments?: typescript34.TypeNode[];
1636
- typeName: string | typescript34.EntityName;
1637
- }) => typescript34.TypeReferenceNode;
1638
- typeTupleNode: ({
1639
- isNullable,
1640
- types: types_d_exports
1641
- }: {
1642
- isNullable?: boolean;
1643
- types: Array<any | typescript34.TypeNode>;
1644
- }) => typescript34.TypeNode;
1645
- typeUnionNode: ({
1646
- isNullable,
1647
- types: types_d_exports
1648
- }: {
1649
- isNullable?: boolean;
1650
- types: ReadonlyArray<any | typescript34.TypeNode>;
1651
- }) => typescript34.TypeNode;
1652
- valueToExpression: <T = unknown>({
1653
- identifiers,
1654
- isValueAccess,
1655
- shorthand,
1656
- unescape,
1657
- value
1658
- }: {
1659
- identifiers?: string[];
1660
- isValueAccess?: boolean;
1661
- shorthand?: boolean;
1662
- unescape?: boolean;
1663
- value: T;
1664
- }) => typescript34.Expression | undefined;
1665
- };
1666
48
  //#endregion
1667
49
  //#region src/utils/exports.d.ts
1668
50
  declare const utils: {
@@ -1715,5 +97,5 @@ declare module '@hey-api/codegen-core' {
1715
97
  */
1716
98
  declare const defineConfig: <T extends MaybeArray<UserConfig>>(config: LazyOrAsync<T>) => Promise<T>;
1717
99
  //#endregion
1718
- export { $, type Client as AngularClient, ArrayTsDsl, AttrTsDsl, AwaitTsDsl, type Client$1 as AxiosClient, BinaryTsDsl, CallTsDsl, ClassTsDsl, type Client$2 as Client, DecoratorTsDsl, type DefinePlugin, DescribeTsDsl, DollarTsDsl, ExprTsDsl, type ExpressionTransformer, type Client$3 as FetchClient, FieldTsDsl, FuncTsDsl, GetterTsDsl, type IR, IfTsDsl, InitTsDsl, LiteralTsDsl, Logger, MethodTsDsl, NewTsDsl, NewlineTsDsl, type Client$4 as NextClient, NotTsDsl, type Client$5 as NuxtClient, ObjectTsDsl, type Client$6 as OfetchClient, type OpenApi, type OpenApiMetaObject, type OpenApiOperationObject, type OpenApiParameterObject, type OpenApiRequestBodyObject, type OpenApiResponseObject, type OpenApiSchemaObject, ParamTsDsl, PatternTsDsl, type Plugin, RegExpTsDsl, ReturnTsDsl, SetterTsDsl, TemplateTsDsl, ThrowTsDsl, TsDsl, TypeAliasTsDsl, TypeAttrTsDsl, TypeExprTsDsl, TypeLiteralTsDsl, TypeObjectTsDsl, type TypeTransformer, type UserConfig, VarTsDsl, clientDefaultConfig, clientDefaultMeta, clientPluginHandler, compiler, createClient, defaultPaginationKeywords, defaultPlugins, defineConfig, definePluginConfig, tsc, utils };
100
+ export { $, type Client as AngularClient, type Client$1 as AxiosClient, type Client$2 as Client, type DefinePlugin, DollarTsDsl, type ExpressionTransformer, type Client$3 as FetchClient, type IR, Logger, MaybeTsDsl, type Client$4 as NextClient, type Client$5 as NuxtClient, type Client$6 as OfetchClient, type OpenApi, type OpenApiMetaObject, type OpenApiOperationObject, type OpenApiParameterObject, type OpenApiRequestBodyObject, type OpenApiResponseObject, type OpenApiSchemaObject, type Plugin, TsDsl, type TypeTransformer, TypeTsDsl, type UserConfig, clientDefaultConfig, clientDefaultMeta, clientPluginHandler, createClient, defaultPaginationKeywords, defaultPlugins, defineConfig, definePluginConfig, utils };
1719
101
  //# sourceMappingURL=index.d.ts.map