@hey-api/openapi-ts 0.98.0 → 0.98.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 +12 -0
- package/dist/clients/angular/client.ts +1 -1
- package/dist/clients/angular/index.ts +1 -0
- package/dist/clients/axios/index.ts +1 -0
- package/dist/clients/core/types.ts +6 -0
- package/dist/clients/fetch/index.ts +1 -0
- package/dist/clients/ky/index.ts +1 -0
- package/dist/clients/next/index.ts +1 -0
- package/dist/clients/nuxt/index.ts +1 -0
- package/dist/clients/ofetch/index.ts +1 -0
- package/dist/index.d.mts +177 -141
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{init-BENFi6V7.mjs → init-6HtXdMiq.mjs} +224 -150
- package/dist/init-6HtXdMiq.mjs.map +1 -0
- package/dist/internal.mjs +1 -1
- package/dist/run.mjs +2 -2
- package/dist/run.mjs.map +1 -1
- package/dist/{src-BXIUXBF6.mjs → src-CY0O0cwg.mjs} +6 -6
- package/dist/src-CY0O0cwg.mjs.map +1 -0
- package/package.json +5 -6
- package/dist/init-BENFi6V7.mjs.map +0 -1
- package/dist/src-BXIUXBF6.mjs.map +0 -1
|
@@ -309,17 +309,22 @@ var TsDsl = class {
|
|
|
309
309
|
exported;
|
|
310
310
|
file;
|
|
311
311
|
get name() {
|
|
312
|
+
const nameRef = this._name;
|
|
313
|
+
const nameValue = nameRef ? fromRef(nameRef) : void 0;
|
|
314
|
+
const symbolValue = isSymbol(nameValue) ? nameValue : void 0;
|
|
312
315
|
return {
|
|
313
|
-
...
|
|
316
|
+
...nameRef,
|
|
314
317
|
set: (value) => {
|
|
315
318
|
this._name = ref(value);
|
|
316
319
|
if (isSymbol(value)) value.setNode(this);
|
|
317
320
|
},
|
|
318
|
-
|
|
321
|
+
symbol: symbolValue,
|
|
322
|
+
toString: () => nameRef ? this.$name(nameRef) : ""
|
|
319
323
|
};
|
|
320
324
|
}
|
|
321
325
|
nameSanitizer;
|
|
322
326
|
language = "typescript";
|
|
327
|
+
meta = {};
|
|
323
328
|
parent;
|
|
324
329
|
root = false;
|
|
325
330
|
scope = "value";
|
|
@@ -402,8 +407,8 @@ var TsDsl = class {
|
|
|
402
407
|
var TypeTsDsl = class extends TsDsl {};
|
|
403
408
|
//#endregion
|
|
404
409
|
//#region src/ts-dsl/expr/id.ts
|
|
405
|
-
const Mixed$
|
|
406
|
-
var IdTsDsl = class extends Mixed$
|
|
410
|
+
const Mixed$57 = TsDsl;
|
|
411
|
+
var IdTsDsl = class extends Mixed$57 {
|
|
407
412
|
"~dsl" = "IdTsDsl";
|
|
408
413
|
constructor(name) {
|
|
409
414
|
super();
|
|
@@ -455,8 +460,8 @@ function ArgsMixin(Base) {
|
|
|
455
460
|
}
|
|
456
461
|
//#endregion
|
|
457
462
|
//#region src/ts-dsl/expr/prefix.ts
|
|
458
|
-
const Mixed$
|
|
459
|
-
var PrefixTsDsl = class extends Mixed$
|
|
463
|
+
const Mixed$56 = TsDsl;
|
|
464
|
+
var PrefixTsDsl = class extends Mixed$56 {
|
|
460
465
|
"~dsl" = "PrefixTsDsl";
|
|
461
466
|
_expr;
|
|
462
467
|
_op;
|
|
@@ -570,8 +575,8 @@ function AsMixin(Base) {
|
|
|
570
575
|
}
|
|
571
576
|
//#endregion
|
|
572
577
|
//#region src/ts-dsl/expr/literal.ts
|
|
573
|
-
const Mixed$
|
|
574
|
-
var LiteralTsDsl = class extends Mixed$
|
|
578
|
+
const Mixed$55 = AsMixin(TsDsl);
|
|
579
|
+
var LiteralTsDsl = class extends Mixed$55 {
|
|
575
580
|
"~dsl" = "LiteralTsDsl";
|
|
576
581
|
value;
|
|
577
582
|
constructor(value) {
|
|
@@ -850,8 +855,8 @@ const safeRuntimeName = (name) => safeName(name, reserved.runtime);
|
|
|
850
855
|
const safeTypeName = (name) => safeName(name, reserved.type);
|
|
851
856
|
//#endregion
|
|
852
857
|
//#region src/ts-dsl/decl/decorator.ts
|
|
853
|
-
const Mixed$
|
|
854
|
-
var DecoratorTsDsl = class extends Mixed$
|
|
858
|
+
const Mixed$54 = ArgsMixin(TsDsl);
|
|
859
|
+
var DecoratorTsDsl = class extends Mixed$54 {
|
|
855
860
|
"~dsl" = "DecoratorTsDsl";
|
|
856
861
|
nameSanitizer = safeRuntimeName;
|
|
857
862
|
constructor(name, ...args) {
|
|
@@ -1263,8 +1268,8 @@ function StaticMixin(Base) {
|
|
|
1263
1268
|
}
|
|
1264
1269
|
//#endregion
|
|
1265
1270
|
//#region src/ts-dsl/type/param.ts
|
|
1266
|
-
const Mixed$
|
|
1267
|
-
var TypeParamTsDsl = class extends Mixed$
|
|
1271
|
+
const Mixed$53 = TsDsl;
|
|
1272
|
+
var TypeParamTsDsl = class extends Mixed$53 {
|
|
1268
1273
|
"~dsl" = "TypeParamTsDsl";
|
|
1269
1274
|
scope = "type";
|
|
1270
1275
|
constraint;
|
|
@@ -1468,8 +1473,8 @@ function TypeExprMixin(Base) {
|
|
|
1468
1473
|
}
|
|
1469
1474
|
//#endregion
|
|
1470
1475
|
//#region src/ts-dsl/type/attr.ts
|
|
1471
|
-
const Mixed$
|
|
1472
|
-
var TypeAttrTsDsl = class extends Mixed$
|
|
1476
|
+
const Mixed$52 = TypeExprMixin(TsDsl);
|
|
1477
|
+
var TypeAttrTsDsl = class extends Mixed$52 {
|
|
1473
1478
|
"~dsl" = "TypeAttrTsDsl";
|
|
1474
1479
|
scope = "type";
|
|
1475
1480
|
_base;
|
|
@@ -1522,8 +1527,8 @@ var TypeAttrTsDsl = class extends Mixed$51 {
|
|
|
1522
1527
|
};
|
|
1523
1528
|
//#endregion
|
|
1524
1529
|
//#region src/ts-dsl/type/expr.ts
|
|
1525
|
-
const Mixed$
|
|
1526
|
-
var TypeExprTsDsl = class extends Mixed$
|
|
1530
|
+
const Mixed$51 = TypeArgsMixin(TypeExprMixin(TsDsl));
|
|
1531
|
+
var TypeExprTsDsl = class extends Mixed$51 {
|
|
1527
1532
|
"~dsl" = "TypeExprTsDsl";
|
|
1528
1533
|
scope = "type";
|
|
1529
1534
|
_exprInput;
|
|
@@ -1566,8 +1571,8 @@ var TypeExprTsDsl = class extends Mixed$50 {
|
|
|
1566
1571
|
f.type.expr.set((...args) => new TypeExprTsDsl(...args));
|
|
1567
1572
|
//#endregion
|
|
1568
1573
|
//#region src/ts-dsl/decl/field.ts
|
|
1569
|
-
const Mixed$
|
|
1570
|
-
var FieldTsDsl = class extends Mixed$
|
|
1574
|
+
const Mixed$50 = DecoratorMixin(DocMixin(OptionalMixin(PrivateMixin(ProtectedMixin(PublicMixin(ReadonlyMixin(StaticMixin(ValueMixin(TsDsl)))))))));
|
|
1575
|
+
var FieldTsDsl = class extends Mixed$50 {
|
|
1571
1576
|
"~dsl" = "FieldTsDsl";
|
|
1572
1577
|
nameSanitizer = safeAccessorName;
|
|
1573
1578
|
_type;
|
|
@@ -1593,8 +1598,8 @@ var FieldTsDsl = class extends Mixed$49 {
|
|
|
1593
1598
|
};
|
|
1594
1599
|
//#endregion
|
|
1595
1600
|
//#region src/ts-dsl/stmt/stmt.ts
|
|
1596
|
-
const Mixed$
|
|
1597
|
-
var StmtTsDsl = class extends Mixed$
|
|
1601
|
+
const Mixed$49 = TsDsl;
|
|
1602
|
+
var StmtTsDsl = class extends Mixed$49 {
|
|
1598
1603
|
"~dsl" = "StmtTsDsl";
|
|
1599
1604
|
_inner;
|
|
1600
1605
|
constructor(inner) {
|
|
@@ -1639,11 +1644,11 @@ function DoMixin(Base) {
|
|
|
1639
1644
|
}
|
|
1640
1645
|
//#endregion
|
|
1641
1646
|
//#region src/ts-dsl/decl/pattern.ts
|
|
1642
|
-
const Mixed$
|
|
1647
|
+
const Mixed$48 = TsDsl;
|
|
1643
1648
|
/**
|
|
1644
1649
|
* Builds binding patterns (e.g., `{ foo, bar }`, `[a, b, ...rest]`).
|
|
1645
1650
|
*/
|
|
1646
|
-
var PatternTsDsl = class extends Mixed$
|
|
1651
|
+
var PatternTsDsl = class extends Mixed$48 {
|
|
1647
1652
|
"~dsl" = "PatternTsDsl";
|
|
1648
1653
|
pattern;
|
|
1649
1654
|
_spread;
|
|
@@ -1745,8 +1750,8 @@ function PatternMixin(Base) {
|
|
|
1745
1750
|
}
|
|
1746
1751
|
//#endregion
|
|
1747
1752
|
//#region src/ts-dsl/decl/param.ts
|
|
1748
|
-
const Mixed$
|
|
1749
|
-
var ParamTsDsl = class extends Mixed$
|
|
1753
|
+
const Mixed$47 = DecoratorMixin(OptionalMixin(PatternMixin(ValueMixin(TsDsl))));
|
|
1754
|
+
var ParamTsDsl = class extends Mixed$47 {
|
|
1750
1755
|
"~dsl" = "ParamTsDsl";
|
|
1751
1756
|
_type;
|
|
1752
1757
|
constructor(name, fn) {
|
|
@@ -1841,8 +1846,8 @@ function LayoutMixin(Base) {
|
|
|
1841
1846
|
}
|
|
1842
1847
|
//#endregion
|
|
1843
1848
|
//#region src/ts-dsl/stmt/block.ts
|
|
1844
|
-
const Mixed$
|
|
1845
|
-
var BlockTsDsl = class extends Mixed$
|
|
1849
|
+
const Mixed$46 = DoMixin(LayoutMixin(TsDsl));
|
|
1850
|
+
var BlockTsDsl = class extends Mixed$46 {
|
|
1846
1851
|
"~dsl" = "BlockTsDsl";
|
|
1847
1852
|
constructor(...items) {
|
|
1848
1853
|
super();
|
|
@@ -1858,8 +1863,8 @@ var BlockTsDsl = class extends Mixed$45 {
|
|
|
1858
1863
|
};
|
|
1859
1864
|
//#endregion
|
|
1860
1865
|
//#region src/ts-dsl/decl/init.ts
|
|
1861
|
-
const Mixed$
|
|
1862
|
-
var InitTsDsl = class extends Mixed$
|
|
1866
|
+
const Mixed$45 = DecoratorMixin(DoMixin(DocMixin(ParamMixin(PrivateMixin(ProtectedMixin(PublicMixin(TsDsl)))))));
|
|
1867
|
+
var InitTsDsl = class extends Mixed$45 {
|
|
1863
1868
|
"~dsl" = "InitTsDsl";
|
|
1864
1869
|
constructor(fn) {
|
|
1865
1870
|
super();
|
|
@@ -1899,8 +1904,8 @@ function TypeReturnsMixin(Base) {
|
|
|
1899
1904
|
}
|
|
1900
1905
|
//#endregion
|
|
1901
1906
|
//#region src/ts-dsl/decl/method.ts
|
|
1902
|
-
const Mixed$
|
|
1903
|
-
var MethodTsDsl = class extends Mixed$
|
|
1907
|
+
const Mixed$44 = AbstractMixin(AsyncMixin(DecoratorMixin(DoMixin(DocMixin(OptionalMixin(ParamMixin(PrivateMixin(ProtectedMixin(PublicMixin(StaticMixin(TypeParamsMixin(TypeReturnsMixin(TsDsl)))))))))))));
|
|
1908
|
+
var MethodTsDsl = class extends Mixed$44 {
|
|
1904
1909
|
"~dsl" = "MethodTsDsl";
|
|
1905
1910
|
nameSanitizer = safeAccessorName;
|
|
1906
1911
|
constructor(name, fn) {
|
|
@@ -1925,8 +1930,8 @@ var MethodTsDsl = class extends Mixed$43 {
|
|
|
1925
1930
|
f.method.set((...args) => new MethodTsDsl(...args));
|
|
1926
1931
|
//#endregion
|
|
1927
1932
|
//#region src/ts-dsl/decl/class.ts
|
|
1928
|
-
const Mixed$
|
|
1929
|
-
var ClassTsDsl = class extends Mixed$
|
|
1933
|
+
const Mixed$43 = AbstractMixin(DecoratorMixin(DefaultMixin(DocMixin(ExportMixin(TypeParamsMixin(TsDsl))))));
|
|
1934
|
+
var ClassTsDsl = class extends Mixed$43 {
|
|
1930
1935
|
"~dsl" = "ClassTsDsl";
|
|
1931
1936
|
nameSanitizer = safeRuntimeName;
|
|
1932
1937
|
baseClass;
|
|
@@ -1999,8 +2004,8 @@ var ClassTsDsl = class extends Mixed$42 {
|
|
|
1999
2004
|
};
|
|
2000
2005
|
//#endregion
|
|
2001
2006
|
//#region src/ts-dsl/decl/member.ts
|
|
2002
|
-
const Mixed$
|
|
2003
|
-
var EnumMemberTsDsl = class extends Mixed$
|
|
2007
|
+
const Mixed$42 = DocMixin(TsDsl);
|
|
2008
|
+
var EnumMemberTsDsl = class extends Mixed$42 {
|
|
2004
2009
|
"~dsl" = "EnumMemberTsDsl";
|
|
2005
2010
|
_value;
|
|
2006
2011
|
constructor(name, value) {
|
|
@@ -2025,8 +2030,8 @@ var EnumMemberTsDsl = class extends Mixed$41 {
|
|
|
2025
2030
|
};
|
|
2026
2031
|
//#endregion
|
|
2027
2032
|
//#region src/ts-dsl/decl/enum.ts
|
|
2028
|
-
const Mixed$
|
|
2029
|
-
var EnumTsDsl = class extends Mixed$
|
|
2033
|
+
const Mixed$41 = ConstMixin(DocMixin(ExportMixin(TsDsl)));
|
|
2034
|
+
var EnumTsDsl = class extends Mixed$41 {
|
|
2030
2035
|
"~dsl" = "EnumTsDsl";
|
|
2031
2036
|
nameSanitizer = safeRuntimeName;
|
|
2032
2037
|
_members = [];
|
|
@@ -2064,8 +2069,8 @@ var EnumTsDsl = class extends Mixed$40 {
|
|
|
2064
2069
|
};
|
|
2065
2070
|
//#endregion
|
|
2066
2071
|
//#region src/ts-dsl/decl/func.ts
|
|
2067
|
-
const Mixed$
|
|
2068
|
-
var ImplFuncTsDsl = class extends Mixed$
|
|
2072
|
+
const Mixed$40 = AbstractMixin(AsMixin(AsyncMixin(DecoratorMixin(DoMixin(DocMixin(ExportMixin(ParamMixin(PrivateMixin(ProtectedMixin(PublicMixin(StaticMixin(TypeParamsMixin(TypeReturnsMixin(TsDsl))))))))))))));
|
|
2073
|
+
var ImplFuncTsDsl = class extends Mixed$40 {
|
|
2069
2074
|
"~dsl" = "FuncTsDsl";
|
|
2070
2075
|
"~mode";
|
|
2071
2076
|
nameSanitizer = safeRuntimeName;
|
|
@@ -2138,8 +2143,8 @@ var ImplFuncTsDsl = class extends Mixed$39 {
|
|
|
2138
2143
|
const FuncTsDsl = ImplFuncTsDsl;
|
|
2139
2144
|
//#endregion
|
|
2140
2145
|
//#region src/ts-dsl/decl/getter.ts
|
|
2141
|
-
const Mixed$
|
|
2142
|
-
var GetterTsDsl = class extends Mixed$
|
|
2146
|
+
const Mixed$39 = AbstractMixin(AsyncMixin(DecoratorMixin(DoMixin(DocMixin(ParamMixin(PrivateMixin(ProtectedMixin(PublicMixin(StaticMixin(TypeReturnsMixin(TsDsl)))))))))));
|
|
2147
|
+
var GetterTsDsl = class extends Mixed$39 {
|
|
2143
2148
|
"~dsl" = "GetterTsDsl";
|
|
2144
2149
|
nameSanitizer = safeAccessorName;
|
|
2145
2150
|
constructor(name, fn) {
|
|
@@ -2163,8 +2168,8 @@ var GetterTsDsl = class extends Mixed$38 {
|
|
|
2163
2168
|
};
|
|
2164
2169
|
//#endregion
|
|
2165
2170
|
//#region src/ts-dsl/decl/setter.ts
|
|
2166
|
-
const Mixed$
|
|
2167
|
-
var SetterTsDsl = class extends Mixed$
|
|
2171
|
+
const Mixed$38 = AbstractMixin(AsyncMixin(DecoratorMixin(DoMixin(DocMixin(ParamMixin(PrivateMixin(ProtectedMixin(PublicMixin(StaticMixin(TsDsl))))))))));
|
|
2172
|
+
var SetterTsDsl = class extends Mixed$38 {
|
|
2168
2173
|
"~dsl" = "SetterTsDsl";
|
|
2169
2174
|
nameSanitizer = safeAccessorName;
|
|
2170
2175
|
constructor(name, fn) {
|
|
@@ -2223,8 +2228,8 @@ function SpreadMixin(Base) {
|
|
|
2223
2228
|
}
|
|
2224
2229
|
//#endregion
|
|
2225
2230
|
//#region src/ts-dsl/expr/array.ts
|
|
2226
|
-
const Mixed$
|
|
2227
|
-
var ArrayTsDsl = class extends Mixed$
|
|
2231
|
+
const Mixed$37 = AsMixin(ExprMixin(LayoutMixin(SpreadMixin(TsDsl))));
|
|
2232
|
+
var ArrayTsDsl = class extends Mixed$37 {
|
|
2228
2233
|
"~dsl" = "ArrayTsDsl";
|
|
2229
2234
|
_elements = [];
|
|
2230
2235
|
constructor(...exprs) {
|
|
@@ -2252,8 +2257,8 @@ var ArrayTsDsl = class extends Mixed$36 {
|
|
|
2252
2257
|
};
|
|
2253
2258
|
//#endregion
|
|
2254
2259
|
//#region src/ts-dsl/expr/as.ts
|
|
2255
|
-
const Mixed$
|
|
2256
|
-
var AsTsDsl = class extends Mixed$
|
|
2260
|
+
const Mixed$36 = AsMixin(ExprMixin(TsDsl));
|
|
2261
|
+
var AsTsDsl = class extends Mixed$36 {
|
|
2257
2262
|
"~dsl" = "AsTsDsl";
|
|
2258
2263
|
expr;
|
|
2259
2264
|
type;
|
|
@@ -2274,8 +2279,8 @@ var AsTsDsl = class extends Mixed$35 {
|
|
|
2274
2279
|
f.as.set((...args) => new AsTsDsl(...args));
|
|
2275
2280
|
//#endregion
|
|
2276
2281
|
//#region src/ts-dsl/expr/binary.ts
|
|
2277
|
-
const Mixed$
|
|
2278
|
-
var BinaryTsDsl = class extends Mixed$
|
|
2282
|
+
const Mixed$35 = AsMixin(ExprMixin(TsDsl));
|
|
2283
|
+
var BinaryTsDsl = class extends Mixed$35 {
|
|
2279
2284
|
"~dsl" = "BinaryTsDsl";
|
|
2280
2285
|
_base;
|
|
2281
2286
|
_expr;
|
|
@@ -2473,8 +2478,8 @@ function OperatorMixin(Base) {
|
|
|
2473
2478
|
}
|
|
2474
2479
|
//#endregion
|
|
2475
2480
|
//#region src/ts-dsl/expr/attr.ts
|
|
2476
|
-
const Mixed$
|
|
2477
|
-
var AttrTsDsl = class extends Mixed$
|
|
2481
|
+
const Mixed$34 = AsMixin(ExprMixin(OperatorMixin(OptionalMixin(SpreadMixin(TsDsl)))));
|
|
2482
|
+
var AttrTsDsl = class extends Mixed$34 {
|
|
2478
2483
|
"~dsl" = "AttrTsDsl";
|
|
2479
2484
|
_computed = false;
|
|
2480
2485
|
_left;
|
|
@@ -2512,8 +2517,8 @@ var AttrTsDsl = class extends Mixed$33 {
|
|
|
2512
2517
|
f.attr.set((...args) => new AttrTsDsl(...args));
|
|
2513
2518
|
//#endregion
|
|
2514
2519
|
//#region src/ts-dsl/expr/await.ts
|
|
2515
|
-
const Mixed$
|
|
2516
|
-
var AwaitTsDsl = class extends Mixed$
|
|
2520
|
+
const Mixed$33 = ExprMixin(TsDsl);
|
|
2521
|
+
var AwaitTsDsl = class extends Mixed$33 {
|
|
2517
2522
|
"~dsl" = "AwaitTsDsl";
|
|
2518
2523
|
_awaitExpr;
|
|
2519
2524
|
constructor(expr) {
|
|
@@ -2531,8 +2536,8 @@ var AwaitTsDsl = class extends Mixed$32 {
|
|
|
2531
2536
|
f.await.set((...args) => new AwaitTsDsl(...args));
|
|
2532
2537
|
//#endregion
|
|
2533
2538
|
//#region src/ts-dsl/expr/call.ts
|
|
2534
|
-
const Mixed$
|
|
2535
|
-
var CallTsDsl = class extends Mixed$
|
|
2539
|
+
const Mixed$32 = ArgsMixin(AsMixin(ExprMixin(SpreadMixin(TypeArgsMixin(TsDsl)))));
|
|
2540
|
+
var CallTsDsl = class extends Mixed$32 {
|
|
2536
2541
|
"~dsl" = "CallTsDsl";
|
|
2537
2542
|
_callee;
|
|
2538
2543
|
constructor(callee, ...args) {
|
|
@@ -2551,8 +2556,8 @@ var CallTsDsl = class extends Mixed$31 {
|
|
|
2551
2556
|
f.call.set((...args) => new CallTsDsl(...args));
|
|
2552
2557
|
//#endregion
|
|
2553
2558
|
//#region src/ts-dsl/expr/expr.ts
|
|
2554
|
-
const Mixed$
|
|
2555
|
-
var ExprTsDsl = class extends Mixed$
|
|
2559
|
+
const Mixed$31 = AsMixin(ExprMixin(OperatorMixin(SpreadMixin(TypeExprMixin(TsDsl)))));
|
|
2560
|
+
var ExprTsDsl = class extends Mixed$31 {
|
|
2556
2561
|
"~dsl" = "ExprTsDsl";
|
|
2557
2562
|
_exprInput;
|
|
2558
2563
|
constructor(id) {
|
|
@@ -2620,8 +2625,8 @@ function HintMixin(Base) {
|
|
|
2620
2625
|
}
|
|
2621
2626
|
//#endregion
|
|
2622
2627
|
//#region src/ts-dsl/expr/prop.ts
|
|
2623
|
-
const Mixed$
|
|
2624
|
-
var ObjectPropTsDsl = class extends Mixed$
|
|
2628
|
+
const Mixed$30 = DocMixin(TsDsl);
|
|
2629
|
+
var ObjectPropTsDsl = class extends Mixed$30 {
|
|
2625
2630
|
"~dsl" = "ObjectPropTsDsl";
|
|
2626
2631
|
_value;
|
|
2627
2632
|
_meta;
|
|
@@ -2686,8 +2691,8 @@ var ObjectPropTsDsl = class extends Mixed$29 {
|
|
|
2686
2691
|
};
|
|
2687
2692
|
//#endregion
|
|
2688
2693
|
//#region src/ts-dsl/expr/object.ts
|
|
2689
|
-
const Mixed$
|
|
2690
|
-
var ObjectTsDsl = class extends Mixed$
|
|
2694
|
+
const Mixed$29 = AsMixin(ExprMixin(HintMixin(LayoutMixin(TsDsl))));
|
|
2695
|
+
var ObjectTsDsl = class extends Mixed$29 {
|
|
2691
2696
|
"~dsl" = "ObjectTsDsl";
|
|
2692
2697
|
_props = /* @__PURE__ */ new Map();
|
|
2693
2698
|
_spreadCounter = 0;
|
|
@@ -2798,8 +2803,8 @@ const fromValue$1 = (input, options) => {
|
|
|
2798
2803
|
};
|
|
2799
2804
|
//#endregion
|
|
2800
2805
|
//#region src/ts-dsl/expr/new.ts
|
|
2801
|
-
const Mixed$
|
|
2802
|
-
var NewTsDsl = class extends Mixed$
|
|
2806
|
+
const Mixed$28 = ArgsMixin(AsMixin(ExprMixin(SpreadMixin(TypeArgsMixin(TsDsl)))));
|
|
2807
|
+
var NewTsDsl = class extends Mixed$28 {
|
|
2803
2808
|
"~dsl" = "NewTsDsl";
|
|
2804
2809
|
_newExpr;
|
|
2805
2810
|
constructor(expr, ...args) {
|
|
@@ -2818,8 +2823,8 @@ var NewTsDsl = class extends Mixed$27 {
|
|
|
2818
2823
|
f.new.set((...args) => new NewTsDsl(...args));
|
|
2819
2824
|
//#endregion
|
|
2820
2825
|
//#region src/ts-dsl/expr/postfix.ts
|
|
2821
|
-
const Mixed$
|
|
2822
|
-
var PostfixTsDsl = class extends Mixed$
|
|
2826
|
+
const Mixed$27 = TsDsl;
|
|
2827
|
+
var PostfixTsDsl = class extends Mixed$27 {
|
|
2823
2828
|
"~dsl" = "PostfixTsDsl";
|
|
2824
2829
|
_expr;
|
|
2825
2830
|
_op;
|
|
@@ -2874,8 +2879,8 @@ var PostfixTsDsl = class extends Mixed$26 {
|
|
|
2874
2879
|
};
|
|
2875
2880
|
//#endregion
|
|
2876
2881
|
//#region src/ts-dsl/expr/regexp.ts
|
|
2877
|
-
const Mixed$
|
|
2878
|
-
var RegExpTsDsl = class extends Mixed$
|
|
2882
|
+
const Mixed$26 = TsDsl;
|
|
2883
|
+
var RegExpTsDsl = class extends Mixed$26 {
|
|
2879
2884
|
"~dsl" = "RegExpTsDsl";
|
|
2880
2885
|
pattern;
|
|
2881
2886
|
flags;
|
|
@@ -2894,8 +2899,8 @@ var RegExpTsDsl = class extends Mixed$25 {
|
|
|
2894
2899
|
};
|
|
2895
2900
|
//#endregion
|
|
2896
2901
|
//#region src/ts-dsl/expr/spread.ts
|
|
2897
|
-
const Mixed$
|
|
2898
|
-
var SpreadTsDsl = class extends Mixed$
|
|
2902
|
+
const Mixed$25 = TsDsl;
|
|
2903
|
+
var SpreadTsDsl = class extends Mixed$25 {
|
|
2899
2904
|
"~dsl" = "SpreadTsDsl";
|
|
2900
2905
|
_expr;
|
|
2901
2906
|
constructor(expr) {
|
|
@@ -2913,8 +2918,8 @@ var SpreadTsDsl = class extends Mixed$24 {
|
|
|
2913
2918
|
f.spread.set((...args) => new SpreadTsDsl(...args));
|
|
2914
2919
|
//#endregion
|
|
2915
2920
|
//#region src/ts-dsl/expr/template.ts
|
|
2916
|
-
const Mixed$
|
|
2917
|
-
var TemplateTsDsl = class extends Mixed$
|
|
2921
|
+
const Mixed$24 = TsDsl;
|
|
2922
|
+
var TemplateTsDsl = class extends Mixed$24 {
|
|
2918
2923
|
"~dsl" = "TemplateTsDsl";
|
|
2919
2924
|
parts = [];
|
|
2920
2925
|
constructor(value) {
|
|
@@ -2963,8 +2968,8 @@ var TemplateTsDsl = class extends Mixed$23 {
|
|
|
2963
2968
|
};
|
|
2964
2969
|
//#endregion
|
|
2965
2970
|
//#region src/ts-dsl/expr/ternary.ts
|
|
2966
|
-
const Mixed$
|
|
2967
|
-
var TernaryTsDsl = class extends Mixed$
|
|
2971
|
+
const Mixed$23 = TsDsl;
|
|
2972
|
+
var TernaryTsDsl = class extends Mixed$23 {
|
|
2968
2973
|
"~dsl" = "TernaryTsDsl";
|
|
2969
2974
|
_condition;
|
|
2970
2975
|
_then;
|
|
@@ -3014,8 +3019,8 @@ var TernaryTsDsl = class extends Mixed$22 {
|
|
|
3014
3019
|
};
|
|
3015
3020
|
//#endregion
|
|
3016
3021
|
//#region src/ts-dsl/expr/typeof.ts
|
|
3017
|
-
const Mixed$
|
|
3018
|
-
var TypeOfExprTsDsl = class extends Mixed$
|
|
3022
|
+
const Mixed$22 = OperatorMixin(TsDsl);
|
|
3023
|
+
var TypeOfExprTsDsl = class extends Mixed$22 {
|
|
3019
3024
|
"~dsl" = "TypeOfExprTsDsl";
|
|
3020
3025
|
_expr;
|
|
3021
3026
|
constructor(expr) {
|
|
@@ -3064,8 +3069,8 @@ var NoteTsDsl = class extends TsDsl {
|
|
|
3064
3069
|
};
|
|
3065
3070
|
//#endregion
|
|
3066
3071
|
//#region src/ts-dsl/stmt/for.ts
|
|
3067
|
-
const Mixed$
|
|
3068
|
-
var ImplForTsDsl = class extends Mixed$
|
|
3072
|
+
const Mixed$21 = DoMixin(LayoutMixin(TsDsl));
|
|
3073
|
+
var ImplForTsDsl = class extends Mixed$21 {
|
|
3069
3074
|
"~dsl" = "ForTsDsl";
|
|
3070
3075
|
_await;
|
|
3071
3076
|
_condition;
|
|
@@ -3162,8 +3167,8 @@ var ImplForTsDsl = class extends Mixed$20 {
|
|
|
3162
3167
|
const ForTsDsl = ImplForTsDsl;
|
|
3163
3168
|
//#endregion
|
|
3164
3169
|
//#region src/ts-dsl/stmt/if.ts
|
|
3165
|
-
const Mixed$
|
|
3166
|
-
var IfTsDsl = class extends Mixed$
|
|
3170
|
+
const Mixed$20 = DoMixin(TsDsl);
|
|
3171
|
+
var IfTsDsl = class extends Mixed$20 {
|
|
3167
3172
|
"~dsl" = "IfTsDsl";
|
|
3168
3173
|
_condition;
|
|
3169
3174
|
_else;
|
|
@@ -3213,8 +3218,8 @@ var IfTsDsl = class extends Mixed$19 {
|
|
|
3213
3218
|
};
|
|
3214
3219
|
//#endregion
|
|
3215
3220
|
//#region src/ts-dsl/stmt/return.ts
|
|
3216
|
-
const Mixed$
|
|
3217
|
-
var ReturnTsDsl = class extends Mixed$
|
|
3221
|
+
const Mixed$19 = TsDsl;
|
|
3222
|
+
var ReturnTsDsl = class extends Mixed$19 {
|
|
3218
3223
|
"~dsl" = "ReturnTsDsl";
|
|
3219
3224
|
_returnExpr;
|
|
3220
3225
|
constructor(expr) {
|
|
@@ -3232,8 +3237,8 @@ var ReturnTsDsl = class extends Mixed$18 {
|
|
|
3232
3237
|
f.return.set((...args) => new ReturnTsDsl(...args));
|
|
3233
3238
|
//#endregion
|
|
3234
3239
|
//#region src/ts-dsl/stmt/throw.ts
|
|
3235
|
-
const Mixed$
|
|
3236
|
-
var ThrowTsDsl = class extends Mixed$
|
|
3240
|
+
const Mixed$18 = TsDsl;
|
|
3241
|
+
var ThrowTsDsl = class extends Mixed$18 {
|
|
3237
3242
|
"~dsl" = "ThrowTsDsl";
|
|
3238
3243
|
error;
|
|
3239
3244
|
msg;
|
|
@@ -3262,8 +3267,8 @@ var ThrowTsDsl = class extends Mixed$17 {
|
|
|
3262
3267
|
};
|
|
3263
3268
|
//#endregion
|
|
3264
3269
|
//#region src/ts-dsl/stmt/try.ts
|
|
3265
|
-
const Mixed$
|
|
3266
|
-
var TryTsDsl = class extends Mixed$
|
|
3270
|
+
const Mixed$17 = TsDsl;
|
|
3271
|
+
var TryTsDsl = class extends Mixed$17 {
|
|
3267
3272
|
"~dsl" = "TryTsDsl";
|
|
3268
3273
|
_catch;
|
|
3269
3274
|
_catchArg;
|
|
@@ -3339,8 +3344,8 @@ var TryTsDsl = class extends Mixed$16 {
|
|
|
3339
3344
|
};
|
|
3340
3345
|
//#endregion
|
|
3341
3346
|
//#region src/ts-dsl/stmt/var.ts
|
|
3342
|
-
const Mixed$
|
|
3343
|
-
var VarTsDsl = class extends Mixed$
|
|
3347
|
+
const Mixed$16 = DefaultMixin(DocMixin(ExportMixin(HintMixin(PatternMixin(ValueMixin(TsDsl))))));
|
|
3348
|
+
var VarTsDsl = class extends Mixed$16 {
|
|
3344
3349
|
"~dsl" = "VarTsDsl";
|
|
3345
3350
|
nameSanitizer = safeRuntimeName;
|
|
3346
3351
|
kind = ts.NodeFlags.None;
|
|
@@ -3394,8 +3399,8 @@ var VarTsDsl = class extends Mixed$15 {
|
|
|
3394
3399
|
};
|
|
3395
3400
|
//#endregion
|
|
3396
3401
|
//#region src/ts-dsl/type/alias.ts
|
|
3397
|
-
const Mixed$
|
|
3398
|
-
var TypeAliasTsDsl = class extends Mixed$
|
|
3402
|
+
const Mixed$15 = DocMixin(ExportMixin(TypeParamsMixin(TsDsl)));
|
|
3403
|
+
var TypeAliasTsDsl = class extends Mixed$15 {
|
|
3399
3404
|
"~dsl" = "TypeAliasTsDsl";
|
|
3400
3405
|
nameSanitizer = safeTypeName;
|
|
3401
3406
|
scope = "type";
|
|
@@ -3439,8 +3444,8 @@ var TypeAliasTsDsl = class extends Mixed$14 {
|
|
|
3439
3444
|
};
|
|
3440
3445
|
//#endregion
|
|
3441
3446
|
//#region src/ts-dsl/type/and.ts
|
|
3442
|
-
const Mixed$
|
|
3443
|
-
var TypeAndTsDsl = class extends Mixed$
|
|
3447
|
+
const Mixed$14 = TsDsl;
|
|
3448
|
+
var TypeAndTsDsl = class extends Mixed$14 {
|
|
3444
3449
|
"~dsl" = "TypeAndTsDsl";
|
|
3445
3450
|
scope = "type";
|
|
3446
3451
|
_types = [];
|
|
@@ -3468,8 +3473,8 @@ var TypeAndTsDsl = class extends Mixed$13 {
|
|
|
3468
3473
|
};
|
|
3469
3474
|
//#endregion
|
|
3470
3475
|
//#region src/ts-dsl/type/literal.ts
|
|
3471
|
-
const Mixed$
|
|
3472
|
-
var TypeLiteralTsDsl = class extends Mixed$
|
|
3476
|
+
const Mixed$13 = TsDsl;
|
|
3477
|
+
var TypeLiteralTsDsl = class extends Mixed$13 {
|
|
3473
3478
|
"~dsl" = "TypeLiteralTsDsl";
|
|
3474
3479
|
scope = "type";
|
|
3475
3480
|
value;
|
|
@@ -3486,8 +3491,8 @@ var TypeLiteralTsDsl = class extends Mixed$12 {
|
|
|
3486
3491
|
};
|
|
3487
3492
|
//#endregion
|
|
3488
3493
|
//#region src/ts-dsl/type/idx-sig.ts
|
|
3489
|
-
const Mixed$
|
|
3490
|
-
var TypeIdxSigTsDsl = class extends Mixed$
|
|
3494
|
+
const Mixed$12 = DocMixin(ReadonlyMixin(TsDsl));
|
|
3495
|
+
var TypeIdxSigTsDsl = class extends Mixed$12 {
|
|
3491
3496
|
"~dsl" = "TypeIdxSigTsDsl";
|
|
3492
3497
|
scope = "type";
|
|
3493
3498
|
_key;
|
|
@@ -3544,8 +3549,8 @@ var TypeIdxSigTsDsl = class extends Mixed$11 {
|
|
|
3544
3549
|
};
|
|
3545
3550
|
//#endregion
|
|
3546
3551
|
//#region src/ts-dsl/type/prop.ts
|
|
3547
|
-
const Mixed$
|
|
3548
|
-
var TypePropTsDsl = class extends Mixed$
|
|
3552
|
+
const Mixed$11 = DocMixin(OptionalMixin(ReadonlyMixin(TsDsl)));
|
|
3553
|
+
var TypePropTsDsl = class extends Mixed$11 {
|
|
3549
3554
|
"~dsl" = "TypePropTsDsl";
|
|
3550
3555
|
scope = "type";
|
|
3551
3556
|
_type;
|
|
@@ -3595,8 +3600,8 @@ var TypePropTsDsl = class extends Mixed$10 {
|
|
|
3595
3600
|
};
|
|
3596
3601
|
//#endregion
|
|
3597
3602
|
//#region src/ts-dsl/type/object.ts
|
|
3598
|
-
const Mixed$
|
|
3599
|
-
var TypeObjectTsDsl = class extends Mixed$
|
|
3603
|
+
const Mixed$10 = TsDsl;
|
|
3604
|
+
var TypeObjectTsDsl = class extends Mixed$10 {
|
|
3600
3605
|
"~dsl" = "TypeObjectTsDsl";
|
|
3601
3606
|
scope = "type";
|
|
3602
3607
|
_props = /* @__PURE__ */ new Map();
|
|
@@ -3637,8 +3642,8 @@ var TypeObjectTsDsl = class extends Mixed$9 {
|
|
|
3637
3642
|
};
|
|
3638
3643
|
//#endregion
|
|
3639
3644
|
//#region src/ts-dsl/type/tuple.ts
|
|
3640
|
-
const Mixed$
|
|
3641
|
-
var TypeTupleTsDsl = class extends Mixed$
|
|
3645
|
+
const Mixed$9 = TsDsl;
|
|
3646
|
+
var TypeTupleTsDsl = class extends Mixed$9 {
|
|
3642
3647
|
"~dsl" = "TypeTupleTsDsl";
|
|
3643
3648
|
scope = "type";
|
|
3644
3649
|
_elements = [];
|
|
@@ -3677,8 +3682,8 @@ const fromValue = (input) => {
|
|
|
3677
3682
|
};
|
|
3678
3683
|
//#endregion
|
|
3679
3684
|
//#region src/ts-dsl/type/func.ts
|
|
3680
|
-
const Mixed$
|
|
3681
|
-
var TypeFuncTsDsl = class extends Mixed$
|
|
3685
|
+
const Mixed$8 = DocMixin(ParamMixin(TypeParamsMixin(TypeReturnsMixin(TsDsl))));
|
|
3686
|
+
var TypeFuncTsDsl = class extends Mixed$8 {
|
|
3682
3687
|
"~dsl" = "TypeFuncTsDsl";
|
|
3683
3688
|
scope = "type";
|
|
3684
3689
|
analyze(ctx) {
|
|
@@ -3706,8 +3711,8 @@ var TypeFuncTsDsl = class extends Mixed$7 {
|
|
|
3706
3711
|
};
|
|
3707
3712
|
//#endregion
|
|
3708
3713
|
//#region src/ts-dsl/type/idx.ts
|
|
3709
|
-
const Mixed$
|
|
3710
|
-
var TypeIdxTsDsl = class extends Mixed$
|
|
3714
|
+
const Mixed$7 = TypeExprMixin(TsDsl);
|
|
3715
|
+
var TypeIdxTsDsl = class extends Mixed$7 {
|
|
3711
3716
|
"~dsl" = "TypeIdxTsDsl";
|
|
3712
3717
|
scope = "type";
|
|
3713
3718
|
_base;
|
|
@@ -3753,8 +3758,8 @@ var TypeIdxTsDsl = class extends Mixed$6 {
|
|
|
3753
3758
|
f.type.idx.set((...args) => new TypeIdxTsDsl(...args));
|
|
3754
3759
|
//#endregion
|
|
3755
3760
|
//#region src/ts-dsl/type/mapped.ts
|
|
3756
|
-
const Mixed$
|
|
3757
|
-
var TypeMappedTsDsl = class extends Mixed$
|
|
3761
|
+
const Mixed$6 = TsDsl;
|
|
3762
|
+
var TypeMappedTsDsl = class extends Mixed$6 {
|
|
3758
3763
|
"~dsl" = "TypeMappedTsDsl";
|
|
3759
3764
|
scope = "type";
|
|
3760
3765
|
questionToken;
|
|
@@ -3825,7 +3830,7 @@ var TypeMappedTsDsl = class extends Mixed$5 {
|
|
|
3825
3830
|
};
|
|
3826
3831
|
//#endregion
|
|
3827
3832
|
//#region src/ts-dsl/type/operator.ts
|
|
3828
|
-
const Mixed$
|
|
3833
|
+
const Mixed$5 = TsDsl;
|
|
3829
3834
|
/**
|
|
3830
3835
|
* Builds a TypeScript `TypeOperatorNode`, such as:
|
|
3831
3836
|
*
|
|
@@ -3838,7 +3843,7 @@ const Mixed$4 = TsDsl;
|
|
|
3838
3843
|
*
|
|
3839
3844
|
* The node will throw during render if required fields are missing.
|
|
3840
3845
|
*/
|
|
3841
|
-
var TypeOperatorTsDsl = class extends Mixed$
|
|
3846
|
+
var TypeOperatorTsDsl = class extends Mixed$5 {
|
|
3842
3847
|
"~dsl" = "TypeOperatorTsDsl";
|
|
3843
3848
|
scope = "type";
|
|
3844
3849
|
_op;
|
|
@@ -3895,8 +3900,8 @@ var TypeOperatorTsDsl = class extends Mixed$4 {
|
|
|
3895
3900
|
f.type.operator.set((...args) => new TypeOperatorTsDsl(...args));
|
|
3896
3901
|
//#endregion
|
|
3897
3902
|
//#region src/ts-dsl/type/or.ts
|
|
3898
|
-
const Mixed$
|
|
3899
|
-
var TypeOrTsDsl = class extends Mixed$
|
|
3903
|
+
const Mixed$4 = TsDsl;
|
|
3904
|
+
var TypeOrTsDsl = class extends Mixed$4 {
|
|
3900
3905
|
"~dsl" = "TypeOrTsDsl";
|
|
3901
3906
|
scope = "type";
|
|
3902
3907
|
_types = [];
|
|
@@ -3924,8 +3929,8 @@ var TypeOrTsDsl = class extends Mixed$3 {
|
|
|
3924
3929
|
};
|
|
3925
3930
|
//#endregion
|
|
3926
3931
|
//#region src/ts-dsl/type/query.ts
|
|
3927
|
-
const Mixed$
|
|
3928
|
-
var TypeQueryTsDsl = class extends Mixed$
|
|
3932
|
+
const Mixed$3 = TypeExprMixin(TsDsl);
|
|
3933
|
+
var TypeQueryTsDsl = class extends Mixed$3 {
|
|
3929
3934
|
"~dsl" = "TypeQueryTsDsl";
|
|
3930
3935
|
scope = "type";
|
|
3931
3936
|
_expr;
|
|
@@ -3945,8 +3950,8 @@ var TypeQueryTsDsl = class extends Mixed$2 {
|
|
|
3945
3950
|
f.type.query.set((...args) => new TypeQueryTsDsl(...args));
|
|
3946
3951
|
//#endregion
|
|
3947
3952
|
//#region src/ts-dsl/type/template.ts
|
|
3948
|
-
const Mixed$
|
|
3949
|
-
var TypeTemplateTsDsl = class extends Mixed$
|
|
3953
|
+
const Mixed$2 = TsDsl;
|
|
3954
|
+
var TypeTemplateTsDsl = class extends Mixed$2 {
|
|
3950
3955
|
"~dsl" = "TypeTemplateTsDsl";
|
|
3951
3956
|
scope = "type";
|
|
3952
3957
|
parts = [];
|
|
@@ -3992,6 +3997,86 @@ var TypeTemplateTsDsl = class extends Mixed$1 {
|
|
|
3992
3997
|
}
|
|
3993
3998
|
};
|
|
3994
3999
|
//#endregion
|
|
4000
|
+
//#region src/ts-dsl/type/ternary.ts
|
|
4001
|
+
const keywordSyntaxKind = {
|
|
4002
|
+
any: ts.SyntaxKind.AnyKeyword,
|
|
4003
|
+
bigint: ts.SyntaxKind.BigIntKeyword,
|
|
4004
|
+
boolean: ts.SyntaxKind.BooleanKeyword,
|
|
4005
|
+
never: ts.SyntaxKind.NeverKeyword,
|
|
4006
|
+
number: ts.SyntaxKind.NumberKeyword,
|
|
4007
|
+
object: ts.SyntaxKind.ObjectKeyword,
|
|
4008
|
+
string: ts.SyntaxKind.StringKeyword,
|
|
4009
|
+
symbol: ts.SyntaxKind.SymbolKeyword,
|
|
4010
|
+
undefined: ts.SyntaxKind.UndefinedKeyword,
|
|
4011
|
+
unknown: ts.SyntaxKind.UnknownKeyword,
|
|
4012
|
+
void: ts.SyntaxKind.VoidKeyword
|
|
4013
|
+
};
|
|
4014
|
+
const Mixed$1 = TsDsl;
|
|
4015
|
+
var TypeTernaryTsDsl = class extends Mixed$1 {
|
|
4016
|
+
"~dsl" = "TypeTernaryTsDsl";
|
|
4017
|
+
scope = "type";
|
|
4018
|
+
_check;
|
|
4019
|
+
_extends;
|
|
4020
|
+
_true;
|
|
4021
|
+
_false;
|
|
4022
|
+
constructor(check) {
|
|
4023
|
+
super();
|
|
4024
|
+
if (check) this.check(check);
|
|
4025
|
+
}
|
|
4026
|
+
analyze(ctx) {
|
|
4027
|
+
super.analyze(ctx);
|
|
4028
|
+
ctx.analyze(this._check);
|
|
4029
|
+
ctx.analyze(this._extends);
|
|
4030
|
+
ctx.analyze(this._true);
|
|
4031
|
+
ctx.analyze(this._false);
|
|
4032
|
+
}
|
|
4033
|
+
/** Returns true when all required builder calls are present. */
|
|
4034
|
+
get isValid() {
|
|
4035
|
+
return !this.missingRequiredCalls().length;
|
|
4036
|
+
}
|
|
4037
|
+
/** Sets the checked type: `Check extends ...` */
|
|
4038
|
+
check(type) {
|
|
4039
|
+
this._check = this.resolveType(type);
|
|
4040
|
+
return this;
|
|
4041
|
+
}
|
|
4042
|
+
/** Sets the constraint: `Check extends Extends ? ...` */
|
|
4043
|
+
extends(type) {
|
|
4044
|
+
this._extends = this.resolveType(type);
|
|
4045
|
+
return this;
|
|
4046
|
+
}
|
|
4047
|
+
/** Sets the true branch: `... ? Do : ...` */
|
|
4048
|
+
do(type) {
|
|
4049
|
+
this._true = this.resolveType(type);
|
|
4050
|
+
return this;
|
|
4051
|
+
}
|
|
4052
|
+
/** Sets the false branch: `... : Otherwise` */
|
|
4053
|
+
otherwise(type) {
|
|
4054
|
+
this._false = this.resolveType(type);
|
|
4055
|
+
return this;
|
|
4056
|
+
}
|
|
4057
|
+
toAst() {
|
|
4058
|
+
this.$validate();
|
|
4059
|
+
return ts.factory.createConditionalTypeNode(this.$type(this._check), this.$type(this._extends), this.$type(this._true), this.$type(this._false));
|
|
4060
|
+
}
|
|
4061
|
+
$validate() {
|
|
4062
|
+
const missing = this.missingRequiredCalls();
|
|
4063
|
+
if (!missing.length) return;
|
|
4064
|
+
throw new Error(`Ternary type missing ${missing.join(" and ")}`);
|
|
4065
|
+
}
|
|
4066
|
+
missingRequiredCalls() {
|
|
4067
|
+
const missing = [];
|
|
4068
|
+
if (!this._check) missing.push(".check()");
|
|
4069
|
+
if (!this._extends) missing.push(".extends()");
|
|
4070
|
+
if (!this._true) missing.push(".do()");
|
|
4071
|
+
if (!this._false) missing.push(".otherwise()");
|
|
4072
|
+
return missing;
|
|
4073
|
+
}
|
|
4074
|
+
resolveType(type) {
|
|
4075
|
+
if (typeof type === "string" && type in keywordSyntaxKind) return ts.factory.createKeywordTypeNode(keywordSyntaxKind[type]);
|
|
4076
|
+
return type;
|
|
4077
|
+
}
|
|
4078
|
+
};
|
|
4079
|
+
//#endregion
|
|
3995
4080
|
//#region src/ts-dsl/type/tuple-member.ts
|
|
3996
4081
|
const Mixed = OptionalMixin(TsDsl);
|
|
3997
4082
|
var TypeTupleMemberTsDsl = class extends Mixed {
|
|
@@ -4423,6 +4508,8 @@ const tsDsl = {
|
|
|
4423
4508
|
query: (...args) => new TypeQueryTsDsl(...args),
|
|
4424
4509
|
/** Builds a TypeScript template literal *type* (e.g., `${Foo}-${Bar}` as a type). */
|
|
4425
4510
|
template: (...args) => new TypeTemplateTsDsl(...args),
|
|
4511
|
+
/** Creates a ternary conditional type (e.g., `T extends U ? X : Y`). */
|
|
4512
|
+
ternary: (...args) => new TypeTernaryTsDsl(...args),
|
|
4426
4513
|
/** Creates a tuple type (e.g., [A, B, C]). */
|
|
4427
4514
|
tuple: (...args) => new TypeTupleTsDsl(...args),
|
|
4428
4515
|
/** Creates a named tuple element (e.g., `[resolver?: R]`). */
|
|
@@ -4902,7 +4989,7 @@ function operationReturnType({ operation, plugin }) {
|
|
|
4902
4989
|
const inner = requestResult.generic(nuxtTypeComposable).generic($.type.or(queryType("response"), nuxtTypeDefault));
|
|
4903
4990
|
return isSse ? $.type("Promise").generic(sseResult.generic(inner.generic("unknown"))) : inner.generic(nuxtTypeDefault);
|
|
4904
4991
|
}
|
|
4905
|
-
if (isSse) return $.type("Promise").generic(sseResult.generic(queryType("responses"))
|
|
4992
|
+
if (isSse) return $.type("Promise").generic(sseResult.generic(queryType("responses")));
|
|
4906
4993
|
return requestResult.generic(queryType("responses")).generic(queryType("errors")).generic("ThrowOnError").$if(plugin.config.responseStyle === "data", (t) => t.generic($.type.literal(plugin.config.responseStyle)));
|
|
4907
4994
|
}
|
|
4908
4995
|
//#endregion
|
|
@@ -6217,7 +6304,7 @@ function createTypeOptions({ plugin }) {
|
|
|
6217
6304
|
"You can provide a client instance returned by `createClient()` instead of",
|
|
6218
6305
|
"individual options. This might be also useful if you want to implement a",
|
|
6219
6306
|
"custom client."
|
|
6220
|
-
]).required(!plugin.config.client && !isInstance(plugin)).type(plugin.symbols.Client)).prop("meta", (p) => p.doc(["You can pass arbitrary values through the `meta` object. This can be", "used to access values that aren't defined as part of the SDK function."]).optional().type($.type("Record").generics("string", "unknown")))));
|
|
6307
|
+
]).required(!plugin.config.client && !isInstance(plugin)).type(plugin.symbols.Client)).prop("meta", (p) => p.doc(["You can pass arbitrary values through the `meta` object. This can be", "used to access values that aren't defined as part of the SDK function."]).optional().type($.type.ternary().check($.type.operator().keyof($.type(plugin.symbols.ClientMeta))).extends("never").do($.type("Record").generics("string", "unknown")).otherwise($.type(plugin.symbols.ClientMeta))))));
|
|
6221
6308
|
plugin.node(typeOptions);
|
|
6222
6309
|
}
|
|
6223
6310
|
//#endregion
|
|
@@ -6258,13 +6345,13 @@ const handlerV1$3 = ({ plugin }) => {
|
|
|
6258
6345
|
const handler$11 = (args) => handlerV1$3(args);
|
|
6259
6346
|
//#endregion
|
|
6260
6347
|
//#region src/symbols/angular.ts
|
|
6261
|
-
function ANGULAR(
|
|
6262
|
-
return { Injectable:
|
|
6348
|
+
function ANGULAR(factory) {
|
|
6349
|
+
return { Injectable: factory.register("Injectable", { external: "@angular/core" }) };
|
|
6263
6350
|
}
|
|
6264
6351
|
//#endregion
|
|
6265
6352
|
//#region src/symbols/axios.ts
|
|
6266
|
-
function AXIOS(
|
|
6267
|
-
return { AxiosError:
|
|
6353
|
+
function AXIOS(factory) {
|
|
6354
|
+
return { AxiosError: factory.register("AxiosError", {
|
|
6268
6355
|
external: "axios",
|
|
6269
6356
|
kind: "type"
|
|
6270
6357
|
}) };
|
|
@@ -6300,8 +6387,8 @@ function TANSTACK_QUERY(plugin) {
|
|
|
6300
6387
|
}
|
|
6301
6388
|
//#endregion
|
|
6302
6389
|
//#region src/symbols/valibot.ts
|
|
6303
|
-
function VALIBOT(
|
|
6304
|
-
return { v:
|
|
6390
|
+
function VALIBOT(factory) {
|
|
6391
|
+
return { v: factory.register("v", {
|
|
6305
6392
|
external: "valibot",
|
|
6306
6393
|
importKind: "namespace"
|
|
6307
6394
|
}) };
|
|
@@ -6340,6 +6427,7 @@ function ZOD(plugin) {
|
|
|
6340
6427
|
function sdkSymbols(plugin) {
|
|
6341
6428
|
const clientModule = clientFolderAbsolutePath(getTypedConfig(plugin));
|
|
6342
6429
|
const client = getClientPlugin(getTypedConfig(plugin));
|
|
6430
|
+
const factory = plugin.symbolFactory;
|
|
6343
6431
|
return {
|
|
6344
6432
|
Client: plugin.symbol("Client", {
|
|
6345
6433
|
external: clientModule,
|
|
@@ -6349,6 +6437,14 @@ function sdkSymbols(plugin) {
|
|
|
6349
6437
|
tool: client.name
|
|
6350
6438
|
}
|
|
6351
6439
|
}),
|
|
6440
|
+
ClientMeta: plugin.symbol("ClientMeta", {
|
|
6441
|
+
external: clientModule,
|
|
6442
|
+
kind: "type",
|
|
6443
|
+
meta: {
|
|
6444
|
+
resource: "client.ClientMeta",
|
|
6445
|
+
tool: client.name
|
|
6446
|
+
}
|
|
6447
|
+
}),
|
|
6352
6448
|
Composable: plugin.symbol("Composable", {
|
|
6353
6449
|
external: clientModule,
|
|
6354
6450
|
kind: "type",
|
|
@@ -6381,7 +6477,7 @@ function sdkSymbols(plugin) {
|
|
|
6381
6477
|
external: clientModule,
|
|
6382
6478
|
kind: "type"
|
|
6383
6479
|
}),
|
|
6384
|
-
angular: ANGULAR(
|
|
6480
|
+
angular: ANGULAR(factory),
|
|
6385
6481
|
buildClientParams: plugin.symbol("buildClientParams", {
|
|
6386
6482
|
external: clientModule,
|
|
6387
6483
|
meta: {
|
|
@@ -9062,9 +9158,10 @@ const handler$7 = (args) => handlerV5(args);
|
|
|
9062
9158
|
//#endregion
|
|
9063
9159
|
//#region src/plugins/@tanstack/query-core/symbols.ts
|
|
9064
9160
|
function tanStackQuerySymbols(plugin) {
|
|
9161
|
+
const factory = plugin.symbolFactory;
|
|
9065
9162
|
return {
|
|
9066
9163
|
...TANSTACK_QUERY(plugin),
|
|
9067
|
-
axios: AXIOS(
|
|
9164
|
+
axios: AXIOS(factory)
|
|
9068
9165
|
};
|
|
9069
9166
|
}
|
|
9070
9167
|
//#endregion
|
|
@@ -11660,12 +11757,6 @@ function baseNode$52(ctx) {
|
|
|
11660
11757
|
plugin: ctx.plugin
|
|
11661
11758
|
});
|
|
11662
11759
|
const { v } = ctx.plugin.symbols;
|
|
11663
|
-
const def = ctx.plugin.querySymbols({
|
|
11664
|
-
resource: "definition",
|
|
11665
|
-
resourceId: pathToJsonPointer(fromRef(ctx.path)),
|
|
11666
|
-
tool: "typescript"
|
|
11667
|
-
}).filter((symbol) => symbol.kind === "var" || symbol.kind === "enum" && !symbol.node.hasModifier("const"))[0];
|
|
11668
|
-
if (def) return $(v).attr(identifiers$1.schemas.enum).call(def);
|
|
11669
11760
|
if (picklistMembers.length > 0 && picklistMembers.length === literalSchemas.length) return $(v).attr(identifiers$1.schemas.picklist).call($.array(...picklistMembers));
|
|
11670
11761
|
if (literalSchemas.length === 1) return literalSchemas[0];
|
|
11671
11762
|
return $(v).attr(identifiers$1.schemas.union).call($.array(...literalSchemas));
|
|
@@ -12702,7 +12793,8 @@ const handler$1 = (args) => handlerV1(args);
|
|
|
12702
12793
|
//#endregion
|
|
12703
12794
|
//#region src/plugins/valibot/symbols.ts
|
|
12704
12795
|
function valibotSymbols(plugin) {
|
|
12705
|
-
|
|
12796
|
+
const factory = plugin.symbolFactory;
|
|
12797
|
+
return { ...VALIBOT(factory) };
|
|
12706
12798
|
}
|
|
12707
12799
|
//#endregion
|
|
12708
12800
|
//#region src/plugins/valibot/config.ts
|
|
@@ -13849,12 +13941,6 @@ function baseNode$38(ctx) {
|
|
|
13849
13941
|
plugin: ctx.plugin
|
|
13850
13942
|
});
|
|
13851
13943
|
const { z } = ctx.plugin.symbols;
|
|
13852
|
-
const def = ctx.plugin.querySymbols({
|
|
13853
|
-
resource: "definition",
|
|
13854
|
-
resourceId: pathToJsonPointer(fromRef(ctx.path)),
|
|
13855
|
-
tool: "typescript"
|
|
13856
|
-
}).filter((symbol) => symbol.kind === "var" || symbol.kind === "enum" && !symbol.node.hasModifier("const"))[0];
|
|
13857
|
-
if (def) return $(z).attr(identifiers.enum).call(def);
|
|
13858
13944
|
if (enumMembers.length > 0 && enumMembers.length === literalSchemas.length) return $(z).attr(identifiers.enum).call($.array(...enumMembers));
|
|
13859
13945
|
if (literalSchemas.length === 1) return literalSchemas[0];
|
|
13860
13946
|
return $(z).attr(identifiers.union).call($.array(...literalSchemas));
|
|
@@ -15029,12 +15115,6 @@ function baseNode$24(ctx) {
|
|
|
15029
15115
|
plugin: ctx.plugin
|
|
15030
15116
|
});
|
|
15031
15117
|
const { z } = ctx.plugin.symbols;
|
|
15032
|
-
const def = ctx.plugin.querySymbols({
|
|
15033
|
-
resource: "definition",
|
|
15034
|
-
resourceId: pathToJsonPointer(fromRef(ctx.path)),
|
|
15035
|
-
tool: "typescript"
|
|
15036
|
-
}).filter((symbol) => symbol.kind === "var" || symbol.kind === "enum" && !symbol.node.hasModifier("const"))[0];
|
|
15037
|
-
if (def) return $(z).attr(identifiers.nativeEnum).call(def);
|
|
15038
15118
|
if (enumMembers.length > 0 && enumMembers.length === literalSchemas.length) return $(z).attr(identifiers.enum).call($.array(...enumMembers));
|
|
15039
15119
|
if (literalSchemas.length === 1) return literalSchemas[0];
|
|
15040
15120
|
return $(z).attr(identifiers.union).call($.array(...literalSchemas));
|
|
@@ -16147,12 +16227,6 @@ function baseNode$10(ctx) {
|
|
|
16147
16227
|
plugin: ctx.plugin
|
|
16148
16228
|
});
|
|
16149
16229
|
const { z } = ctx.plugin.symbols;
|
|
16150
|
-
const def = ctx.plugin.querySymbols({
|
|
16151
|
-
resource: "definition",
|
|
16152
|
-
resourceId: pathToJsonPointer(fromRef(ctx.path)),
|
|
16153
|
-
tool: "typescript"
|
|
16154
|
-
}).filter((symbol) => symbol.kind === "var" || symbol.kind === "enum" && !symbol.node.hasModifier("const"))[0];
|
|
16155
|
-
if (def) return $(z).attr(identifiers.enum).call(def);
|
|
16156
16230
|
if (enumMembers.length > 0 && enumMembers.length === literalSchemas.length) return $(z).attr(identifiers.enum).call($.array(...enumMembers));
|
|
16157
16231
|
if (literalSchemas.length === 1) return literalSchemas[0];
|
|
16158
16232
|
return $(z).attr(identifiers.union).call($.array(...literalSchemas));
|
|
@@ -17612,4 +17686,4 @@ async function resolveJobs({ logger, userConfigs }) {
|
|
|
17612
17686
|
//#endregion
|
|
17613
17687
|
export { postProcessors as _, clientDefaultConfig as a, TypeScriptRenderer as c, reserved as d, keywords as f, getTypedConfig as g, getClientPlugin as h, generateClientBundle as i, TsDslContext as l, TsDsl as m, defaultPlugins as n, clientDefaultMeta as o, regexp as p, clientPluginHandler as r, $ as s, resolveJobs as t, ctx as u };
|
|
17614
17688
|
|
|
17615
|
-
//# sourceMappingURL=init-
|
|
17689
|
+
//# sourceMappingURL=init-6HtXdMiq.mjs.map
|