@hey-api/openapi-ts 0.94.2 → 0.94.3
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/clients/nuxt/utils.ts +6 -1
- package/dist/index.d.mts +177 -76
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{init-C6327prb.mjs → init-OaZZcRie.mjs} +44 -30
- package/dist/init-OaZZcRie.mjs.map +1 -0
- package/dist/internal.d.mts +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/run.mjs +3 -3
- package/dist/{src-CdNoenvJ.mjs → src-CwAmA-wp.mjs} +5 -6
- package/dist/src-CwAmA-wp.mjs.map +1 -0
- package/dist/{types-CR-cSsLu.d.mts → types-DAEl4_a4.d.mts} +5 -12
- package/dist/types-DAEl4_a4.d.mts.map +1 -0
- package/package.json +3 -3
- package/dist/init-C6327prb.mjs.map +0 -1
- package/dist/src-CdNoenvJ.mjs.map +0 -1
- package/dist/types-CR-cSsLu.d.mts.map +0 -1
|
@@ -344,7 +344,12 @@ export const unwrapRefs = <T>(value: T): UnwrapRefs<T> => {
|
|
|
344
344
|
return (isRef(value) ? unref(value) : value) as UnwrapRefs<T>;
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
if (
|
|
347
|
+
if (
|
|
348
|
+
value instanceof Blob ||
|
|
349
|
+
value instanceof FormData ||
|
|
350
|
+
value instanceof ReadableStream ||
|
|
351
|
+
value instanceof AbortSignal
|
|
352
|
+
) {
|
|
348
353
|
return value as UnwrapRefs<T>;
|
|
349
354
|
}
|
|
350
355
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as UserConfig } from "./types-
|
|
1
|
+
import { n as UserConfig } from "./types-DAEl4_a4.mjs";
|
|
2
2
|
import { AnalysisContext, BindingKind, ExportModule, File, FromRef, ImportModule, Language, Logger, Node, NodeName as NodeName$1, NodeNameSanitizer, NodeRelationship, NodeScope, Ref, RenderContext, Renderer, Symbol } from "@hey-api/codegen-core";
|
|
3
|
-
import { Casing, Context, DefinePlugin, DefinePlugin as DefinePlugin$1, FeatureToggle, IR, IR as IR$1, LinguistLanguages, NameTransformer, NamingConfig, NamingOptions, NamingRule, OpenApi, OpenApiMetaObject, OpenApiOperationObject, OpenApiParameterObject, OpenApiRequestBodyObject, OpenApiResponseObject, OpenApiSchemaObject, OpenApiV2_0_XTypes, OpenApiV3_0_XTypes, OpenApiV3_1_XTypes, OperationPath, OperationPathStrategy, OperationStrategy, OperationsStrategy, Plugin, Plugin as Plugin$1, SchemaVisitorContext, SchemaWithType, Walker, defaultPaginationKeywords, definePluginConfig, utils } from "@hey-api/shared";
|
|
3
|
+
import { BaseOutput, Casing, Context, DefinePlugin, DefinePlugin as DefinePlugin$1, FeatureToggle, IR, IR as IR$1, LinguistLanguages, NameTransformer, NamingConfig, NamingOptions, NamingRule, OpenApi, OpenApiMetaObject, OpenApiOperationObject, OpenApiParameterObject, OpenApiRequestBodyObject, OpenApiResponseObject, OpenApiSchemaObject, OpenApiV2_0_XTypes, OpenApiV3_0_XTypes, OpenApiV3_1_XTypes, OperationPath, OperationPathStrategy, OperationStrategy, OperationsStrategy, Plugin, Plugin as Plugin$1, SchemaVisitorContext, SchemaWithType, Walker, defaultPaginationKeywords, definePluginConfig, utils } from "@hey-api/shared";
|
|
4
4
|
import ts from "typescript";
|
|
5
5
|
import { AnyString, LazyOrAsync, MaybeArray, MaybeFunc } from "@hey-api/types";
|
|
6
6
|
import { HttpClient, HttpErrorResponse, HttpHeaders, HttpRequest, HttpResponse } from "@angular/common/http";
|
|
@@ -978,16 +978,73 @@ declare class LazyTsDsl<T extends ts.Node = ts.Node> extends TsDsl<T> {
|
|
|
978
978
|
toAst(): T;
|
|
979
979
|
}
|
|
980
980
|
//#endregion
|
|
981
|
-
//#region src/ts-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
981
|
+
//#region src/ts-compiler/nodes/kinds.d.ts
|
|
982
|
+
declare enum TsNodeKind {
|
|
983
|
+
Assignment = "Assignment",
|
|
984
|
+
Identifier = "Identifier",
|
|
985
|
+
Literal = "Literal",
|
|
986
|
+
SourceFile = "SourceFile",
|
|
987
|
+
VariableStatement = "VariableStatement"
|
|
988
|
+
}
|
|
989
|
+
//#endregion
|
|
990
|
+
//#region src/ts-compiler/nodes/expressions/identifier.d.ts
|
|
991
|
+
interface TsIdentifier extends TsNodeBase {
|
|
992
|
+
kind: TsNodeKind.Identifier;
|
|
993
|
+
text: string;
|
|
994
|
+
}
|
|
995
|
+
declare function createIdentifier(text: string, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): TsIdentifier;
|
|
996
|
+
//#endregion
|
|
997
|
+
//#region src/ts-compiler/nodes/expression.d.ts
|
|
998
|
+
type TsExpression = TsIdentifier | TsLiteral;
|
|
999
|
+
//#endregion
|
|
1000
|
+
//#region src/ts-compiler/nodes/statements/assignment.d.ts
|
|
1001
|
+
interface TsAssignment extends TsNodeBase {
|
|
1002
|
+
kind: TsNodeKind.Assignment;
|
|
1003
|
+
target: TsExpression;
|
|
1004
|
+
type?: TsExpression;
|
|
1005
|
+
value?: TsExpression;
|
|
1006
|
+
}
|
|
1007
|
+
declare function createAssignment(target: TsExpression, type?: TsExpression, value?: TsExpression, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): TsAssignment;
|
|
1008
|
+
//#endregion
|
|
1009
|
+
//#region src/ts-compiler/nodes/type.d.ts
|
|
1010
|
+
type TsType = never;
|
|
1011
|
+
//#endregion
|
|
1012
|
+
//#region src/ts-compiler/nodes/statements/var.d.ts
|
|
1013
|
+
type TsVariableKeyword = 'var' | 'let' | 'const';
|
|
1014
|
+
interface TsVariableStatement extends TsNodeBase {
|
|
1015
|
+
initializer?: TsExpression;
|
|
1016
|
+
keyword: TsVariableKeyword;
|
|
1017
|
+
kind: TsNodeKind.VariableStatement;
|
|
1018
|
+
name: string;
|
|
1019
|
+
typeAnnotation?: TsType;
|
|
990
1020
|
}
|
|
1021
|
+
declare function createVariableStatement(keyword: TsVariableKeyword, name: string, initializer?: TsExpression, typeAnnotation?: TsType, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): TsVariableStatement;
|
|
1022
|
+
//#endregion
|
|
1023
|
+
//#region src/ts-compiler/nodes/statement.d.ts
|
|
1024
|
+
type TsStatement = TsAssignment | TsVariableStatement;
|
|
1025
|
+
//#endregion
|
|
1026
|
+
//#region src/ts-compiler/nodes/structure/sourceFile.d.ts
|
|
1027
|
+
interface TsSourceFile extends TsNodeBase {
|
|
1028
|
+
kind: TsNodeKind.SourceFile;
|
|
1029
|
+
statements: ReadonlyArray<TsNode>;
|
|
1030
|
+
}
|
|
1031
|
+
declare function createSourceFile(statements: ReadonlyArray<TsNode>, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): TsSourceFile;
|
|
1032
|
+
//#endregion
|
|
1033
|
+
//#region src/ts-compiler/nodes/base.d.ts
|
|
1034
|
+
interface TsNodeBase {
|
|
1035
|
+
kind: TsNodeKind;
|
|
1036
|
+
leadingComments?: ReadonlyArray<string>;
|
|
1037
|
+
trailingComments?: ReadonlyArray<string>;
|
|
1038
|
+
}
|
|
1039
|
+
type TsNode = TsExpression | TsSourceFile | TsStatement;
|
|
1040
|
+
//#endregion
|
|
1041
|
+
//#region src/ts-compiler/nodes/expressions/literal.d.ts
|
|
1042
|
+
type TsLiteralValue = string | number | boolean | bigint | null;
|
|
1043
|
+
interface TsLiteral extends TsNodeBase {
|
|
1044
|
+
kind: TsNodeKind.Literal;
|
|
1045
|
+
value: TsLiteralValue;
|
|
1046
|
+
}
|
|
1047
|
+
declare function createLiteral(value: TsLiteralValue, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): TsLiteral;
|
|
991
1048
|
//#endregion
|
|
992
1049
|
//#region src/ts-dsl/layout/note.d.ts
|
|
993
1050
|
type NoteMaybeLazy<T> = ((ctx: TsDslContext) => T) | T;
|
|
@@ -1035,8 +1092,8 @@ interface DecoratorMethods extends Node {
|
|
|
1035
1092
|
type ParamName = NodeName$1 | ParamFn;
|
|
1036
1093
|
type ParamFn = (p: ParamTsDsl) => void;
|
|
1037
1094
|
type ParamCtor = (name: ParamName, fn?: ParamFn) => ParamTsDsl;
|
|
1038
|
-
declare const Mixed$
|
|
1039
|
-
declare class ParamTsDsl extends Mixed$
|
|
1095
|
+
declare const Mixed$38: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ParameterDeclaration>, ValueMethods>, PatternMethods>, OptionalMethods>, DecoratorMethods>;
|
|
1096
|
+
declare class ParamTsDsl extends Mixed$38 {
|
|
1040
1097
|
readonly '~dsl' = "ParamTsDsl";
|
|
1041
1098
|
protected _type?: TypeTsDsl;
|
|
1042
1099
|
constructor(name: ParamName, fn?: ParamFn);
|
|
@@ -1052,8 +1109,8 @@ declare class ParamTsDsl extends Mixed$37 {
|
|
|
1052
1109
|
//#endregion
|
|
1053
1110
|
//#region src/ts-dsl/type/param.d.ts
|
|
1054
1111
|
type TypeParamExpr = NodeName$1 | boolean | MaybeTsDsl<TypeTsDsl>;
|
|
1055
|
-
declare const Mixed$
|
|
1056
|
-
declare class TypeParamTsDsl extends Mixed$
|
|
1112
|
+
declare const Mixed$37: abstract new () => TsDsl<ts.TypeParameterDeclaration>;
|
|
1113
|
+
declare class TypeParamTsDsl extends Mixed$37 {
|
|
1057
1114
|
readonly '~dsl' = "TypeParamTsDsl";
|
|
1058
1115
|
scope: NodeScope;
|
|
1059
1116
|
protected constraint?: Ref<TypeParamExpr>;
|
|
@@ -1187,8 +1244,8 @@ interface DocMethods extends Node {
|
|
|
1187
1244
|
//#endregion
|
|
1188
1245
|
//#region src/ts-dsl/decl/field.d.ts
|
|
1189
1246
|
type FieldType = NodeName$1 | TypeTsDsl;
|
|
1190
|
-
declare const Mixed$
|
|
1191
|
-
declare class FieldTsDsl extends Mixed$
|
|
1247
|
+
declare const Mixed$36: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyDeclaration>, ValueMethods>, StaticMethods>, ReadonlyMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, OptionalMethods>, DocMethods>, DecoratorMethods>;
|
|
1248
|
+
declare class FieldTsDsl extends Mixed$36 {
|
|
1192
1249
|
readonly '~dsl' = "FieldTsDsl";
|
|
1193
1250
|
readonly nameSanitizer: (name: string) => string;
|
|
1194
1251
|
protected _type?: TypeTsDsl;
|
|
@@ -1210,8 +1267,8 @@ interface ParamMethods extends Node {
|
|
|
1210
1267
|
}
|
|
1211
1268
|
//#endregion
|
|
1212
1269
|
//#region src/ts-dsl/decl/init.d.ts
|
|
1213
|
-
declare const Mixed$
|
|
1214
|
-
declare class InitTsDsl extends Mixed$
|
|
1270
|
+
declare const Mixed$35: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ConstructorDeclaration>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>;
|
|
1271
|
+
declare class InitTsDsl extends Mixed$35 {
|
|
1215
1272
|
readonly '~dsl' = "InitTsDsl";
|
|
1216
1273
|
constructor(fn?: (i: InitTsDsl) => void);
|
|
1217
1274
|
analyze(ctx: AnalysisContext): void;
|
|
@@ -1227,8 +1284,8 @@ interface TypeReturnsMethods extends Node {
|
|
|
1227
1284
|
}
|
|
1228
1285
|
//#endregion
|
|
1229
1286
|
//#region src/ts-dsl/decl/method.d.ts
|
|
1230
|
-
declare const Mixed$
|
|
1231
|
-
declare class MethodTsDsl extends Mixed$
|
|
1287
|
+
declare const Mixed$34: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.MethodDeclaration>, TypeReturnsMethods>, TypeParamsMethods>, StaticMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, OptionalMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AbstractMethods>;
|
|
1288
|
+
declare class MethodTsDsl extends Mixed$34 {
|
|
1232
1289
|
readonly '~dsl' = "MethodTsDsl";
|
|
1233
1290
|
readonly nameSanitizer: (name: string) => string;
|
|
1234
1291
|
constructor(name: NodeName$1, fn?: (m: MethodTsDsl) => void);
|
|
@@ -1238,8 +1295,8 @@ declare class MethodTsDsl extends Mixed$33 {
|
|
|
1238
1295
|
//#endregion
|
|
1239
1296
|
//#region src/ts-dsl/decl/class.d.ts
|
|
1240
1297
|
type Body = Array<MaybeTsDsl<ts.ClassElement | ts.Node>>;
|
|
1241
|
-
declare const Mixed$
|
|
1242
|
-
declare class ClassTsDsl extends Mixed$
|
|
1298
|
+
declare const Mixed$33: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ClassDeclaration>, TypeParamsMethods>, ExportMethods>, DocMethods>, DefaultMethods>, DecoratorMethods>, AbstractMethods>;
|
|
1299
|
+
declare class ClassTsDsl extends Mixed$33 {
|
|
1243
1300
|
readonly '~dsl' = "ClassTsDsl";
|
|
1244
1301
|
readonly nameSanitizer: (name: string) => string;
|
|
1245
1302
|
protected baseClass?: Ref<NodeName$1>;
|
|
@@ -1266,8 +1323,8 @@ declare class ClassTsDsl extends Mixed$32 {
|
|
|
1266
1323
|
}
|
|
1267
1324
|
//#endregion
|
|
1268
1325
|
//#region src/ts-dsl/decl/decorator.d.ts
|
|
1269
|
-
declare const Mixed$
|
|
1270
|
-
declare class DecoratorTsDsl extends Mixed$
|
|
1326
|
+
declare const Mixed$32: MixinCtor<abstract new () => TsDsl<ts.Decorator>, ArgsMethods>;
|
|
1327
|
+
declare class DecoratorTsDsl extends Mixed$32 {
|
|
1271
1328
|
readonly '~dsl' = "DecoratorTsDsl";
|
|
1272
1329
|
readonly nameSanitizer: (name: string) => string;
|
|
1273
1330
|
constructor(name: NodeName$1, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>);
|
|
@@ -1278,8 +1335,8 @@ declare class DecoratorTsDsl extends Mixed$31 {
|
|
|
1278
1335
|
//#region src/ts-dsl/decl/member.d.ts
|
|
1279
1336
|
type Value$2 = string | number | MaybeTsDsl<ts.Expression>;
|
|
1280
1337
|
type ValueFn$1 = Value$2 | ((m: EnumMemberTsDsl) => void);
|
|
1281
|
-
declare const Mixed$
|
|
1282
|
-
declare class EnumMemberTsDsl extends Mixed$
|
|
1338
|
+
declare const Mixed$31: MixinCtor<abstract new () => TsDsl<ts.EnumMember>, DocMethods>;
|
|
1339
|
+
declare class EnumMemberTsDsl extends Mixed$31 {
|
|
1283
1340
|
readonly '~dsl' = "EnumMemberTsDsl";
|
|
1284
1341
|
private _value?;
|
|
1285
1342
|
constructor(name: NodeName$1, value?: ValueFn$1);
|
|
@@ -1292,8 +1349,8 @@ declare class EnumMemberTsDsl extends Mixed$30 {
|
|
|
1292
1349
|
//#region src/ts-dsl/decl/enum.d.ts
|
|
1293
1350
|
type Value$1 = string | number | MaybeTsDsl<ts.Expression>;
|
|
1294
1351
|
type ValueFn = Value$1 | ((m: EnumMemberTsDsl) => void);
|
|
1295
|
-
declare const Mixed$
|
|
1296
|
-
declare class EnumTsDsl extends Mixed$
|
|
1352
|
+
declare const Mixed$30: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.EnumDeclaration>, ExportMethods>, DocMethods>, ConstMethods>;
|
|
1353
|
+
declare class EnumTsDsl extends Mixed$30 {
|
|
1297
1354
|
readonly '~dsl' = "EnumTsDsl";
|
|
1298
1355
|
readonly nameSanitizer: (name: string) => string;
|
|
1299
1356
|
private _members;
|
|
@@ -1308,8 +1365,8 @@ declare class EnumTsDsl extends Mixed$29 {
|
|
|
1308
1365
|
//#endregion
|
|
1309
1366
|
//#region src/ts-dsl/decl/func.d.ts
|
|
1310
1367
|
type FuncMode = 'arrow' | 'decl' | 'expr';
|
|
1311
|
-
declare const Mixed$
|
|
1312
|
-
declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$
|
|
1368
|
+
declare const Mixed$29: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ArrowFunction>, TypeReturnsMethods>, TypeParamsMethods>, StaticMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AsMethods>, AbstractMethods>;
|
|
1369
|
+
declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$29 {
|
|
1313
1370
|
readonly '~dsl' = "FuncTsDsl";
|
|
1314
1371
|
readonly nameSanitizer: (name: string) => string;
|
|
1315
1372
|
protected mode?: FuncMode;
|
|
@@ -1339,8 +1396,8 @@ declare const FuncTsDsl: {
|
|
|
1339
1396
|
type FuncTsDsl<M extends FuncMode = 'arrow'> = ImplFuncTsDsl<M>;
|
|
1340
1397
|
//#endregion
|
|
1341
1398
|
//#region src/ts-dsl/decl/getter.d.ts
|
|
1342
|
-
declare const Mixed$
|
|
1343
|
-
declare class GetterTsDsl extends Mixed$
|
|
1399
|
+
declare const Mixed$28: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.GetAccessorDeclaration>, TypeReturnsMethods>, StaticMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AbstractMethods>;
|
|
1400
|
+
declare class GetterTsDsl extends Mixed$28 {
|
|
1344
1401
|
readonly '~dsl' = "GetterTsDsl";
|
|
1345
1402
|
readonly nameSanitizer: (name: string) => string;
|
|
1346
1403
|
constructor(name: NodeName$1, fn?: (g: GetterTsDsl) => void);
|
|
@@ -1349,11 +1406,11 @@ declare class GetterTsDsl extends Mixed$27 {
|
|
|
1349
1406
|
}
|
|
1350
1407
|
//#endregion
|
|
1351
1408
|
//#region src/ts-dsl/decl/pattern.d.ts
|
|
1352
|
-
declare const Mixed$
|
|
1409
|
+
declare const Mixed$27: abstract new () => TsDsl<ts.BindingName>;
|
|
1353
1410
|
/**
|
|
1354
1411
|
* Builds binding patterns (e.g. `{ foo, bar }`, `[a, b, ...rest]`).
|
|
1355
1412
|
*/
|
|
1356
|
-
declare class PatternTsDsl extends Mixed$
|
|
1413
|
+
declare class PatternTsDsl extends Mixed$27 {
|
|
1357
1414
|
readonly '~dsl' = "PatternTsDsl";
|
|
1358
1415
|
protected pattern?: {
|
|
1359
1416
|
kind: 'array';
|
|
@@ -1387,8 +1444,8 @@ declare class PatternTsDsl extends Mixed$26 {
|
|
|
1387
1444
|
}
|
|
1388
1445
|
//#endregion
|
|
1389
1446
|
//#region src/ts-dsl/decl/setter.d.ts
|
|
1390
|
-
declare const Mixed$
|
|
1391
|
-
declare class SetterTsDsl extends Mixed$
|
|
1447
|
+
declare const Mixed$26: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.SetAccessorDeclaration>, StaticMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AbstractMethods>;
|
|
1448
|
+
declare class SetterTsDsl extends Mixed$26 {
|
|
1392
1449
|
readonly '~dsl' = "SetterTsDsl";
|
|
1393
1450
|
readonly nameSanitizer: (name: string) => string;
|
|
1394
1451
|
constructor(name: NodeName$1, fn?: (s: SetterTsDsl) => void);
|
|
@@ -1409,8 +1466,8 @@ interface LayoutMethods extends Node {
|
|
|
1409
1466
|
}
|
|
1410
1467
|
//#endregion
|
|
1411
1468
|
//#region src/ts-dsl/expr/array.d.ts
|
|
1412
|
-
declare const Mixed$
|
|
1413
|
-
declare class ArrayTsDsl extends Mixed$
|
|
1469
|
+
declare const Mixed$25: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ArrayLiteralExpression>, LayoutMethods>, AsMethods>;
|
|
1470
|
+
declare class ArrayTsDsl extends Mixed$25 {
|
|
1414
1471
|
readonly '~dsl' = "ArrayTsDsl";
|
|
1415
1472
|
protected _elements: Array<{
|
|
1416
1473
|
expr: MaybeTsDsl<ts.Expression>;
|
|
@@ -1432,8 +1489,8 @@ declare class ArrayTsDsl extends Mixed$24 {
|
|
|
1432
1489
|
//#endregion
|
|
1433
1490
|
//#region src/ts-dsl/expr/expr.d.ts
|
|
1434
1491
|
type Id = NodeName$1 | MaybeTsDsl<ts.Expression>;
|
|
1435
|
-
declare const Mixed$
|
|
1436
|
-
declare class ExprTsDsl extends Mixed$
|
|
1492
|
+
declare const Mixed$24: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Expression>, TypeExprMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
|
|
1493
|
+
declare class ExprTsDsl extends Mixed$24 {
|
|
1437
1494
|
readonly '~dsl' = "ExprTsDsl";
|
|
1438
1495
|
protected _exprInput: Ref<Id>;
|
|
1439
1496
|
constructor(id: Id);
|
|
@@ -1442,14 +1499,73 @@ declare class ExprTsDsl extends Mixed$23 {
|
|
|
1442
1499
|
}
|
|
1443
1500
|
//#endregion
|
|
1444
1501
|
//#region src/ts-dsl/expr/id.d.ts
|
|
1445
|
-
declare const Mixed$
|
|
1446
|
-
declare class IdTsDsl extends Mixed$
|
|
1502
|
+
declare const Mixed$23: abstract new () => TsDsl<ts.Identifier>;
|
|
1503
|
+
declare class IdTsDsl extends Mixed$23 {
|
|
1447
1504
|
readonly '~dsl' = "IdTsDsl";
|
|
1448
1505
|
constructor(name: string);
|
|
1449
1506
|
analyze(ctx: AnalysisContext): void;
|
|
1450
1507
|
toAst(): ts.Identifier;
|
|
1451
1508
|
}
|
|
1452
1509
|
//#endregion
|
|
1510
|
+
//#region src/ts-compiler/printer.d.ts
|
|
1511
|
+
interface TsPrinterOptions {
|
|
1512
|
+
/**
|
|
1513
|
+
* Number of spaces per indentation level.
|
|
1514
|
+
*
|
|
1515
|
+
* @default 2
|
|
1516
|
+
*/
|
|
1517
|
+
indentSize?: number;
|
|
1518
|
+
/**
|
|
1519
|
+
* Whether to add trailing semicolons to statements.
|
|
1520
|
+
*
|
|
1521
|
+
* @default true
|
|
1522
|
+
*/
|
|
1523
|
+
semicolons?: boolean;
|
|
1524
|
+
}
|
|
1525
|
+
declare function createPrinter(options?: TsPrinterOptions): {
|
|
1526
|
+
printFile: (node: TsNode) => string;
|
|
1527
|
+
};
|
|
1528
|
+
declare function printAst(node: TsNode): string;
|
|
1529
|
+
//#endregion
|
|
1530
|
+
//#region src/ts-compiler/index.d.ts
|
|
1531
|
+
declare namespace ts$1 {
|
|
1532
|
+
type Node = TsNode;
|
|
1533
|
+
type NodeBase = TsNodeBase;
|
|
1534
|
+
type NodeKind = TsNodeKind;
|
|
1535
|
+
type Expression = TsExpression;
|
|
1536
|
+
type Statement = TsStatement;
|
|
1537
|
+
type Type = TsType;
|
|
1538
|
+
type SourceFile = TsSourceFile;
|
|
1539
|
+
type Assignment = TsAssignment;
|
|
1540
|
+
type VariableStatement = TsVariableStatement;
|
|
1541
|
+
type Identifier = TsIdentifier;
|
|
1542
|
+
type Literal = TsLiteral;
|
|
1543
|
+
type PrinterOptions = TsPrinterOptions;
|
|
1544
|
+
type LiteralValue = TsLiteralValue;
|
|
1545
|
+
}
|
|
1546
|
+
declare const ts$1: {
|
|
1547
|
+
readonly TsNodeKind: typeof TsNodeKind;
|
|
1548
|
+
readonly createPrinter: typeof createPrinter;
|
|
1549
|
+
readonly factory: {
|
|
1550
|
+
createAssignment: typeof createAssignment;
|
|
1551
|
+
createIdentifier: typeof createIdentifier;
|
|
1552
|
+
createLiteral: typeof createLiteral;
|
|
1553
|
+
createSourceFile: typeof createSourceFile;
|
|
1554
|
+
createVariableStatement: typeof createVariableStatement;
|
|
1555
|
+
};
|
|
1556
|
+
readonly printAst: typeof printAst;
|
|
1557
|
+
};
|
|
1558
|
+
//#endregion
|
|
1559
|
+
//#region src/ts-dsl/expr/literal.d.ts
|
|
1560
|
+
declare const Mixed$22: MixinCtor<abstract new () => TsDsl<ts.BigIntLiteral | ts.BooleanLiteral | ts.NullLiteral | ts.NumericLiteral | ts.PrefixUnaryExpression | ts.StringLiteral>, AsMethods>;
|
|
1561
|
+
declare class LiteralTsDsl extends Mixed$22 {
|
|
1562
|
+
readonly '~dsl' = "LiteralTsDsl";
|
|
1563
|
+
protected value: ts$1.LiteralValue;
|
|
1564
|
+
constructor(value: ts$1.LiteralValue);
|
|
1565
|
+
analyze(ctx: AnalysisContext): void;
|
|
1566
|
+
toAst(): any;
|
|
1567
|
+
}
|
|
1568
|
+
//#endregion
|
|
1453
1569
|
//#region src/ts-dsl/mixins/hint.d.ts
|
|
1454
1570
|
interface HintMethods extends Node {
|
|
1455
1571
|
$hint<T extends ts.Node>(node: T): T;
|
|
@@ -1764,8 +1880,8 @@ declare const Mixed$7: abstract new () => TsDsl<ts.LiteralTypeNode>;
|
|
|
1764
1880
|
declare class TypeLiteralTsDsl extends Mixed$7 {
|
|
1765
1881
|
readonly '~dsl' = "TypeLiteralTsDsl";
|
|
1766
1882
|
scope: NodeScope;
|
|
1767
|
-
protected value: LiteralValue;
|
|
1768
|
-
constructor(value: LiteralValue);
|
|
1883
|
+
protected value: ts$1.LiteralValue;
|
|
1884
|
+
constructor(value: ts$1.LiteralValue);
|
|
1769
1885
|
analyze(ctx: AnalysisContext): void;
|
|
1770
1886
|
toAst(): ts.LiteralTypeNode;
|
|
1771
1887
|
}
|
|
@@ -1966,28 +2082,20 @@ declare class TypeScriptRenderer implements Renderer {
|
|
|
1966
2082
|
*/
|
|
1967
2083
|
private _header?;
|
|
1968
2084
|
/**
|
|
1969
|
-
*
|
|
2085
|
+
* Options for module specifier resolution.
|
|
1970
2086
|
*
|
|
1971
2087
|
* @private
|
|
1972
2088
|
*/
|
|
1973
|
-
private
|
|
1974
|
-
/**
|
|
1975
|
-
* Controls whether imports/exports include a file extension (e.g., '.ts' or '.js').
|
|
1976
|
-
*
|
|
1977
|
-
* @private
|
|
1978
|
-
*/
|
|
1979
|
-
private _preferFileExtension;
|
|
2089
|
+
private _module?;
|
|
1980
2090
|
/**
|
|
1981
|
-
*
|
|
2091
|
+
* Whether `export * from 'module'` should be used when possible instead of named exports.
|
|
1982
2092
|
*
|
|
1983
2093
|
* @private
|
|
1984
2094
|
*/
|
|
1985
|
-
private
|
|
1986
|
-
constructor(args?: {
|
|
2095
|
+
private _preferExportAll;
|
|
2096
|
+
constructor(args?: Pick<Partial<BaseOutput>, 'module'> & {
|
|
1987
2097
|
header?: HeaderArg;
|
|
1988
2098
|
preferExportAll?: boolean;
|
|
1989
|
-
preferFileExtension?: string;
|
|
1990
|
-
resolveModuleName?: (moduleName: string) => string | undefined;
|
|
1991
2099
|
});
|
|
1992
2100
|
render(ctx: RenderContext<TsDsl>): string;
|
|
1993
2101
|
supports(ctx: RenderContext): boolean;
|
|
@@ -2076,7 +2184,7 @@ declare const $: ((id: any) => ExprTsDsl) & {
|
|
|
2076
2184
|
init: (fn?: ((i: InitTsDsl) => void) | undefined) => InitTsDsl; /** Creates a lazy, context-aware node with deferred evaluation. */
|
|
2077
2185
|
lazy: <T extends ts.Node>(thunk: LazyThunk<T>) => LazyTsDsl<T>; /** Creates a let variable declaration (`let`). */
|
|
2078
2186
|
let: (name?: any) => VarTsDsl; /** Creates a literal value (e.g. string, number, boolean). */
|
|
2079
|
-
literal: (value:
|
|
2187
|
+
literal: (value: TsLiteralValue) => LiteralTsDsl; /** Creates an enum member declaration. */
|
|
2080
2188
|
member: (name: NodeName, value?: ((string | number | ts.Expression | TsDsl<ts.Expression>) | ((m: EnumMemberTsDsl) => void)) | undefined) => EnumMemberTsDsl; /** Creates a method declaration inside a class or object. */
|
|
2081
2189
|
method: (name: NodeName, fn?: ((m: MethodTsDsl) => void) | undefined) => MethodTsDsl; /** Creates a negation expression (`-x`). */
|
|
2082
2190
|
neg: (expr?: string | ts.Expression | TsDsl<ts.Expression> | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl; /** Creates a new expression (e.g. `new ClassName()`). */
|
|
@@ -2121,7 +2229,7 @@ declare const $: ((id: any) => ExprTsDsl) & {
|
|
|
2121
2229
|
fromValue: (input: unknown) => TsDsl<ts.TypeNode>; /** Creates a function type node (e.g. `(a: string) => number`). */
|
|
2122
2230
|
func: (...args: ConstructorParameters<typeof TypeFuncTsDsl>) => TypeFuncTsDsl; /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
|
|
2123
2231
|
idx: (base: string | ts.TypeNode | TsDsl<ts.TypeNode>, index: string | number | ts.TypeNode | TsDsl<ts.TypeNode>) => TypeIdxTsDsl; /** Creates a literal type node (e.g. 'foo', 42, or true). */
|
|
2124
|
-
literal: (value:
|
|
2232
|
+
literal: (value: TsLiteralValue) => TypeLiteralTsDsl; /** Creates a mapped type (e.g. `{ [K in keyof T]: U }`). */
|
|
2125
2233
|
mapped: (name?: any) => TypeMappedTsDsl; /** Creates a type literal node (e.g. { foo: string }). */
|
|
2126
2234
|
object: () => TypeObjectTsDsl; /** Creates a type operator node (e.g. `readonly T`, `keyof T`, `unique T`). */
|
|
2127
2235
|
operator: () => TypeOperatorTsDsl; /** Represents a union type (e.g. `A | B | C`). */
|
|
@@ -3963,27 +4071,20 @@ type Config$13 = Plugin$1.Name<'@hey-api/sdk'> & Plugin$1.Hooks & Plugin$1.Comme
|
|
|
3963
4071
|
};
|
|
3964
4072
|
type HeyApiSdkPlugin = DefinePlugin$1<UserConfig$16, Config$13>;
|
|
3965
4073
|
//#endregion
|
|
3966
|
-
//#region src/plugins/@hey-api/transformers/expressions.d.ts
|
|
3967
|
-
type ExpressionTransformer = ({
|
|
3968
|
-
config,
|
|
3969
|
-
dataExpression,
|
|
3970
|
-
schema
|
|
3971
|
-
}: {
|
|
3972
|
-
config: Omit<UserConfig$15, 'name'>;
|
|
3973
|
-
dataExpression?: ts.Expression | ReturnType<typeof $.expr | typeof $.attr> | string;
|
|
3974
|
-
schema: IR$1.SchemaObject;
|
|
3975
|
-
}) => Array<ReturnType<typeof $.fromValue>> | undefined;
|
|
3976
|
-
//#endregion
|
|
3977
4074
|
//#region src/plugins/@hey-api/transformers/types.d.ts
|
|
4075
|
+
interface BaseTransformer extends DollarTsDsl {
|
|
4076
|
+
plugin: HeyApiTransformersPlugin['Instance'];
|
|
4077
|
+
schema: IR$1.SchemaObject;
|
|
4078
|
+
}
|
|
4079
|
+
type ExpressionTransformer = (ctx: BaseTransformer & {
|
|
4080
|
+
/** @deprecated Use `plugin` instead and access the config via `plugin.config` */config: Omit<UserConfig$15, 'name'>;
|
|
4081
|
+
dataExpression?: ts.Expression | ReturnType<typeof $.attr | typeof $.expr> | string;
|
|
4082
|
+
}) => Array<TsDsl<ts.Expression>> | undefined;
|
|
3978
4083
|
/**
|
|
3979
4084
|
* Returns the TypeScript type node for a schema with a specific format.
|
|
3980
4085
|
* If undefined is returned, the default type will be used.
|
|
3981
4086
|
*/
|
|
3982
|
-
type TypeTransformer = (
|
|
3983
|
-
schema
|
|
3984
|
-
}: {
|
|
3985
|
-
schema: IR$1.SchemaObject;
|
|
3986
|
-
}) => ts.TypeNode | undefined;
|
|
4087
|
+
type TypeTransformer = (ctx: BaseTransformer) => MaybeTsDsl<ts.TypeNode> | undefined;
|
|
3987
4088
|
type UserConfig$15 = Plugin$1.Name<'@hey-api/transformers'> & Plugin$1.Hooks & Plugin$1.UserExports & {
|
|
3988
4089
|
/**
|
|
3989
4090
|
* Convert long integers into BigInt values?
|