@hey-api/openapi-ts 0.89.0 → 0.89.1
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/axios/client.ts +1 -1
- package/dist/{config-uoaRJc6A.d.mts → config-DsA-xawl.d.mts} +670 -570
- package/dist/{config-CBa-XLy8.d.cts → config-Duuay7XM.d.cts} +670 -570
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal.cjs +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.mts +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/openApi-C6rgbKAs.mjs +13 -0
- package/dist/openApi-C6rgbKAs.mjs.map +1 -0
- package/dist/openApi-DbVAMWYK.cjs +13 -0
- package/dist/openApi-DbVAMWYK.cjs.map +1 -0
- package/dist/run.cjs +1 -1
- package/dist/run.cjs.map +1 -1
- package/dist/run.mjs +1 -1
- package/dist/run.mjs.map +1 -1
- package/dist/{src-CmkI6L90.mjs → src-DwGvCacY.mjs} +2 -2
- package/dist/src-DwGvCacY.mjs.map +1 -0
- package/dist/{src-odo5Y_R2.cjs → src-T7IO6Tfr.cjs} +2 -2
- package/dist/src-T7IO6Tfr.cjs.map +1 -0
- package/package.json +18 -18
- package/dist/openApi-AbaojA3X.mjs +0 -13
- package/dist/openApi-AbaojA3X.mjs.map +0 -1
- package/dist/openApi-CSMCX27Y.cjs +0 -13
- package/dist/openApi-CSMCX27Y.cjs.map +0 -1
- package/dist/src-CmkI6L90.mjs.map +0 -1
- package/dist/src-odo5Y_R2.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import * as _hey_api_codegen_core0 from "@hey-api/codegen-core";
|
|
2
|
+
import { AnalysisContext, AstContext, File, FromRef, IProject, Language, NameConflictResolver, Node, Project, Ref, Refs, RenderContext, Renderer, Symbol, SymbolIdentifier, SymbolIn, SymbolMeta } from "@hey-api/codegen-core";
|
|
3
3
|
import ts from "typescript";
|
|
4
4
|
import { RangeOptions, SemVer } from "semver";
|
|
5
5
|
import { HttpClient, HttpErrorResponse, HttpHeaders, HttpRequest, HttpResponse } from "@angular/common/http";
|
|
@@ -36,12 +36,20 @@ type LazyOrAsync<T> = T | (() => T) | (() => Promise<T>);
|
|
|
36
36
|
type MaybeArray<T> = T | ReadonlyArray<T>;
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/openApi/3.1.x/types/spec.d.ts
|
|
39
|
+
/**
|
|
40
|
+
* OpenAPI Specification Extensions.
|
|
41
|
+
*
|
|
42
|
+
* See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
|
|
43
|
+
*/
|
|
44
|
+
interface SpecificationExtensions$2 {
|
|
45
|
+
[extension: `x-${string}`]: unknown;
|
|
46
|
+
}
|
|
39
47
|
/**
|
|
40
48
|
* This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#openapi-document OpenAPI document}.
|
|
41
49
|
*
|
|
42
50
|
* This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
|
|
43
51
|
*/
|
|
44
|
-
interface OpenApiV3_1_X {
|
|
52
|
+
interface OpenApiV3_1_X extends SpecificationExtensions$2 {
|
|
45
53
|
/**
|
|
46
54
|
* An element to hold various schemas for the document.
|
|
47
55
|
*/
|
|
@@ -164,11 +172,11 @@ interface OpenApiV3_1_X {
|
|
|
164
172
|
* description: callback successfully processed
|
|
165
173
|
* ```
|
|
166
174
|
*/
|
|
167
|
-
interface CallbackObject$1 {
|
|
175
|
+
interface CallbackObject$1 extends SpecificationExtensions$2 {
|
|
168
176
|
/**
|
|
169
177
|
* A Path Item Object, or a reference to one, used to define a callback request and expected responses. A {@link https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/callback-example.yaml complete example} is available.
|
|
170
178
|
*/
|
|
171
|
-
[expression: string]: PathItemObject$2 | ReferenceObject$1;
|
|
179
|
+
[expression: string]: PathItemObject$2 | ReferenceObject$1 | unknown;
|
|
172
180
|
}
|
|
173
181
|
/**
|
|
174
182
|
* Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object.
|
|
@@ -259,7 +267,7 @@ interface CallbackObject$1 {
|
|
|
259
267
|
* read:pets: read your pets
|
|
260
268
|
* ```
|
|
261
269
|
*/
|
|
262
|
-
interface ComponentsObject$1 {
|
|
270
|
+
interface ComponentsObject$1 extends SpecificationExtensions$2 {
|
|
263
271
|
/**
|
|
264
272
|
* An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Objects}.
|
|
265
273
|
*/
|
|
@@ -313,7 +321,7 @@ interface ComponentsObject$1 {
|
|
|
313
321
|
* email: support@example.com
|
|
314
322
|
* ```
|
|
315
323
|
*/
|
|
316
|
-
interface ContactObject$2 {
|
|
324
|
+
interface ContactObject$2 extends SpecificationExtensions$2 {
|
|
317
325
|
/**
|
|
318
326
|
* The email address of the contact person/organization. This MUST be in the form of an email address.
|
|
319
327
|
*/
|
|
@@ -453,7 +461,7 @@ interface ContactObject$2 {
|
|
|
453
461
|
*
|
|
454
462
|
* will map to `Dog` because of the definition in the `mapping` element.
|
|
455
463
|
*/
|
|
456
|
-
interface DiscriminatorObject$1 {
|
|
464
|
+
interface DiscriminatorObject$1 extends SpecificationExtensions$2 {
|
|
457
465
|
/**
|
|
458
466
|
* An object to hold mappings between payload values and schema names or references.
|
|
459
467
|
*/
|
|
@@ -504,7 +512,7 @@ interface DiscriminatorObject$1 {
|
|
|
504
512
|
* type: integer
|
|
505
513
|
* ```
|
|
506
514
|
*/
|
|
507
|
-
interface EncodingObject$1 {
|
|
515
|
+
interface EncodingObject$1 extends SpecificationExtensions$2 {
|
|
508
516
|
/**
|
|
509
517
|
* Determines whether the parameter value SHOULD allow reserved characters, as defined by {@link https://tools.ietf.org/html/rfc3986#section-2.2 RFC3986} `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. The default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#encodingContentType `contentType`} (implicit or explicit) SHALL be ignored.
|
|
510
518
|
*/
|
|
@@ -592,7 +600,7 @@ interface EncodingObject$1 {
|
|
|
592
600
|
* $ref: '#/components/examples/confirmation-success'
|
|
593
601
|
* ```
|
|
594
602
|
*/
|
|
595
|
-
interface ExampleObject$2 {
|
|
603
|
+
interface ExampleObject$2 extends SpecificationExtensions$2 {
|
|
596
604
|
/**
|
|
597
605
|
* Long description for the example. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
598
606
|
*/
|
|
@@ -621,7 +629,7 @@ interface ExampleObject$2 {
|
|
|
621
629
|
* url: https://example.com
|
|
622
630
|
* ```
|
|
623
631
|
*/
|
|
624
|
-
interface ExternalDocumentationObject$2 {
|
|
632
|
+
interface ExternalDocumentationObject$2 extends SpecificationExtensions$2 {
|
|
625
633
|
/**
|
|
626
634
|
* A description of the target documentation. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
627
635
|
*/
|
|
@@ -667,7 +675,7 @@ type HeaderObject$2 = Omit<ParameterObject, 'in' | 'name'>;
|
|
|
667
675
|
* version: 1.0.1
|
|
668
676
|
* ```
|
|
669
677
|
*/
|
|
670
|
-
interface InfoObject {
|
|
678
|
+
interface InfoObject extends SpecificationExtensions$2 {
|
|
671
679
|
/**
|
|
672
680
|
* The contact information for the exposed API.
|
|
673
681
|
*/
|
|
@@ -708,7 +716,7 @@ interface InfoObject {
|
|
|
708
716
|
* identifier: Apache-2.0
|
|
709
717
|
* ```
|
|
710
718
|
*/
|
|
711
|
-
interface LicenseObject$2 {
|
|
719
|
+
interface LicenseObject$2 extends SpecificationExtensions$2 {
|
|
712
720
|
/**
|
|
713
721
|
* An {@link https://spdx.org/licenses/ SPDX} license expression for the API. The `identifier` field is mutually exclusive of the `url` field.
|
|
714
722
|
*/
|
|
@@ -869,7 +877,7 @@ interface LicenseObject$2 {
|
|
|
869
877
|
*
|
|
870
878
|
* Runtime expressions preserve the type of the referenced value. Expressions can be embedded into string values by surrounding the expression with `{}` curly braces.
|
|
871
879
|
*/
|
|
872
|
-
interface LinkObject$1 {
|
|
880
|
+
interface LinkObject$1 extends SpecificationExtensions$2 {
|
|
873
881
|
/**
|
|
874
882
|
* A description of the link. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
875
883
|
*/
|
|
@@ -928,7 +936,7 @@ interface LinkObject$1 {
|
|
|
928
936
|
* $ref: "#/components/examples/frog-example"
|
|
929
937
|
* ```
|
|
930
938
|
*/
|
|
931
|
-
interface MediaTypeObject$1 {
|
|
939
|
+
interface MediaTypeObject$1 extends SpecificationExtensions$2 {
|
|
932
940
|
/**
|
|
933
941
|
* A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to `requestBody` objects when the media type is `multipart` or `application/x-www-form-urlencoded`.
|
|
934
942
|
*/
|
|
@@ -969,7 +977,7 @@ interface MediaTypeObject$1 {
|
|
|
969
977
|
* read:pets: read your pets
|
|
970
978
|
* ```
|
|
971
979
|
*/
|
|
972
|
-
interface OAuthFlowObject$1 {
|
|
980
|
+
interface OAuthFlowObject$1 extends SpecificationExtensions$2 {
|
|
973
981
|
/**
|
|
974
982
|
* **REQUIRED (`"implicit"`, `"authorizationCode"`)**. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
|
|
975
983
|
*/
|
|
@@ -992,7 +1000,7 @@ interface OAuthFlowObject$1 {
|
|
|
992
1000
|
*
|
|
993
1001
|
* This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
|
|
994
1002
|
*/
|
|
995
|
-
interface OAuthFlowsObject$1 {
|
|
1003
|
+
interface OAuthFlowsObject$1 extends SpecificationExtensions$2 {
|
|
996
1004
|
/**
|
|
997
1005
|
* Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.
|
|
998
1006
|
*/
|
|
@@ -1059,7 +1067,7 @@ interface OAuthFlowsObject$1 {
|
|
|
1059
1067
|
* - read:pets
|
|
1060
1068
|
* ```
|
|
1061
1069
|
*/
|
|
1062
|
-
interface OperationObject {
|
|
1070
|
+
interface OperationObject extends SpecificationExtensions$2 {
|
|
1063
1071
|
/**
|
|
1064
1072
|
* A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Object} that describes a request that may be initiated by the API provider and the expected responses.
|
|
1065
1073
|
*/
|
|
@@ -1206,7 +1214,7 @@ interface OperationObject {
|
|
|
1206
1214
|
* type: number
|
|
1207
1215
|
* ```
|
|
1208
1216
|
*/
|
|
1209
|
-
interface ParameterObject {
|
|
1217
|
+
interface ParameterObject extends SpecificationExtensions$2 {
|
|
1210
1218
|
/**
|
|
1211
1219
|
* Sets the ability to pass empty-valued parameters. This is valid only for `query` parameters and allows sending a parameter with an empty value. Default value is `false`. If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameterStyle `style`} is used, and if behavior is `n/a` (cannot be serialized), the value of `allowEmptyValue` SHALL be ignored. Use of this property is NOT RECOMMENDED, as it is likely to be removed in a later revision.
|
|
1212
1220
|
*/
|
|
@@ -1301,7 +1309,7 @@ interface ParameterObject {
|
|
|
1301
1309
|
* style: simple
|
|
1302
1310
|
* ```
|
|
1303
1311
|
*/
|
|
1304
|
-
interface PathItemObject$2 {
|
|
1312
|
+
interface PathItemObject$2 extends SpecificationExtensions$2 {
|
|
1305
1313
|
/**
|
|
1306
1314
|
* Allows for a referenced definition of this path item. The referenced structure MUST be in the form of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object Path Item Object}. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#relative-references-in-uris Relative References}.
|
|
1307
1315
|
*/
|
|
@@ -1400,7 +1408,7 @@ interface PathItemObject$2 {
|
|
|
1400
1408
|
* $ref: '#/components/schemas/pet'
|
|
1401
1409
|
* ```
|
|
1402
1410
|
*/
|
|
1403
|
-
interface PathsObject$2 {
|
|
1411
|
+
interface PathsObject$2 extends SpecificationExtensions$2 {
|
|
1404
1412
|
/**
|
|
1405
1413
|
* A relative path to an individual endpoint. The field name MUST begin with a forward slash (`/`). The path is **appended** (no relative URL resolution) to the expanded URL from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#server-object `Server Object`}'s `url` field in order to construct the full URL. {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating Path templating} is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use.
|
|
1406
1414
|
*/
|
|
@@ -1503,7 +1511,7 @@ interface ReferenceObject$1 {
|
|
|
1503
1511
|
* type: string
|
|
1504
1512
|
* ```
|
|
1505
1513
|
*/
|
|
1506
|
-
interface RequestBodyObject {
|
|
1514
|
+
interface RequestBodyObject extends SpecificationExtensions$2 {
|
|
1507
1515
|
/**
|
|
1508
1516
|
* **REQUIRED**. The content of the request body. The key is a media type or {@link https://tools.ietf.org/html/rfc7231#appendix-D media type range} and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
|
|
1509
1517
|
*/
|
|
@@ -1578,7 +1586,7 @@ interface RequestBodyObject {
|
|
|
1578
1586
|
* description: object created
|
|
1579
1587
|
* ```
|
|
1580
1588
|
*/
|
|
1581
|
-
interface ResponseObject {
|
|
1589
|
+
interface ResponseObject extends SpecificationExtensions$2 {
|
|
1582
1590
|
/**
|
|
1583
1591
|
* A map containing descriptions of potential response payloads. The key is a media type or {@link https://datatracker.ietf.org/doc/html/rfc7231#appendix-D media type range} and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*
|
|
1584
1592
|
*/
|
|
@@ -1625,11 +1633,11 @@ interface ResponseObject {
|
|
|
1625
1633
|
* $ref: '#/components/schemas/ErrorModel'
|
|
1626
1634
|
* ```
|
|
1627
1635
|
*/
|
|
1628
|
-
interface ResponsesObject$2 {
|
|
1636
|
+
interface ResponsesObject$2 extends SpecificationExtensions$2 {
|
|
1629
1637
|
/**
|
|
1630
1638
|
* Any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#http-status-codes HTTP status code} can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. This field MUST be enclosed in quotation marks (for example, "200") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `[200-299]`. Only the following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
|
|
1631
1639
|
*/
|
|
1632
|
-
[httpStatusCode: string]: ResponseObject | ReferenceObject$1 | undefined;
|
|
1640
|
+
[httpStatusCode: string]: ResponseObject | ReferenceObject$1 | undefined | unknown;
|
|
1633
1641
|
/**
|
|
1634
1642
|
* The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.
|
|
1635
1643
|
*/
|
|
@@ -1659,7 +1667,7 @@ interface ResponsesObject$2 {
|
|
|
1659
1667
|
*
|
|
1660
1668
|
* This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}, though as noted, additional properties MAY omit the `x-` prefix within this object.
|
|
1661
1669
|
*/
|
|
1662
|
-
type SchemaObject = JsonSchemaDraft2020_12;
|
|
1670
|
+
type SchemaObject = JsonSchemaDraft2020_12 & SpecificationExtensions$2;
|
|
1663
1671
|
/**
|
|
1664
1672
|
* Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#componentsSecuritySchemes Security Schemes} under the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#components-object Components Object}.
|
|
1665
1673
|
*
|
|
@@ -1744,7 +1752,7 @@ interface SecurityRequirementObject$2 {
|
|
|
1744
1752
|
* read:pets: read your pets
|
|
1745
1753
|
* ```
|
|
1746
1754
|
*/
|
|
1747
|
-
type SecuritySchemeObject$2 = {
|
|
1755
|
+
type SecuritySchemeObject$2 = SpecificationExtensions$2 & {
|
|
1748
1756
|
/**
|
|
1749
1757
|
* A description for security scheme. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
1750
1758
|
*/
|
|
@@ -1810,7 +1818,7 @@ type SecuritySchemeObject$2 = {
|
|
|
1810
1818
|
* description: Development server
|
|
1811
1819
|
* ```
|
|
1812
1820
|
*/
|
|
1813
|
-
interface ServerObject$1 {
|
|
1821
|
+
interface ServerObject$1 extends SpecificationExtensions$2 {
|
|
1814
1822
|
/**
|
|
1815
1823
|
* An optional string describing the host designated by the URL. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
1816
1824
|
*/
|
|
@@ -1829,7 +1837,7 @@ interface ServerObject$1 {
|
|
|
1829
1837
|
*
|
|
1830
1838
|
* This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
|
|
1831
1839
|
*/
|
|
1832
|
-
interface ServerVariableObject$1 {
|
|
1840
|
+
interface ServerVariableObject$1 extends SpecificationExtensions$2 {
|
|
1833
1841
|
/**
|
|
1834
1842
|
* **REQUIRED**. The default value to use for substitution, which SHALL be sent if an alternate value is _not_ supplied. Note this behavior is different than the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#schema-object Schema Object's} treatment of default values, because in those cases parameter values are optional. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#serverVariableEnum `enum`} is defined, the value MUST exist in the enum's values.
|
|
1835
1843
|
*/
|
|
@@ -1854,7 +1862,7 @@ interface ServerVariableObject$1 {
|
|
|
1854
1862
|
* description: Pets operations
|
|
1855
1863
|
* ```
|
|
1856
1864
|
*/
|
|
1857
|
-
interface TagObject$2 {
|
|
1865
|
+
interface TagObject$2 extends SpecificationExtensions$2 {
|
|
1858
1866
|
/**
|
|
1859
1867
|
* A description for the tag. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
1860
1868
|
*/
|
|
@@ -2060,7 +2068,7 @@ interface TagObject$2 {
|
|
|
2060
2068
|
* </aliens>
|
|
2061
2069
|
* ```
|
|
2062
2070
|
*/
|
|
2063
|
-
interface XMLObject$2 {
|
|
2071
|
+
interface XMLObject$2 extends SpecificationExtensions$2 {
|
|
2064
2072
|
/**
|
|
2065
2073
|
* Declares whether the property definition translates to an attribute instead of an element. Default value is `false`.
|
|
2066
2074
|
*/
|
|
@@ -2107,7 +2115,7 @@ interface OpenApiSchemaExtensions {
|
|
|
2107
2115
|
//#endregion
|
|
2108
2116
|
//#region src/openApi/3.1.x/types/json-schema-draft-2020-12.d.ts
|
|
2109
2117
|
// TODO: left out some keywords related to structuring a complex schema and declaring a dialect
|
|
2110
|
-
interface JsonSchemaDraft2020_12 extends ArrayKeywords, NumberKeywords, ObjectKeywords, StringKeywords, EnumExtensions, OpenApiSchemaExtensions {
|
|
2118
|
+
interface JsonSchemaDraft2020_12 extends ArrayKeywords, NumberKeywords, ObjectKeywords, StringKeywords, EnumExtensions, OpenApiSchemaExtensions, SpecificationExtensions$2 {
|
|
2111
2119
|
/**
|
|
2112
2120
|
* The `$comment` {@link https://json-schema.org/learn/glossary#keyword keyword} is strictly intended for adding comments to a schema. Its value must always be a string. Unlike the annotations `title`, `description`, and `examples`, JSON schema {@link https://json-schema.org/learn/glossary#implementation implementations} aren't allowed to attach any meaning or behavior to it whatsoever, and may even strip them at any time. Therefore, they are useful for leaving notes to future editors of a JSON schema, but should not be used to communicate to users of the schema.
|
|
2113
2121
|
*/
|
|
@@ -2432,6 +2440,14 @@ type JsonSchemaTypes$1 = 'array' | 'boolean' | 'integer' | 'null' | 'number' | '
|
|
|
2432
2440
|
type IRMediaType = 'form-data' | 'json' | 'text' | 'url-search-params' | 'octet-stream';
|
|
2433
2441
|
//#endregion
|
|
2434
2442
|
//#region src/ir/types.d.ts
|
|
2443
|
+
/**
|
|
2444
|
+
* OpenAPI Specification Extensions.
|
|
2445
|
+
*
|
|
2446
|
+
* See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
|
|
2447
|
+
*/
|
|
2448
|
+
interface SpecificationExtensions$1 {
|
|
2449
|
+
[extension: `x-${string}`]: unknown;
|
|
2450
|
+
}
|
|
2435
2451
|
interface IRBodyObject {
|
|
2436
2452
|
mediaType: string;
|
|
2437
2453
|
/**
|
|
@@ -2448,7 +2464,7 @@ interface IRComponentsObject {
|
|
|
2448
2464
|
requestBodies?: Record<string, IRRequestBodyObject>;
|
|
2449
2465
|
schemas?: Record<string, IRSchemaObject>;
|
|
2450
2466
|
}
|
|
2451
|
-
interface IROperationObject {
|
|
2467
|
+
interface IROperationObject extends SpecificationExtensions$1 {
|
|
2452
2468
|
body?: IRBodyObject;
|
|
2453
2469
|
deprecated?: boolean;
|
|
2454
2470
|
description?: string;
|
|
@@ -2469,7 +2485,7 @@ interface IRParametersObject {
|
|
|
2469
2485
|
path?: Record<string, IRParameterObject>;
|
|
2470
2486
|
query?: Record<string, IRParameterObject>;
|
|
2471
2487
|
}
|
|
2472
|
-
interface IRParameterObject extends Pick<JsonSchemaDraft2020_12, 'deprecated' | 'description'
|
|
2488
|
+
interface IRParameterObject extends Pick<JsonSchemaDraft2020_12, 'deprecated' | 'description'>, SpecificationExtensions$1 {
|
|
2473
2489
|
/**
|
|
2474
2490
|
* Determines whether the parameter value SHOULD allow reserved characters, as defined by RFC3986 `:/?#[]@!$&'()*+,;=` to be included without percent-encoding. The default value is `false`. This property SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded` or `multipart/form-data`. If a value is explicitly defined, then the value of `contentType` (implicit or explicit) SHALL be ignored.
|
|
2475
2491
|
*/
|
|
@@ -2527,7 +2543,7 @@ interface IRResponseObject {
|
|
|
2527
2543
|
mediaType?: string;
|
|
2528
2544
|
schema: IRSchemaObject;
|
|
2529
2545
|
}
|
|
2530
|
-
interface IRSchemaObject extends Pick<JsonSchemaDraft2020_12, '$ref' | 'const' | 'default' | 'deprecated' | 'description' | 'exclusiveMaximum' | 'exclusiveMinimum' | 'maximum' | 'maxItems' | 'maxLength' | 'minimum' | 'minItems' | 'minLength' | 'pattern' | 'required' | 'title' | 'example'
|
|
2546
|
+
interface IRSchemaObject extends Pick<JsonSchemaDraft2020_12, '$ref' | 'const' | 'default' | 'deprecated' | 'description' | 'exclusiveMaximum' | 'exclusiveMinimum' | 'maximum' | 'maxItems' | 'maxLength' | 'minimum' | 'minItems' | 'minLength' | 'pattern' | 'required' | 'title' | 'example'>, SpecificationExtensions$1 {
|
|
2531
2547
|
/**
|
|
2532
2548
|
* If the schema is intended to be used as an object property, it can be
|
|
2533
2549
|
* marked as read-only or write-only. This value controls whether the schema
|
|
@@ -5617,12 +5633,20 @@ interface OpenApiV2_0_XTypes {
|
|
|
5617
5633
|
}
|
|
5618
5634
|
//#endregion
|
|
5619
5635
|
//#region src/openApi/3.0.x/types/spec.d.ts
|
|
5636
|
+
/**
|
|
5637
|
+
* OpenAPI Specification Extensions.
|
|
5638
|
+
*
|
|
5639
|
+
* See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
|
|
5640
|
+
*/
|
|
5641
|
+
interface SpecificationExtensions {
|
|
5642
|
+
[extension: `x-${string}`]: unknown;
|
|
5643
|
+
}
|
|
5620
5644
|
/**
|
|
5621
5645
|
* This is the root object of the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#openapi-description OpenAPI Description}.
|
|
5622
5646
|
*
|
|
5623
5647
|
* This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
|
|
5624
5648
|
*/
|
|
5625
|
-
interface OpenApiV3_0_X {
|
|
5649
|
+
interface OpenApiV3_0_X extends SpecificationExtensions {
|
|
5626
5650
|
/**
|
|
5627
5651
|
* An element to hold various Objects for the OpenAPI Description.
|
|
5628
5652
|
*/
|
|
@@ -5663,11 +5687,11 @@ interface OpenApiV3_0_X {
|
|
|
5663
5687
|
*
|
|
5664
5688
|
* TODO: examples
|
|
5665
5689
|
*/
|
|
5666
|
-
interface CallbackObject {
|
|
5690
|
+
interface CallbackObject extends SpecificationExtensions {
|
|
5667
5691
|
/**
|
|
5668
5692
|
* A Path Item Object used to define a callback request and expected responses. A {@link https://learn.openapis.org/examples/v3.0/callback-example.html complete example} is available.
|
|
5669
5693
|
*/
|
|
5670
|
-
[expression: string]: PathItemObject | ReferenceObject$2;
|
|
5694
|
+
[expression: string]: PathItemObject | ReferenceObject$2 | unknown;
|
|
5671
5695
|
}
|
|
5672
5696
|
/**
|
|
5673
5697
|
* Holds a set of reusable objects for different aspects of the OAS. All objects defined within the Components Object will have no effect on the API unless they are explicitly referenced from outside the Components Object.
|
|
@@ -5678,7 +5702,7 @@ interface CallbackObject {
|
|
|
5678
5702
|
*
|
|
5679
5703
|
* TODO: examples
|
|
5680
5704
|
*/
|
|
5681
|
-
interface ComponentsObject {
|
|
5705
|
+
interface ComponentsObject extends SpecificationExtensions {
|
|
5682
5706
|
/**
|
|
5683
5707
|
* An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#callback-object Callback Objects}.
|
|
5684
5708
|
*/
|
|
@@ -5727,7 +5751,7 @@ interface ComponentsObject {
|
|
|
5727
5751
|
* email: support@example.com
|
|
5728
5752
|
* ```
|
|
5729
5753
|
*/
|
|
5730
|
-
interface ContactObject {
|
|
5754
|
+
interface ContactObject extends SpecificationExtensions {
|
|
5731
5755
|
/**
|
|
5732
5756
|
* The email address of the contact person/organization. This MUST be in the form of an email address.
|
|
5733
5757
|
*/
|
|
@@ -5772,7 +5796,7 @@ interface DiscriminatorObject {
|
|
|
5772
5796
|
* TODO: default values examples
|
|
5773
5797
|
* TODO: examples
|
|
5774
5798
|
*/
|
|
5775
|
-
interface EncodingObject {
|
|
5799
|
+
interface EncodingObject extends SpecificationExtensions {
|
|
5776
5800
|
/**
|
|
5777
5801
|
* When this is true, parameter values are serialized using reserved expansion, as defined by {@link https://datatracker.ietf.org/doc/html/rfc6570#section-3.2.3 RFC6570}, which allows {@link https://datatracker.ietf.org/doc/html/rfc3986#section-2.2 RFC3986's reserved character set}, as well as percent-encoded triples, to pass through unchanged, while still percent-encoding all other disallowed characters (including `%` outside of percent-encoded triples). Applications are still responsible for percent-encoding reserved characters that are {@link https://datatracker.ietf.org/doc/html/rfc3986#section-3.4 not allowed in the query string} (`[`, `]`, `#`), or have a special meaning in `application/x-www-form-urlencoded` (`-`, `&`, `+`); see Appendices {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-c-using-rfc6570-based-serialization C} and {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#appendix-e-percent-encoding-and-form-media-types E} for details. The default value is `false`. This field SHALL be ignored if the request body media type is not `application/x-www-form-urlencoded`.
|
|
5778
5802
|
*/
|
|
@@ -5805,7 +5829,7 @@ interface EncodingObject {
|
|
|
5805
5829
|
*
|
|
5806
5830
|
* TODO: examples
|
|
5807
5831
|
*/
|
|
5808
|
-
interface ExampleObject {
|
|
5832
|
+
interface ExampleObject extends SpecificationExtensions {
|
|
5809
5833
|
/**
|
|
5810
5834
|
* Long description for the example. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
5811
5835
|
*/
|
|
@@ -5835,7 +5859,7 @@ interface ExampleObject {
|
|
|
5835
5859
|
* url: https://example.com
|
|
5836
5860
|
* ```
|
|
5837
5861
|
*/
|
|
5838
|
-
interface ExternalDocumentationObject {
|
|
5862
|
+
interface ExternalDocumentationObject extends SpecificationExtensions {
|
|
5839
5863
|
/**
|
|
5840
5864
|
* A description of the target documentation. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
5841
5865
|
*/
|
|
@@ -5877,7 +5901,7 @@ type HeaderObject = Omit<ParameterObject$1, 'in' | 'name'>;
|
|
|
5877
5901
|
* version: 1.0.1
|
|
5878
5902
|
* ```
|
|
5879
5903
|
*/
|
|
5880
|
-
interface InfoObject$1 {
|
|
5904
|
+
interface InfoObject$1 extends SpecificationExtensions {
|
|
5881
5905
|
/**
|
|
5882
5906
|
* The contact information for the exposed API.
|
|
5883
5907
|
*/
|
|
@@ -5913,7 +5937,7 @@ interface InfoObject$1 {
|
|
|
5913
5937
|
* url: https://www.apache.org/licenses/LICENSE-2.0.html
|
|
5914
5938
|
* ```
|
|
5915
5939
|
*/
|
|
5916
|
-
interface LicenseObject {
|
|
5940
|
+
interface LicenseObject extends SpecificationExtensions {
|
|
5917
5941
|
/**
|
|
5918
5942
|
* **REQUIRED**. The license name used for the API.
|
|
5919
5943
|
*/
|
|
@@ -5938,7 +5962,7 @@ interface LicenseObject {
|
|
|
5938
5962
|
*
|
|
5939
5963
|
* TODO: examples
|
|
5940
5964
|
*/
|
|
5941
|
-
interface LinkObject {
|
|
5965
|
+
interface LinkObject extends SpecificationExtensions {
|
|
5942
5966
|
/**
|
|
5943
5967
|
* A description of the link. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
5944
5968
|
*/
|
|
@@ -5973,7 +5997,7 @@ interface LinkObject {
|
|
|
5973
5997
|
*
|
|
5974
5998
|
* TODO: examples
|
|
5975
5999
|
*/
|
|
5976
|
-
interface MediaTypeObject {
|
|
6000
|
+
interface MediaTypeObject extends SpecificationExtensions {
|
|
5977
6001
|
/**
|
|
5978
6002
|
* A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The `encoding` field SHALL only apply to {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#request-body-object Request Body Objects}, and only when the media type is `multipart` or `application/x-www-form-urlencoded`. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object.
|
|
5979
6003
|
*/
|
|
@@ -5998,7 +6022,7 @@ interface MediaTypeObject {
|
|
|
5998
6022
|
*
|
|
5999
6023
|
* TODO: examples
|
|
6000
6024
|
*/
|
|
6001
|
-
interface OAuthFlowObject {
|
|
6025
|
+
interface OAuthFlowObject extends SpecificationExtensions {
|
|
6002
6026
|
/**
|
|
6003
6027
|
* **REQUIRED (`"implicit"`, `"authorizationCode"`)**. The authorization URL to be used for this flow. This MUST be in the form of a URL. The OAuth2 standard requires the use of TLS.
|
|
6004
6028
|
*/
|
|
@@ -6021,7 +6045,7 @@ interface OAuthFlowObject {
|
|
|
6021
6045
|
*
|
|
6022
6046
|
* This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
|
|
6023
6047
|
*/
|
|
6024
|
-
interface OAuthFlowsObject {
|
|
6048
|
+
interface OAuthFlowsObject extends SpecificationExtensions {
|
|
6025
6049
|
/**
|
|
6026
6050
|
* Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.
|
|
6027
6051
|
*/
|
|
@@ -6046,7 +6070,7 @@ interface OAuthFlowsObject {
|
|
|
6046
6070
|
*
|
|
6047
6071
|
* TODO: examples
|
|
6048
6072
|
*/
|
|
6049
|
-
interface OperationObject$1 {
|
|
6073
|
+
interface OperationObject$1 extends SpecificationExtensions {
|
|
6050
6074
|
/**
|
|
6051
6075
|
* A map of possible out-of band callbacks related to the parent operation. The key is a unique identifier for the Callback Object. Each value in the map is a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#callback-object Callback Object} that describes a request that may be initiated by the API provider and the expected responses.
|
|
6052
6076
|
*/
|
|
@@ -6140,7 +6164,7 @@ interface OperationObject$1 {
|
|
|
6140
6164
|
*
|
|
6141
6165
|
* TODO: examples
|
|
6142
6166
|
*/
|
|
6143
|
-
interface ParameterObject$1 {
|
|
6167
|
+
interface ParameterObject$1 extends SpecificationExtensions {
|
|
6144
6168
|
/**
|
|
6145
6169
|
* If `true`, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted entirely, which the server SHOULD interpret as the parameter being unused. Default value is `false`. If {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#parameter-style `style`} is used, and if {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#style-examples behavior is _n/a_ (cannot be serialized)}, the value of `allowEmptyValue` SHALL be ignored. Interactions between this field and the parameter's {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object} are implementation-defined. This field is valid only for `query` parameters. Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision.
|
|
6146
6170
|
*/
|
|
@@ -6204,7 +6228,7 @@ interface ParameterObject$1 {
|
|
|
6204
6228
|
*
|
|
6205
6229
|
* TODO: examples
|
|
6206
6230
|
*/
|
|
6207
|
-
interface PathItemObject {
|
|
6231
|
+
interface PathItemObject extends SpecificationExtensions {
|
|
6208
6232
|
/**
|
|
6209
6233
|
* Allows for a referenced definition of this path item. The value MUST be in the form of a URL, and the referenced structure MUST be in the form of a {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-item-object Path Item Object}. In case a Path Item Object field appears both in the defined object and the referenced object, the behavior is undefined. See the rules for resolving {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#relative-references-in-urls Relative References}.
|
|
6210
6234
|
*/
|
|
@@ -6265,7 +6289,7 @@ interface PathItemObject {
|
|
|
6265
6289
|
*
|
|
6266
6290
|
* TODO: examples
|
|
6267
6291
|
*/
|
|
6268
|
-
interface PathsObject {
|
|
6292
|
+
interface PathsObject extends SpecificationExtensions {
|
|
6269
6293
|
/**
|
|
6270
6294
|
* A relative path to an individual endpoint. The field name MUST begin with a forward slash (`/`). The path is **appended** (no relative URL resolution) to the expanded URL from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#server-object Server Object}'s `url` field in order to construct the full URL. {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#path-templating Path templating} is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use.
|
|
6271
6295
|
*/
|
|
@@ -6311,7 +6335,7 @@ interface ReferenceObject$2 {
|
|
|
6311
6335
|
*
|
|
6312
6336
|
* TODO: examples
|
|
6313
6337
|
*/
|
|
6314
|
-
interface RequestBodyObject$1 {
|
|
6338
|
+
interface RequestBodyObject$1 extends SpecificationExtensions {
|
|
6315
6339
|
/**
|
|
6316
6340
|
* **REQUIRED**. The content of the request body. The key is a media type or {@link https://tools.ietf.org/html/rfc7231#appendix-D media type range} and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"`
|
|
6317
6341
|
*/
|
|
@@ -6332,7 +6356,7 @@ interface RequestBodyObject$1 {
|
|
|
6332
6356
|
*
|
|
6333
6357
|
* TODO: examples
|
|
6334
6358
|
*/
|
|
6335
|
-
interface ResponseObject$1 {
|
|
6359
|
+
interface ResponseObject$1 extends SpecificationExtensions {
|
|
6336
6360
|
/**
|
|
6337
6361
|
* A map containing descriptions of potential response payloads. The key is a media type or {@link https://tools.ietf.org/html/rfc7231#appendix-D media type range} and the value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"`
|
|
6338
6362
|
*/
|
|
@@ -6363,11 +6387,11 @@ interface ResponseObject$1 {
|
|
|
6363
6387
|
*
|
|
6364
6388
|
* TODO: examples
|
|
6365
6389
|
*/
|
|
6366
|
-
interface ResponsesObject {
|
|
6390
|
+
interface ResponsesObject extends SpecificationExtensions {
|
|
6367
6391
|
/**
|
|
6368
6392
|
* Any {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#http-status-codes HTTP status code} can be used as the property name, but only one property per code, to describe the expected response for that HTTP status code. A {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} can link to a response that is defined in the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-responses OpenAPI Object's `components.responses`} section. This field MUST be enclosed in quotation marks (for example, "200") for compatibility between JSON and YAML. To define a range of response codes, this field MAY contain the uppercase wildcard character `X`. For example, `2XX` represents all response codes between `200` and `299`. Only the following range definitions are allowed: `1XX`, `2XX`, `3XX`, `4XX`, and `5XX`. If a response is defined using an explicit code, the explicit code definition takes precedence over the range definition for that code.
|
|
6369
6393
|
*/
|
|
6370
|
-
[httpStatusCode: string]: ResponseObject$1 | ReferenceObject$2 | undefined;
|
|
6394
|
+
[httpStatusCode: string]: ResponseObject$1 | ReferenceObject$2 | undefined | unknown;
|
|
6371
6395
|
/**
|
|
6372
6396
|
* The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses. A {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#reference-object Reference Object} can link to a response that the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#components-responses OpenAPI Object's `components.responses`} section defines.
|
|
6373
6397
|
*/
|
|
@@ -6424,7 +6448,7 @@ interface ResponsesObject {
|
|
|
6424
6448
|
*
|
|
6425
6449
|
* TODO: content, examples
|
|
6426
6450
|
*/
|
|
6427
|
-
interface SchemaObject$1 extends EnumExtensions {
|
|
6451
|
+
interface SchemaObject$1 extends EnumExtensions, SpecificationExtensions {
|
|
6428
6452
|
/**
|
|
6429
6453
|
* The value of "additionalProperties" MUST be a boolean or a schema.
|
|
6430
6454
|
*
|
|
@@ -6675,7 +6699,7 @@ interface SecurityRequirementObject {
|
|
|
6675
6699
|
*
|
|
6676
6700
|
* TODO: examples
|
|
6677
6701
|
*/
|
|
6678
|
-
type SecuritySchemeObject = {
|
|
6702
|
+
type SecuritySchemeObject = SpecificationExtensions & {
|
|
6679
6703
|
/**
|
|
6680
6704
|
* A description for security scheme. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
6681
6705
|
*/
|
|
@@ -6732,7 +6756,7 @@ type SecuritySchemeObject = {
|
|
|
6732
6756
|
*
|
|
6733
6757
|
* TODO: examples
|
|
6734
6758
|
*/
|
|
6735
|
-
interface ServerObject {
|
|
6759
|
+
interface ServerObject extends SpecificationExtensions {
|
|
6736
6760
|
/**
|
|
6737
6761
|
* An optional string describing the host designated by the URL. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
6738
6762
|
*/
|
|
@@ -6751,7 +6775,7 @@ interface ServerObject {
|
|
|
6751
6775
|
*
|
|
6752
6776
|
* This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
|
|
6753
6777
|
*/
|
|
6754
|
-
interface ServerVariableObject {
|
|
6778
|
+
interface ServerVariableObject extends SpecificationExtensions {
|
|
6755
6779
|
/**
|
|
6756
6780
|
* **REQUIRED**. The default value to use for substitution, which SHALL be sent if an alternate value is _not_ supplied. If the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#server-variable-enum `enum`} is defined, the value SHOULD exist in the enum's values. Note that this behavior is different from the {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#schema-object Schema Object}'s `default` keyword, which documents the receiver's behavior rather than inserting the value into the data.
|
|
6757
6781
|
*/
|
|
@@ -6777,7 +6801,7 @@ interface ServerVariableObject {
|
|
|
6777
6801
|
* description: Pets operations
|
|
6778
6802
|
* ```
|
|
6779
6803
|
*/
|
|
6780
|
-
interface TagObject {
|
|
6804
|
+
interface TagObject extends SpecificationExtensions {
|
|
6781
6805
|
/**
|
|
6782
6806
|
* A description for the tag. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
|
|
6783
6807
|
*/
|
|
@@ -6805,7 +6829,7 @@ interface TagObject {
|
|
|
6805
6829
|
*
|
|
6806
6830
|
* TODO: examples
|
|
6807
6831
|
*/
|
|
6808
|
-
interface XMLObject {
|
|
6832
|
+
interface XMLObject extends SpecificationExtensions {
|
|
6809
6833
|
/**
|
|
6810
6834
|
* Declares whether the property definition translates to an attribute instead of an element. Default value is `false`.
|
|
6811
6835
|
*/
|
|
@@ -7121,10 +7145,8 @@ type Config$13 = Plugin.Name<'@hey-api/sdk'> & Plugin.Hooks & {
|
|
|
7121
7145
|
* Set `instance` to create an instantiable SDK. Using `true` will use the
|
|
7122
7146
|
* default instance name; in practice, you want to define your own by passing
|
|
7123
7147
|
* a string value.
|
|
7124
|
-
*
|
|
7125
|
-
* @default false
|
|
7126
7148
|
*/
|
|
7127
|
-
instance: string
|
|
7149
|
+
instance: string;
|
|
7128
7150
|
/**
|
|
7129
7151
|
* Customise the name of methods within the service. By default,
|
|
7130
7152
|
* {@link IR.OperationObject.id} is used.
|
|
@@ -7224,8 +7246,8 @@ declare abstract class TsDsl<T extends ts.Node = ts.Node> implements Node<T> {
|
|
|
7224
7246
|
parent?: Node;
|
|
7225
7247
|
root?: Node;
|
|
7226
7248
|
symbol?: Symbol;
|
|
7227
|
-
toAst(): T;
|
|
7228
|
-
readonly '~brand'
|
|
7249
|
+
toAst(_: AstContext): T;
|
|
7250
|
+
readonly '~brand' = "heyapi.node";
|
|
7229
7251
|
/** Branding property to identify the DSL class at runtime. */
|
|
7230
7252
|
abstract readonly '~dsl': string;
|
|
7231
7253
|
/** Conditionally applies a callback to this builder. */
|
|
@@ -7233,8 +7255,8 @@ declare abstract class TsDsl<T extends ts.Node = ts.Node> implements Node<T> {
|
|
|
7233
7255
|
$if<T extends TsDsl, V, R extends TsDsl = T>(this: T, value: V, ifTrue: (v: Exclude<V, false | null | undefined>) => R | void, ifFalse?: (v: Extract<V, false | null | undefined>) => R | void): R | T;
|
|
7234
7256
|
$if<T extends TsDsl, V, R extends TsDsl = T>(this: T, value: V, ifTrue: () => R | void, ifFalse?: () => R | void): R | T;
|
|
7235
7257
|
protected $maybeId<T extends string | ts.Expression>(expr: T): T extends string ? ts.Identifier : T;
|
|
7236
|
-
protected $node<I>(value: I): NodeOfMaybe<I>;
|
|
7237
|
-
protected $type<I>(value: I, args?: ReadonlyArray<ts.TypeNode>): TypeOfMaybe<I>;
|
|
7258
|
+
protected $node<I>(ctx: AstContext, value: I): NodeOfMaybe<I>;
|
|
7259
|
+
protected $type<I>(ctx: AstContext, value: I, args?: ReadonlyArray<ts.TypeNode>): TypeOfMaybe<I>;
|
|
7238
7260
|
/** Unwraps nested nodes into raw TypeScript AST. */
|
|
7239
7261
|
private unwrap;
|
|
7240
7262
|
}
|
|
@@ -7246,19 +7268,9 @@ type TypeOfMaybe<I> = undefined extends I ? TypeOf<NonNullable<FromRef<I>>> | un
|
|
|
7246
7268
|
type TypeOf<I> = I extends ReadonlyArray<infer U> ? ReadonlyArray<TypeOf<U>> : I extends string ? ts.TypeNode : I extends boolean ? ts.LiteralTypeNode : I extends TsDsl<infer N> ? N : I extends ts.TypeNode ? I : never;
|
|
7247
7269
|
//#endregion
|
|
7248
7270
|
//#region src/ts-dsl/mixins/types.d.ts
|
|
7249
|
-
type BaseCtor<T> = abstract new (...args: any
|
|
7250
|
-
type
|
|
7251
|
-
|
|
7252
|
-
//#region src/ts-dsl/mixins/type-args.d.ts
|
|
7253
|
-
type Arg$1 = Symbol | string | MaybeTsDsl<TypeTsDsl>;
|
|
7254
|
-
interface TypeArgsMethods extends Node {
|
|
7255
|
-
/** Returns the type arguments as an array of ts.TypeNode nodes. */
|
|
7256
|
-
$generics(): ReadonlyArray<ts.TypeNode> | undefined;
|
|
7257
|
-
/** Adds a single type argument (e.g. `string` in `Foo<string>`). */
|
|
7258
|
-
generic(arg: Arg$1): this;
|
|
7259
|
-
/** Adds type arguments (e.g. `Map<string, number>`). */
|
|
7260
|
-
generics(...args: ReadonlyArray<Arg$1>): this;
|
|
7261
|
-
}
|
|
7271
|
+
type BaseCtor<T> = abstract new (...args: Array<any>) => TsDsl<T>;
|
|
7272
|
+
type DropFirst<T extends Array<any>> = T extends [any, ...infer Rest] ? Rest : never;
|
|
7273
|
+
type MixinCtor<T extends BaseCtor<any>, K$1> = abstract new (...args: Array<any>) => InstanceType<T> & K$1;
|
|
7262
7274
|
//#endregion
|
|
7263
7275
|
//#region src/ts-dsl/mixins/optional.d.ts
|
|
7264
7276
|
interface OptionalMethods extends Node {
|
|
@@ -7269,31 +7281,18 @@ interface OptionalMethods extends Node {
|
|
|
7269
7281
|
required(condition?: boolean): this;
|
|
7270
7282
|
}
|
|
7271
7283
|
//#endregion
|
|
7272
|
-
//#region src/ts-dsl/expr/as.d.ts
|
|
7273
|
-
type AsExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7274
|
-
type AsType = Symbol | string | TypeTsDsl;
|
|
7275
|
-
declare const Mixed$52: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.AsExpression>, ExprMethods>, AsMethods>;
|
|
7276
|
-
declare class AsTsDsl extends Mixed$52 {
|
|
7277
|
-
readonly '~dsl' = "AsTsDsl";
|
|
7278
|
-
protected expr: Ref<AsExpr>;
|
|
7279
|
-
protected type: Ref<AsType>;
|
|
7280
|
-
constructor(expr: AsExpr, type: AsType);
|
|
7281
|
-
analyze(ctx: AnalysisContext): void;
|
|
7282
|
-
toAst(): ts.AsExpression;
|
|
7283
|
-
}
|
|
7284
|
-
//#endregion
|
|
7285
7284
|
//#region src/ts-dsl/mixins/as.d.ts
|
|
7286
7285
|
interface AsMethods extends Node {
|
|
7287
7286
|
/** Creates an `as` type assertion expression (e.g. `value as Type`). */
|
|
7288
|
-
as(
|
|
7287
|
+
as(...args: DropFirst<Parameters<typeof f.as>>): ReturnType<typeof f.as>;
|
|
7289
7288
|
}
|
|
7290
7289
|
//#endregion
|
|
7291
7290
|
//#region src/ts-dsl/expr/binary.d.ts
|
|
7292
7291
|
type Expr$3 = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7293
7292
|
type Op$1 = Operator | ts.BinaryOperator;
|
|
7294
|
-
type Operator = '!=' | '!==' | '&&' | '*' | '+' | '-' | '/' | '<' | '<=' | '=' | '==' | '===' | '>' | '>=' | '??' | '||';
|
|
7295
|
-
declare const Mixed$
|
|
7296
|
-
declare class BinaryTsDsl extends Mixed$
|
|
7293
|
+
type Operator = '!=' | '!==' | '&&' | '*' | '+' | '-' | '/' | '<' | '<=' | '=' | '==' | '===' | '>' | '>=' | '??' | '??=' | '||';
|
|
7294
|
+
declare const Mixed$52: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.BinaryExpression>, ExprMethods>, AsMethods>;
|
|
7295
|
+
declare class BinaryTsDsl extends Mixed$52 {
|
|
7297
7296
|
readonly '~dsl' = "BinaryTsDsl";
|
|
7298
7297
|
protected _base: Ref<Expr$3>;
|
|
7299
7298
|
protected _expr?: Ref<Expr$3>;
|
|
@@ -7326,13 +7325,15 @@ declare class BinaryTsDsl extends Mixed$51 {
|
|
|
7326
7325
|
minus(expr: Expr$3): this;
|
|
7327
7326
|
/** Strict inequality — `this !== expr` */
|
|
7328
7327
|
neq(expr: Expr$3): this;
|
|
7328
|
+
/** Nullish assignment — `this ??= expr` */
|
|
7329
|
+
nullishAssign(expr: Expr$3): this;
|
|
7329
7330
|
/** Logical OR — `this || expr` */
|
|
7330
7331
|
or(expr: Expr$3): this;
|
|
7331
7332
|
/** Addition — `this + expr` */
|
|
7332
7333
|
plus(expr: Expr$3): this;
|
|
7333
7334
|
/** Multiplication — `this * expr` */
|
|
7334
7335
|
times(expr: Expr$3): this;
|
|
7335
|
-
toAst(): ts.BinaryExpression;
|
|
7336
|
+
toAst(ctx: AstContext): ts.BinaryExpression;
|
|
7336
7337
|
/** Sets the binary operator and right-hand operand for this expression. */
|
|
7337
7338
|
private opAndExpr;
|
|
7338
7339
|
private opToToken;
|
|
@@ -7367,6 +7368,8 @@ interface OperatorMethods extends Node {
|
|
|
7367
7368
|
minus(expr: Expr$2): BinaryTsDsl;
|
|
7368
7369
|
/** Strict inequality — `this !== expr` */
|
|
7369
7370
|
neq(expr: Expr$2): BinaryTsDsl;
|
|
7371
|
+
/** Nullish assignment — `this ??= expr` */
|
|
7372
|
+
nullishAssign(expr: Expr$2): BinaryTsDsl;
|
|
7370
7373
|
/** Logical OR — `this || expr` */
|
|
7371
7374
|
or(expr: Expr$2): BinaryTsDsl;
|
|
7372
7375
|
/** Addition — `this + expr` */
|
|
@@ -7378,55 +7381,45 @@ interface OperatorMethods extends Node {
|
|
|
7378
7381
|
//#region src/ts-dsl/expr/attr.d.ts
|
|
7379
7382
|
type AttrLeft = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7380
7383
|
type AttrRight = Symbol | string | ts.MemberName | number;
|
|
7381
|
-
|
|
7382
|
-
declare
|
|
7384
|
+
type AttrCtor = (left: AttrLeft, right: AttrRight) => AttrTsDsl;
|
|
7385
|
+
declare const Mixed$51: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyAccessExpression | ts.ElementAccessExpression>, OptionalMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
|
|
7386
|
+
declare class AttrTsDsl extends Mixed$51 {
|
|
7383
7387
|
readonly '~dsl' = "AttrTsDsl";
|
|
7384
7388
|
protected left: Ref<AttrLeft>;
|
|
7385
7389
|
protected right: Ref<AttrRight>;
|
|
7386
7390
|
constructor(left: AttrLeft, right: AttrRight);
|
|
7387
7391
|
analyze(ctx: AnalysisContext): void;
|
|
7388
|
-
toAst(): ts.PropertyAccessExpression | ts.ElementAccessExpression;
|
|
7392
|
+
toAst(ctx: AstContext): ts.PropertyAccessExpression | ts.ElementAccessExpression;
|
|
7389
7393
|
}
|
|
7390
7394
|
//#endregion
|
|
7391
7395
|
//#region src/ts-dsl/expr/await.d.ts
|
|
7392
7396
|
type AwaitExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7393
|
-
|
|
7394
|
-
declare
|
|
7397
|
+
type AwaitCtor = (expr: AwaitExpr) => AwaitTsDsl;
|
|
7398
|
+
declare const Mixed$50: MixinCtor<abstract new () => TsDsl<ts.AwaitExpression>, ExprMethods>;
|
|
7399
|
+
declare class AwaitTsDsl extends Mixed$50 {
|
|
7395
7400
|
readonly '~dsl' = "AwaitTsDsl";
|
|
7396
7401
|
protected _awaitExpr: Ref<AwaitExpr>;
|
|
7397
7402
|
constructor(expr: AwaitExpr);
|
|
7398
7403
|
analyze(ctx: AnalysisContext): void;
|
|
7399
|
-
toAst(): ts.AwaitExpression;
|
|
7400
|
-
}
|
|
7401
|
-
//#endregion
|
|
7402
|
-
//#region src/ts-dsl/stmt/return.d.ts
|
|
7403
|
-
type ReturnExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7404
|
-
declare const Mixed$48: abstract new () => TsDsl<ts.ReturnStatement>;
|
|
7405
|
-
declare class ReturnTsDsl extends Mixed$48 {
|
|
7406
|
-
readonly '~dsl' = "ReturnTsDsl";
|
|
7407
|
-
protected _returnExpr?: Ref<ReturnExpr>;
|
|
7408
|
-
constructor(expr?: ReturnExpr);
|
|
7409
|
-
analyze(ctx: AnalysisContext): void;
|
|
7410
|
-
toAst(): ts.ReturnStatement;
|
|
7404
|
+
toAst(ctx: AstContext): ts.AwaitExpression;
|
|
7411
7405
|
}
|
|
7412
7406
|
//#endregion
|
|
7413
|
-
//#region src/ts-dsl/mixins/
|
|
7414
|
-
|
|
7415
|
-
|
|
7416
|
-
|
|
7417
|
-
|
|
7418
|
-
|
|
7419
|
-
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
return(): ReturnTsDsl;
|
|
7407
|
+
//#region src/ts-dsl/mixins/type-args.d.ts
|
|
7408
|
+
type Arg$1 = Symbol | string | MaybeTsDsl<TypeTsDsl>;
|
|
7409
|
+
interface TypeArgsMethods extends Node {
|
|
7410
|
+
/** Returns the type arguments as an array of ts.TypeNode nodes. */
|
|
7411
|
+
$generics(ctx: AstContext): ReadonlyArray<ts.TypeNode> | undefined;
|
|
7412
|
+
/** Adds a single type argument (e.g. `string` in `Foo<string>`). */
|
|
7413
|
+
generic(arg: Arg$1): this;
|
|
7414
|
+
/** Adds type arguments (e.g. `Map<string, number>`). */
|
|
7415
|
+
generics(...args: ReadonlyArray<Arg$1>): this;
|
|
7423
7416
|
}
|
|
7424
7417
|
//#endregion
|
|
7425
7418
|
//#region src/ts-dsl/mixins/args.d.ts
|
|
7426
7419
|
type Arg = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7427
7420
|
interface ArgsMethods extends Node {
|
|
7428
7421
|
/** Renders the arguments into an array of `Expression`s. */
|
|
7429
|
-
$args(): ReadonlyArray<ts.Expression>;
|
|
7422
|
+
$args(ctx: AstContext): ReadonlyArray<ts.Expression>;
|
|
7430
7423
|
/** Adds a single expression argument. */
|
|
7431
7424
|
arg(arg: Arg | undefined): this;
|
|
7432
7425
|
/** Adds one or more expression arguments. */
|
|
@@ -7437,13 +7430,259 @@ interface ArgsMethods extends Node {
|
|
|
7437
7430
|
type CallCallee = string | MaybeTsDsl<ts.Expression>;
|
|
7438
7431
|
type CallArg = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7439
7432
|
type CallArgs = ReadonlyArray<CallArg | undefined>;
|
|
7440
|
-
|
|
7441
|
-
declare
|
|
7433
|
+
type CallCtor = (callee: CallCallee, ...args: CallArgs) => CallTsDsl;
|
|
7434
|
+
declare const Mixed$49: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.CallExpression>, TypeArgsMethods>, ExprMethods>, AsMethods>, ArgsMethods>;
|
|
7435
|
+
declare class CallTsDsl extends Mixed$49 {
|
|
7442
7436
|
readonly '~dsl' = "CallTsDsl";
|
|
7443
7437
|
protected _callee: CallCallee;
|
|
7444
7438
|
constructor(callee: CallCallee, ...args: CallArgs);
|
|
7445
7439
|
analyze(ctx: AnalysisContext): void;
|
|
7446
|
-
toAst(): ts.CallExpression;
|
|
7440
|
+
toAst(ctx: AstContext): ts.CallExpression;
|
|
7441
|
+
}
|
|
7442
|
+
//#endregion
|
|
7443
|
+
//#region src/ts-dsl/expr/typeof.d.ts
|
|
7444
|
+
type TypeOfExpr = string | MaybeTsDsl<ts.Expression>;
|
|
7445
|
+
type TypeOfExprCtor = (expr: TypeOfExpr) => TypeOfExprTsDsl;
|
|
7446
|
+
declare const Mixed$48: MixinCtor<abstract new () => TsDsl<ts.TypeOfExpression>, OperatorMethods>;
|
|
7447
|
+
declare class TypeOfExprTsDsl extends Mixed$48 {
|
|
7448
|
+
readonly '~dsl' = "TypeOfExprTsDsl";
|
|
7449
|
+
protected _expr: TypeOfExpr;
|
|
7450
|
+
constructor(expr: TypeOfExpr);
|
|
7451
|
+
analyze(ctx: AnalysisContext): void;
|
|
7452
|
+
toAst(ctx: AstContext): ts.TypeOfExpression;
|
|
7453
|
+
}
|
|
7454
|
+
//#endregion
|
|
7455
|
+
//#region src/ts-dsl/stmt/return.d.ts
|
|
7456
|
+
type ReturnExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7457
|
+
type ReturnCtor = (expr?: ReturnExpr) => ReturnTsDsl;
|
|
7458
|
+
declare const Mixed$47: abstract new () => TsDsl<ts.ReturnStatement>;
|
|
7459
|
+
declare class ReturnTsDsl extends Mixed$47 {
|
|
7460
|
+
readonly '~dsl' = "ReturnTsDsl";
|
|
7461
|
+
protected _returnExpr?: Ref<ReturnExpr>;
|
|
7462
|
+
constructor(expr?: ReturnExpr);
|
|
7463
|
+
analyze(ctx: AnalysisContext): void;
|
|
7464
|
+
toAst(ctx: AstContext): ts.ReturnStatement;
|
|
7465
|
+
}
|
|
7466
|
+
//#endregion
|
|
7467
|
+
//#region src/ts-dsl/mixins/type-expr.d.ts
|
|
7468
|
+
interface TypeExprMethods extends Node {
|
|
7469
|
+
/** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
|
|
7470
|
+
idx(this: Parameters<typeof f.type.idx>[0], ...args: DropFirst<Parameters<typeof f.type.idx>>): ReturnType<typeof f.type.idx>;
|
|
7471
|
+
/** Shorthand: builds `keyof T`. */
|
|
7472
|
+
keyof(this: MaybeTsDsl<TypeTsDsl>): ReturnType<typeof f.type.operator>;
|
|
7473
|
+
/** Shorthand: builds `readonly T`. */
|
|
7474
|
+
readonly(this: MaybeTsDsl<TypeTsDsl>): ReturnType<typeof f.type.operator>;
|
|
7475
|
+
/** Create a TypeExpr node representing ReturnType<this>. */
|
|
7476
|
+
returnType(this: Parameters<typeof f.type.query>[0], ...args: DropFirst<Parameters<typeof f.type.query>>): ReturnType<typeof f.type.expr>;
|
|
7477
|
+
/** Create a TypeOfExpr node representing typeof this. */
|
|
7478
|
+
typeofExpr(this: Parameters<typeof f.typeofExpr>[0], ...args: DropFirst<Parameters<typeof f.typeofExpr>>): ReturnType<typeof f.typeofExpr>;
|
|
7479
|
+
/** Create a TypeQuery node representing typeof this. */
|
|
7480
|
+
typeofType(this: Parameters<typeof f.type.query>[0], ...args: DropFirst<Parameters<typeof f.type.query>>): ReturnType<typeof f.type.query>;
|
|
7481
|
+
/** Shorthand: builds `unique T`. */
|
|
7482
|
+
unique(this: MaybeTsDsl<TypeTsDsl>): ReturnType<typeof f.type.operator>;
|
|
7483
|
+
}
|
|
7484
|
+
//#endregion
|
|
7485
|
+
//#region src/ts-dsl/type/attr.d.ts
|
|
7486
|
+
type Base$2 = Symbol | string | MaybeTsDsl<ts.EntityName>;
|
|
7487
|
+
type Right = Symbol | string | ts.Identifier;
|
|
7488
|
+
declare const Mixed$46: MixinCtor<abstract new () => TsDsl<ts.QualifiedName>, TypeExprMethods>;
|
|
7489
|
+
declare class TypeAttrTsDsl extends Mixed$46 {
|
|
7490
|
+
readonly '~dsl' = "TypeAttrTsDsl";
|
|
7491
|
+
protected _base?: Ref<Base$2>;
|
|
7492
|
+
protected _right: Ref<Right>;
|
|
7493
|
+
constructor(base: Base$2 | Ref<Base$2>, right: string | ts.Identifier);
|
|
7494
|
+
constructor(right: Right);
|
|
7495
|
+
analyze(ctx: AnalysisContext): void;
|
|
7496
|
+
base(base?: Base$2 | Ref<Base$2>): this;
|
|
7497
|
+
right(right: Right): this;
|
|
7498
|
+
toAst(ctx: AstContext): ts.QualifiedName;
|
|
7499
|
+
}
|
|
7500
|
+
//#endregion
|
|
7501
|
+
//#region src/ts-dsl/type/expr.d.ts
|
|
7502
|
+
type TypeExprName = Symbol | string;
|
|
7503
|
+
type TypeExprExpr = TypeExprName | TypeAttrTsDsl;
|
|
7504
|
+
type TypeExprFn = (t: TypeExprTsDsl) => void;
|
|
7505
|
+
type TypeExprCtor = (nameOrFn?: TypeExprName | TypeExprFn, fn?: TypeExprFn) => TypeExprTsDsl;
|
|
7506
|
+
declare const Mixed$45: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.TypeReferenceNode>, TypeExprMethods>, TypeArgsMethods>;
|
|
7507
|
+
declare class TypeExprTsDsl extends Mixed$45 {
|
|
7508
|
+
readonly '~dsl' = "TypeExprTsDsl";
|
|
7509
|
+
protected _exprInput?: Ref<TypeExprExpr>;
|
|
7510
|
+
constructor();
|
|
7511
|
+
constructor(fn: TypeExprFn);
|
|
7512
|
+
constructor(name: TypeExprName);
|
|
7513
|
+
constructor(name: TypeExprName, fn?: TypeExprFn);
|
|
7514
|
+
analyze(ctx: AnalysisContext): void;
|
|
7515
|
+
/** Accesses a nested type (e.g. `Foo.Bar`). */
|
|
7516
|
+
attr(right: string | ts.Identifier | TypeAttrTsDsl): this;
|
|
7517
|
+
toAst(ctx: AstContext): ts.TypeReferenceNode;
|
|
7518
|
+
}
|
|
7519
|
+
//#endregion
|
|
7520
|
+
//#region src/ts-dsl/type/idx.d.ts
|
|
7521
|
+
type Base$1 = string | MaybeTsDsl<ts.TypeNode>;
|
|
7522
|
+
type Index = string | number | MaybeTsDsl<ts.TypeNode>;
|
|
7523
|
+
type TypeIdxCtor = (base: Base$1, index: Index) => TypeIdxTsDsl;
|
|
7524
|
+
declare const Mixed$44: MixinCtor<abstract new () => TsDsl<ts.IndexedAccessTypeNode>, TypeExprMethods>;
|
|
7525
|
+
declare class TypeIdxTsDsl extends Mixed$44 {
|
|
7526
|
+
readonly '~dsl' = "TypeIdxTsDsl";
|
|
7527
|
+
protected _base: Base$1;
|
|
7528
|
+
protected _index: Index;
|
|
7529
|
+
constructor(base: Base$1, index: Index);
|
|
7530
|
+
analyze(ctx: AnalysisContext): void;
|
|
7531
|
+
base(base: Base$1): this;
|
|
7532
|
+
index(index: Index): this;
|
|
7533
|
+
toAst(ctx: AstContext): ts.IndexedAccessTypeNode;
|
|
7534
|
+
}
|
|
7535
|
+
//#endregion
|
|
7536
|
+
//#region src/ts-dsl/type/operator.d.ts
|
|
7537
|
+
type Op = ts.SyntaxKind.KeyOfKeyword | ts.SyntaxKind.ReadonlyKeyword | ts.SyntaxKind.UniqueKeyword;
|
|
7538
|
+
type Type$2 = string | MaybeTsDsl<ts.TypeNode>;
|
|
7539
|
+
type TypeOperatorCtor = () => TypeOperatorTsDsl;
|
|
7540
|
+
declare const Mixed$43: abstract new () => TsDsl<ts.TypeOperatorNode>;
|
|
7541
|
+
/**
|
|
7542
|
+
* Builds a TypeScript `TypeOperatorNode`, such as:
|
|
7543
|
+
*
|
|
7544
|
+
* - `keyof T`
|
|
7545
|
+
* - `readonly U`
|
|
7546
|
+
* - `unique V`
|
|
7547
|
+
*
|
|
7548
|
+
* This DSL provides both a generic `.operator()` API and convenient
|
|
7549
|
+
* shorthand methods (`.keyof()`, `.readonly()`, `.unique()`).
|
|
7550
|
+
*
|
|
7551
|
+
* The node will throw during render if required fields are missing.
|
|
7552
|
+
*/
|
|
7553
|
+
declare class TypeOperatorTsDsl extends Mixed$43 {
|
|
7554
|
+
readonly '~dsl' = "TypeOperatorTsDsl";
|
|
7555
|
+
protected _op?: Op;
|
|
7556
|
+
protected _type?: Type$2;
|
|
7557
|
+
analyze(ctx: AnalysisContext): void;
|
|
7558
|
+
/** Shorthand: builds `keyof T`. */
|
|
7559
|
+
keyof(type: Type$2): this;
|
|
7560
|
+
/** Sets the operator explicitly. */
|
|
7561
|
+
operator(op: Op): this;
|
|
7562
|
+
/** Shorthand: builds `readonly T`. */
|
|
7563
|
+
readonly(type: Type$2): this;
|
|
7564
|
+
/** Sets the target type of the operator. */
|
|
7565
|
+
type(type: Type$2): this;
|
|
7566
|
+
/** Shorthand: builds `unique T`. */
|
|
7567
|
+
unique(type: Type$2): this;
|
|
7568
|
+
toAst(ctx: AstContext): ts.TypeOperatorNode;
|
|
7569
|
+
/** Throws if required fields are not set. */
|
|
7570
|
+
$validate(): asserts this is this & {
|
|
7571
|
+
_op: Op;
|
|
7572
|
+
_type: Type$2;
|
|
7573
|
+
};
|
|
7574
|
+
private missingRequiredCalls;
|
|
7575
|
+
}
|
|
7576
|
+
//#endregion
|
|
7577
|
+
//#region src/ts-dsl/type/query.d.ts
|
|
7578
|
+
type TypeQueryExpr = string | MaybeTsDsl<TypeTsDsl | ts.Expression>;
|
|
7579
|
+
type TypeQueryCtor = (expr: TypeQueryExpr) => TypeQueryTsDsl;
|
|
7580
|
+
declare const Mixed$42: MixinCtor<abstract new () => TsDsl<ts.TypeQueryNode>, TypeExprMethods>;
|
|
7581
|
+
declare class TypeQueryTsDsl extends Mixed$42 {
|
|
7582
|
+
readonly '~dsl' = "TypeQueryTsDsl";
|
|
7583
|
+
protected _expr: TypeQueryExpr;
|
|
7584
|
+
constructor(expr: TypeQueryExpr);
|
|
7585
|
+
analyze(ctx: AnalysisContext): void;
|
|
7586
|
+
toAst(ctx: AstContext): ts.TypeQueryNode;
|
|
7587
|
+
}
|
|
7588
|
+
//#endregion
|
|
7589
|
+
//#region src/ts-dsl/utils/factories.d.ts
|
|
7590
|
+
type Ctor = (...args: Array<any>) => any;
|
|
7591
|
+
type Factory<T extends Ctor> = {
|
|
7592
|
+
(...args: Parameters<T>): ReturnType<T>;
|
|
7593
|
+
/** Sets the implementation of this factory. */
|
|
7594
|
+
set(fn: T): void;
|
|
7595
|
+
};
|
|
7596
|
+
declare const f: {
|
|
7597
|
+
/** Factory for creating `as` type assertion expressions (e.g. `value as Type`). */
|
|
7598
|
+
as: Factory<AsCtor>;
|
|
7599
|
+
/** Factory for creating property access expressions (e.g. `obj.foo`). */
|
|
7600
|
+
attr: Factory<AttrCtor>;
|
|
7601
|
+
/** Factory for creating await expressions (e.g. `await promise`). */
|
|
7602
|
+
await: Factory<AwaitCtor>;
|
|
7603
|
+
/** Factory for creating function or method call expressions (e.g. `fn(arg)`). */
|
|
7604
|
+
call: Factory<CallCtor>;
|
|
7605
|
+
/** Factory for creating return statements. */
|
|
7606
|
+
return: Factory<ReturnCtor>;
|
|
7607
|
+
/** Factories for creating type nodes. */
|
|
7608
|
+
type: {
|
|
7609
|
+
/** Factory for creating basic type references or type expressions (e.g. Foo or Foo<T>). */
|
|
7610
|
+
expr: Factory<TypeExprCtor>;
|
|
7611
|
+
/** Factory for creating indexed-access types (e.g. `Foo<T>[K]`). */
|
|
7612
|
+
idx: Factory<TypeIdxCtor>;
|
|
7613
|
+
/** Factory for creating type operator nodes (e.g. `readonly T`, `keyof T`, `unique T`). */
|
|
7614
|
+
operator: Factory<TypeOperatorCtor>;
|
|
7615
|
+
/** Factory for creating type query nodes (e.g. `typeof Foo`). */
|
|
7616
|
+
query: Factory<TypeQueryCtor>;
|
|
7617
|
+
};
|
|
7618
|
+
/** Factory for creating `typeof` expressions (e.g. `typeof value`). */
|
|
7619
|
+
typeofExpr: Factory<TypeOfExprCtor>;
|
|
7620
|
+
};
|
|
7621
|
+
//#endregion
|
|
7622
|
+
//#region src/ts-dsl/mixins/expr.d.ts
|
|
7623
|
+
interface ExprMethods extends Node {
|
|
7624
|
+
/** Accesses a property on the current expression (e.g. `this.foo`). */
|
|
7625
|
+
attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr>;
|
|
7626
|
+
/** Awaits the current expression (e.g. `await expr`). */
|
|
7627
|
+
await(): ReturnType<typeof f.await>;
|
|
7628
|
+
/** Calls the current expression (e.g. `fn(arg1, arg2)`). */
|
|
7629
|
+
call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call>;
|
|
7630
|
+
/** Produces a `return` statement returning the current expression. */
|
|
7631
|
+
return(): ReturnType<typeof f.return>;
|
|
7632
|
+
}
|
|
7633
|
+
//#endregion
|
|
7634
|
+
//#region src/ts-dsl/expr/as.d.ts
|
|
7635
|
+
type AsExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7636
|
+
type AsType = Symbol | string | TypeTsDsl;
|
|
7637
|
+
type AsCtor = (expr: AsExpr, type: AsType) => AsTsDsl;
|
|
7638
|
+
declare const Mixed$41: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.AsExpression>, ExprMethods>, AsMethods>;
|
|
7639
|
+
declare class AsTsDsl extends Mixed$41 {
|
|
7640
|
+
readonly '~dsl' = "AsTsDsl";
|
|
7641
|
+
protected expr: Ref<AsExpr>;
|
|
7642
|
+
protected type: Ref<AsType>;
|
|
7643
|
+
constructor(expr: AsExpr, type: AsType);
|
|
7644
|
+
analyze(ctx: AnalysisContext): void;
|
|
7645
|
+
toAst(ctx: AstContext): ts.AsExpression;
|
|
7646
|
+
}
|
|
7647
|
+
//#endregion
|
|
7648
|
+
//#region src/ts-dsl/mixins/value.d.ts
|
|
7649
|
+
type ValueExpr = string | MaybeTsDsl<ts.Expression>;
|
|
7650
|
+
interface ValueMethods extends Node {
|
|
7651
|
+
$value(ctx: AstContext): ts.Expression | undefined;
|
|
7652
|
+
/** Sets the initializer expression (e.g. `= expr`). */
|
|
7653
|
+
assign(expr: ValueExpr): this;
|
|
7654
|
+
}
|
|
7655
|
+
//#endregion
|
|
7656
|
+
//#region src/ts-dsl/mixins/pattern.d.ts
|
|
7657
|
+
interface PatternMethods extends Node {
|
|
7658
|
+
/** Renders the pattern into a `BindingName`. */
|
|
7659
|
+
$pattern(ctx: AstContext): ts.BindingName | undefined;
|
|
7660
|
+
/** Defines an array binding pattern. */
|
|
7661
|
+
array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
|
|
7662
|
+
/** Defines an object binding pattern. */
|
|
7663
|
+
object(...props: ReadonlyArray<MaybeArray$1<string> | Record<string, string>>): this;
|
|
7664
|
+
/** Adds a spread element (e.g. `...args`, `...options`) to the pattern. */
|
|
7665
|
+
spread(name: string): this;
|
|
7666
|
+
}
|
|
7667
|
+
//#endregion
|
|
7668
|
+
//#region src/ts-dsl/layout/hint.d.ts
|
|
7669
|
+
type HintMaybeLazy<T> = ((ctx: AstContext) => T) | T;
|
|
7670
|
+
type HintFn = (d: HintTsDsl) => void;
|
|
7671
|
+
type HintLines = HintMaybeLazy<MaybeArray$1<string>>;
|
|
7672
|
+
declare class HintTsDsl extends TsDsl<ts.Node> {
|
|
7673
|
+
readonly '~dsl' = "HintTsDsl";
|
|
7674
|
+
protected _lines: Array<HintLines>;
|
|
7675
|
+
constructor(lines?: HintLines, fn?: HintFn);
|
|
7676
|
+
analyze(ctx: AnalysisContext): void;
|
|
7677
|
+
add(lines: HintLines): this;
|
|
7678
|
+
apply<T extends ts.Node>(ctx: AstContext, node: T): T;
|
|
7679
|
+
toAst(ctx: AstContext): ts.Node;
|
|
7680
|
+
}
|
|
7681
|
+
//#endregion
|
|
7682
|
+
//#region src/ts-dsl/mixins/hint.d.ts
|
|
7683
|
+
interface HintMethods extends Node {
|
|
7684
|
+
$hint<T extends ts.Node>(ctx: AstContext, node: T): T;
|
|
7685
|
+
hint(lines?: HintLines, fn?: HintFn): this;
|
|
7447
7686
|
}
|
|
7448
7687
|
//#endregion
|
|
7449
7688
|
//#region src/ts-dsl/mixins/modifiers.d.ts
|
|
@@ -7541,39 +7780,124 @@ interface StaticMethods extends Modifiers {
|
|
|
7541
7780
|
static(condition?: boolean): this;
|
|
7542
7781
|
}
|
|
7543
7782
|
//#endregion
|
|
7544
|
-
//#region src/ts-dsl/
|
|
7545
|
-
type
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7783
|
+
//#region src/ts-dsl/layout/doc.d.ts
|
|
7784
|
+
type DocMaybeLazy<T> = ((ctx: AstContext) => T) | T;
|
|
7785
|
+
type DocFn = (d: DocTsDsl) => void;
|
|
7786
|
+
type DocLines = DocMaybeLazy<MaybeArray$1<string>>;
|
|
7787
|
+
declare class DocTsDsl extends TsDsl<ts.Node> {
|
|
7788
|
+
readonly '~dsl' = "DocTsDsl";
|
|
7789
|
+
protected _lines: Array<DocLines>;
|
|
7790
|
+
constructor(lines?: DocLines, fn?: DocFn);
|
|
7791
|
+
analyze(ctx: AnalysisContext): void;
|
|
7792
|
+
add(lines: DocLines): this;
|
|
7793
|
+
apply<T extends ts.Node>(ctx: AstContext, node: T): T;
|
|
7794
|
+
toAst(ctx: AstContext): ts.Node;
|
|
7550
7795
|
}
|
|
7551
7796
|
//#endregion
|
|
7552
|
-
//#region src/ts-dsl/mixins/
|
|
7553
|
-
interface
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7561
|
-
|
|
7797
|
+
//#region src/ts-dsl/mixins/doc.d.ts
|
|
7798
|
+
interface DocMethods extends Node {
|
|
7799
|
+
$docs<T extends ts.Node>(ctx: AstContext, node: T): T;
|
|
7800
|
+
doc(lines?: DocLines, fn?: DocFn): this;
|
|
7801
|
+
}
|
|
7802
|
+
//#endregion
|
|
7803
|
+
//#region src/ts-dsl/stmt/var.d.ts
|
|
7804
|
+
type VarName = Symbol | string;
|
|
7805
|
+
declare const Mixed$40: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.VariableStatement>, ValueMethods>, PatternMethods>, HintMethods>, ExportMethods>, DocMethods>, DefaultMethods>;
|
|
7806
|
+
declare class VarTsDsl extends Mixed$40 {
|
|
7807
|
+
readonly '~dsl' = "VarTsDsl";
|
|
7808
|
+
protected kind: ts.NodeFlags;
|
|
7809
|
+
protected name?: Ref<VarName>;
|
|
7810
|
+
protected _type?: TypeTsDsl;
|
|
7811
|
+
constructor(name?: VarName);
|
|
7812
|
+
analyze(ctx: AnalysisContext): void;
|
|
7813
|
+
const(): this;
|
|
7814
|
+
let(): this;
|
|
7815
|
+
/** Sets the variable type. */
|
|
7816
|
+
type(type: string | TypeTsDsl): this;
|
|
7817
|
+
var(): this;
|
|
7818
|
+
toAst(ctx: AstContext): ts.VariableStatement;
|
|
7819
|
+
}
|
|
7820
|
+
//#endregion
|
|
7821
|
+
//#region src/ts-dsl/decl/decorator.d.ts
|
|
7822
|
+
type DecoratorName = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7823
|
+
declare const Mixed$39: MixinCtor<abstract new () => TsDsl<ts.Decorator>, ArgsMethods>;
|
|
7824
|
+
declare class DecoratorTsDsl extends Mixed$39 {
|
|
7825
|
+
readonly '~dsl' = "DecoratorTsDsl";
|
|
7826
|
+
protected name: Ref<DecoratorName>;
|
|
7827
|
+
constructor(name: DecoratorName, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>);
|
|
7828
|
+
analyze(ctx: AnalysisContext): void;
|
|
7829
|
+
toAst(ctx: AstContext): ts.Decorator;
|
|
7830
|
+
}
|
|
7831
|
+
//#endregion
|
|
7832
|
+
//#region src/ts-dsl/decl/member.d.ts
|
|
7833
|
+
type Value$2 = string | number | MaybeTsDsl<ts.Expression>;
|
|
7834
|
+
type ValueFn$1 = Value$2 | ((m: EnumMemberTsDsl) => void);
|
|
7835
|
+
declare const Mixed$38: MixinCtor<abstract new () => TsDsl<ts.EnumMember>, DocMethods>;
|
|
7836
|
+
declare class EnumMemberTsDsl extends Mixed$38 {
|
|
7837
|
+
readonly '~dsl' = "EnumMemberTsDsl";
|
|
7838
|
+
private _name;
|
|
7839
|
+
private _value?;
|
|
7840
|
+
constructor(name: string, value?: ValueFn$1);
|
|
7841
|
+
analyze(ctx: AnalysisContext): void;
|
|
7842
|
+
/** Sets the enum member value. */
|
|
7843
|
+
value(value?: Value$2): this;
|
|
7844
|
+
toAst(ctx: AstContext): ts.EnumMember;
|
|
7845
|
+
}
|
|
7846
|
+
//#endregion
|
|
7847
|
+
//#region src/ts-dsl/decl/enum.d.ts
|
|
7848
|
+
type EnumName = Symbol | string;
|
|
7849
|
+
type Value$1 = string | number | MaybeTsDsl<ts.Expression>;
|
|
7850
|
+
type ValueFn = Value$1 | ((m: EnumMemberTsDsl) => void);
|
|
7851
|
+
declare const Mixed$37: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.EnumDeclaration>, ExportMethods>, DocMethods>, ConstMethods>;
|
|
7852
|
+
declare class EnumTsDsl extends Mixed$37 {
|
|
7853
|
+
readonly '~dsl' = "EnumTsDsl";
|
|
7854
|
+
private _members;
|
|
7855
|
+
private _name;
|
|
7856
|
+
constructor(name: EnumName, fn?: (e: EnumTsDsl) => void);
|
|
7857
|
+
analyze(ctx: AnalysisContext): void;
|
|
7858
|
+
/** Adds an enum member. */
|
|
7859
|
+
member(name: string, value?: ValueFn): this;
|
|
7860
|
+
/** Adds multiple enum members. */
|
|
7861
|
+
members(...members: ReadonlyArray<EnumMemberTsDsl>): this;
|
|
7862
|
+
toAst(ctx: AstContext): ts.EnumDeclaration;
|
|
7562
7863
|
}
|
|
7563
7864
|
//#endregion
|
|
7564
7865
|
//#region src/ts-dsl/mixins/decorator.d.ts
|
|
7565
7866
|
interface DecoratorMethods extends Node {
|
|
7566
7867
|
/** Renders the decorators into an array of `ts.Decorator`s. */
|
|
7567
|
-
$decorators(): ReadonlyArray<ts.Decorator>;
|
|
7868
|
+
$decorators(ctx: AstContext): ReadonlyArray<ts.Decorator>;
|
|
7568
7869
|
/** Adds a decorator (e.g. `@sealed({ in: 'root' })`). */
|
|
7569
7870
|
decorator(name: Symbol | string | MaybeTsDsl<ts.Expression>, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>): this;
|
|
7570
7871
|
}
|
|
7571
7872
|
//#endregion
|
|
7873
|
+
//#region src/ts-dsl/decl/field.d.ts
|
|
7874
|
+
type FieldName = Symbol | string;
|
|
7875
|
+
type FieldType = TypeExprName | TypeTsDsl;
|
|
7876
|
+
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>;
|
|
7877
|
+
declare class FieldTsDsl extends Mixed$36 {
|
|
7878
|
+
readonly '~dsl' = "FieldTsDsl";
|
|
7879
|
+
protected name: FieldName;
|
|
7880
|
+
protected _type?: TypeTsDsl;
|
|
7881
|
+
constructor(name: FieldName, fn?: (f: FieldTsDsl) => void);
|
|
7882
|
+
analyze(ctx: AnalysisContext): void;
|
|
7883
|
+
/** Sets the field type. */
|
|
7884
|
+
type(type: FieldType): this;
|
|
7885
|
+
toAst(ctx: AstContext): ts.PropertyDeclaration;
|
|
7886
|
+
}
|
|
7887
|
+
//#endregion
|
|
7888
|
+
//#region src/ts-dsl/mixins/type-returns.d.ts
|
|
7889
|
+
interface TypeReturnsMethods extends Node {
|
|
7890
|
+
/** Returns the return type node. */
|
|
7891
|
+
$returns(ctx: AstContext): ts.TypeNode | undefined;
|
|
7892
|
+
/** Sets the return type. */
|
|
7893
|
+
returns(type: TypeExprName | TypeTsDsl): this;
|
|
7894
|
+
}
|
|
7895
|
+
//#endregion
|
|
7572
7896
|
//#region src/ts-dsl/decl/param.d.ts
|
|
7573
7897
|
type ParamName = Symbol | string;
|
|
7574
7898
|
type ParamCtor = (name: ParamName | ((p: ParamTsDsl) => void), fn?: (p: ParamTsDsl) => void) => ParamTsDsl;
|
|
7575
|
-
declare const Mixed$
|
|
7576
|
-
declare class ParamTsDsl extends Mixed$
|
|
7899
|
+
declare const Mixed$35: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ParameterDeclaration>, ValueMethods>, PatternMethods>, OptionalMethods>, DecoratorMethods>;
|
|
7900
|
+
declare class ParamTsDsl extends Mixed$35 {
|
|
7577
7901
|
readonly '~dsl' = "ParamTsDsl";
|
|
7578
7902
|
protected name?: Ref<ParamName>;
|
|
7579
7903
|
protected _type?: TypeTsDsl;
|
|
@@ -7581,41 +7905,24 @@ declare class ParamTsDsl extends Mixed$46 {
|
|
|
7581
7905
|
analyze(ctx: AnalysisContext): void;
|
|
7582
7906
|
/** Sets the parameter type. */
|
|
7583
7907
|
type(type: string | TypeTsDsl): this;
|
|
7584
|
-
toAst(): ts.ParameterDeclaration;
|
|
7908
|
+
toAst(ctx: AstContext): ts.ParameterDeclaration;
|
|
7585
7909
|
}
|
|
7586
7910
|
//#endregion
|
|
7587
7911
|
//#region src/ts-dsl/mixins/param.d.ts
|
|
7588
7912
|
interface ParamMethods extends Node {
|
|
7589
7913
|
/** Renders the parameters into an array of `ParameterDeclaration`s. */
|
|
7590
|
-
$params(): ReadonlyArray<ts.ParameterDeclaration>;
|
|
7914
|
+
$params(ast: AstContext): ReadonlyArray<ts.ParameterDeclaration>;
|
|
7591
7915
|
/** Adds a parameter. */
|
|
7592
7916
|
param(...args: Parameters<ParamCtor>): this;
|
|
7593
7917
|
/** Adds multiple parameters. */
|
|
7594
7918
|
params(...params: ReadonlyArray<MaybeTsDsl<ts.ParameterDeclaration>>): this;
|
|
7595
7919
|
}
|
|
7596
7920
|
//#endregion
|
|
7597
|
-
//#region src/ts-dsl/layout/doc.d.ts
|
|
7598
|
-
declare class DocTsDsl extends TsDsl<ts.Node> {
|
|
7599
|
-
readonly '~dsl' = "DocTsDsl";
|
|
7600
|
-
protected _lines: Array<string>;
|
|
7601
|
-
constructor(lines?: MaybeArray$1<string>, fn?: (d: DocTsDsl) => void);
|
|
7602
|
-
analyze(ctx: AnalysisContext): void;
|
|
7603
|
-
add(...lines: ReadonlyArray<string>): this;
|
|
7604
|
-
apply<T extends ts.Node>(node: T): T;
|
|
7605
|
-
toAst(): ts.Node;
|
|
7606
|
-
}
|
|
7607
|
-
//#endregion
|
|
7608
|
-
//#region src/ts-dsl/mixins/doc.d.ts
|
|
7609
|
-
interface DocMethods extends Node {
|
|
7610
|
-
$docs<T extends ts.Node>(node: T): T;
|
|
7611
|
-
doc(lines?: MaybeArray$1<string>, fn?: (d: DocTsDsl) => void): this;
|
|
7612
|
-
}
|
|
7613
|
-
//#endregion
|
|
7614
7921
|
//#region src/ts-dsl/mixins/do.d.ts
|
|
7615
7922
|
type DoExpr = MaybeTsDsl<ts.Expression | ts.Statement>;
|
|
7616
7923
|
interface DoMethods extends Node {
|
|
7617
7924
|
/** Renders the collected `.do()` calls into an array of `Statement` nodes. */
|
|
7618
|
-
$do(): ReadonlyArray<ts.Statement>;
|
|
7925
|
+
$do(ctx: AstContext): ReadonlyArray<ts.Statement>;
|
|
7619
7926
|
_do: Array<DoExpr>;
|
|
7620
7927
|
/** Adds one or more expressions/statements to the body. */
|
|
7621
7928
|
do(...items: ReadonlyArray<DoExpr>): this;
|
|
@@ -7623,19 +7930,19 @@ interface DoMethods extends Node {
|
|
|
7623
7930
|
//#endregion
|
|
7624
7931
|
//#region src/ts-dsl/decl/getter.d.ts
|
|
7625
7932
|
type GetterName = string | ts.PropertyName;
|
|
7626
|
-
declare const Mixed$
|
|
7627
|
-
declare class GetterTsDsl extends Mixed$
|
|
7933
|
+
declare const Mixed$34: 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>;
|
|
7934
|
+
declare class GetterTsDsl extends Mixed$34 {
|
|
7628
7935
|
readonly '~dsl' = "GetterTsDsl";
|
|
7629
7936
|
protected name: GetterName;
|
|
7630
7937
|
constructor(name: GetterName, fn?: (g: GetterTsDsl) => void);
|
|
7631
7938
|
analyze(ctx: AnalysisContext): void;
|
|
7632
|
-
toAst(): ts.GetAccessorDeclaration;
|
|
7939
|
+
toAst(ctx: AstContext): ts.GetAccessorDeclaration;
|
|
7633
7940
|
}
|
|
7634
7941
|
//#endregion
|
|
7635
7942
|
//#region src/ts-dsl/stmt/if.d.ts
|
|
7636
7943
|
type IfCondition = string | MaybeTsDsl<ts.Expression>;
|
|
7637
|
-
declare const Mixed$
|
|
7638
|
-
declare class IfTsDsl extends Mixed$
|
|
7944
|
+
declare const Mixed$33: MixinCtor<abstract new () => TsDsl<ts.IfStatement>, DoMethods>;
|
|
7945
|
+
declare class IfTsDsl extends Mixed$33 {
|
|
7639
7946
|
readonly '~dsl' = "IfTsDsl";
|
|
7640
7947
|
protected _condition?: IfCondition;
|
|
7641
7948
|
protected _else?: Array<DoExpr>;
|
|
@@ -7643,25 +7950,72 @@ declare class IfTsDsl extends Mixed$44 {
|
|
|
7643
7950
|
analyze(ctx: AnalysisContext): void;
|
|
7644
7951
|
condition(condition: IfCondition): this;
|
|
7645
7952
|
otherwise(...items: Array<DoExpr>): this;
|
|
7646
|
-
toAst(): ts.IfStatement;
|
|
7953
|
+
toAst(ctx: AstContext): ts.IfStatement;
|
|
7954
|
+
}
|
|
7955
|
+
//#endregion
|
|
7956
|
+
//#region src/ts-dsl/utils/lazy.d.ts
|
|
7957
|
+
type LazyThunk<T extends ts.Node> = (ctx: AstContext) => TsDsl<T>;
|
|
7958
|
+
declare class LazyTsDsl<T extends ts.Node = ts.Node> extends TsDsl<T> {
|
|
7959
|
+
readonly '~dsl' = "LazyTsDsl";
|
|
7960
|
+
private _thunk;
|
|
7961
|
+
constructor(thunk: LazyThunk<T>);
|
|
7962
|
+
analyze(ctx: AnalysisContext): void;
|
|
7963
|
+
toAst(ctx: AstContext): T;
|
|
7964
|
+
}
|
|
7965
|
+
//#endregion
|
|
7966
|
+
//#region src/ts-dsl/expr/new.d.ts
|
|
7967
|
+
type NewExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7968
|
+
declare const Mixed$32: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.NewExpression>, TypeArgsMethods>, ExprMethods>, ArgsMethods>;
|
|
7969
|
+
declare class NewTsDsl extends Mixed$32 {
|
|
7970
|
+
readonly '~dsl' = "NewTsDsl";
|
|
7971
|
+
protected classExpr: Ref<NewExpr>;
|
|
7972
|
+
constructor(classExpr: NewExpr, ...args: ReadonlyArray<NewExpr>);
|
|
7973
|
+
analyze(ctx: AnalysisContext): void;
|
|
7974
|
+
toAst(ctx: AstContext): ts.NewExpression;
|
|
7975
|
+
}
|
|
7976
|
+
//#endregion
|
|
7977
|
+
//#region src/ts-dsl/layout/note.d.ts
|
|
7978
|
+
type NoteMaybeLazy<T> = ((ctx: AstContext) => T) | T;
|
|
7979
|
+
type NoteFn = (d: NoteTsDsl) => void;
|
|
7980
|
+
type NoteLines = NoteMaybeLazy<MaybeArray$1<string>>;
|
|
7981
|
+
declare class NoteTsDsl extends TsDsl<ts.Node> {
|
|
7982
|
+
readonly '~dsl' = "NoteTsDsl";
|
|
7983
|
+
protected _lines: Array<NoteLines>;
|
|
7984
|
+
constructor(lines?: NoteLines, fn?: NoteFn);
|
|
7985
|
+
analyze(ctx: AnalysisContext): void;
|
|
7986
|
+
add(lines: NoteLines): this;
|
|
7987
|
+
apply<T extends ts.Node>(ctx: AstContext, node: T): T;
|
|
7988
|
+
toAst(ctx: AstContext): ts.Node;
|
|
7647
7989
|
}
|
|
7648
7990
|
//#endregion
|
|
7649
7991
|
//#region src/ts-dsl/decl/setter.d.ts
|
|
7650
7992
|
type SetterName = string | ts.PropertyName;
|
|
7651
|
-
declare const Mixed$
|
|
7652
|
-
declare class SetterTsDsl extends Mixed$
|
|
7993
|
+
declare const Mixed$31: 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>;
|
|
7994
|
+
declare class SetterTsDsl extends Mixed$31 {
|
|
7653
7995
|
readonly '~dsl' = "SetterTsDsl";
|
|
7654
7996
|
protected name: SetterName;
|
|
7655
7997
|
constructor(name: SetterName, fn?: (s: SetterTsDsl) => void);
|
|
7656
7998
|
analyze(ctx: AnalysisContext): void;
|
|
7657
|
-
toAst(): ts.SetAccessorDeclaration;
|
|
7999
|
+
toAst(ctx: AstContext): ts.SetAccessorDeclaration;
|
|
8000
|
+
}
|
|
8001
|
+
//#endregion
|
|
8002
|
+
//#region src/ts-dsl/expr/template.d.ts
|
|
8003
|
+
type TemplatePart = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
8004
|
+
declare const Mixed$30: abstract new () => TsDsl<ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression>;
|
|
8005
|
+
declare class TemplateTsDsl extends Mixed$30 {
|
|
8006
|
+
readonly '~dsl' = "TemplateTsDsl";
|
|
8007
|
+
protected parts: Array<Ref<TemplatePart>>;
|
|
8008
|
+
constructor(value?: TemplatePart);
|
|
8009
|
+
analyze(ctx: AnalysisContext): void;
|
|
8010
|
+
add(value: TemplatePart): this;
|
|
8011
|
+
toAst(ctx: AstContext): ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression;
|
|
7658
8012
|
}
|
|
7659
8013
|
//#endregion
|
|
7660
8014
|
//#region src/ts-dsl/type/param.d.ts
|
|
7661
8015
|
type TypeParamName = Symbol | string;
|
|
7662
8016
|
type TypeParamExpr = Symbol | string | boolean | MaybeTsDsl<TypeTsDsl>;
|
|
7663
|
-
declare const Mixed$
|
|
7664
|
-
declare class TypeParamTsDsl extends Mixed$
|
|
8017
|
+
declare const Mixed$29: abstract new () => TsDsl<ts.TypeParameterDeclaration>;
|
|
8018
|
+
declare class TypeParamTsDsl extends Mixed$29 {
|
|
7665
8019
|
readonly '~dsl' = "TypeParamTsDsl";
|
|
7666
8020
|
protected constraint?: Ref<TypeParamExpr>;
|
|
7667
8021
|
protected defaultValue?: Ref<TypeParamExpr>;
|
|
@@ -7670,187 +8024,44 @@ declare class TypeParamTsDsl extends Mixed$42 {
|
|
|
7670
8024
|
analyze(ctx: AnalysisContext): void;
|
|
7671
8025
|
default(value: TypeParamExpr): this;
|
|
7672
8026
|
extends(constraint: TypeParamExpr): this;
|
|
7673
|
-
toAst(): ts.TypeParameterDeclaration;
|
|
8027
|
+
toAst(ctx: AstContext): ts.TypeParameterDeclaration;
|
|
7674
8028
|
}
|
|
7675
8029
|
//#endregion
|
|
7676
8030
|
//#region src/ts-dsl/mixins/type-params.d.ts
|
|
7677
8031
|
interface TypeParamsMethods extends Node {
|
|
7678
8032
|
/** Returns the type parameters as an array of ts.TypeParameterDeclaration nodes. */
|
|
7679
|
-
$generics(): ReadonlyArray<ts.TypeParameterDeclaration> | undefined;
|
|
8033
|
+
$generics(ast: AstContext): ReadonlyArray<ts.TypeParameterDeclaration> | undefined;
|
|
7680
8034
|
/** Adds a single type parameter (e.g. `T` in `Array<T>`). */
|
|
7681
8035
|
generic(...args: ConstructorParameters<typeof TypeParamTsDsl>): this;
|
|
7682
8036
|
/** Adds type parameters (e.g. `Map<string, T>`). */
|
|
7683
8037
|
generics(...args: ReadonlyArray<Symbol | string | MaybeTsDsl<TypeParamTsDsl>>): this;
|
|
7684
8038
|
}
|
|
7685
8039
|
//#endregion
|
|
7686
|
-
//#region src/ts-dsl/expr/typeof.d.ts
|
|
7687
|
-
declare const Mixed$41: MixinCtor<abstract new () => TsDsl<ts.TypeOfExpression>, OperatorMethods>;
|
|
7688
|
-
declare class TypeOfExprTsDsl extends Mixed$41 {
|
|
7689
|
-
readonly '~dsl' = "TypeOfExprTsDsl";
|
|
7690
|
-
protected _expr: string | MaybeTsDsl<ts.Expression>;
|
|
7691
|
-
constructor(expr: string | MaybeTsDsl<ts.Expression>);
|
|
7692
|
-
analyze(ctx: AnalysisContext): void;
|
|
7693
|
-
toAst(): ts.TypeOfExpression;
|
|
7694
|
-
}
|
|
7695
|
-
//#endregion
|
|
7696
|
-
//#region src/ts-dsl/type/idx.d.ts
|
|
7697
|
-
type Base$2 = string | MaybeTsDsl<ts.TypeNode>;
|
|
7698
|
-
type Index = string | number | MaybeTsDsl<ts.TypeNode>;
|
|
7699
|
-
declare const Mixed$40: MixinCtor<abstract new () => TypeTsDsl<ts.IndexedAccessTypeNode>, TypeExprMethods>;
|
|
7700
|
-
declare class TypeIdxTsDsl extends Mixed$40 {
|
|
7701
|
-
readonly '~dsl' = "TypeIdxTsDsl";
|
|
7702
|
-
protected _base: Base$2;
|
|
7703
|
-
protected _index: Index;
|
|
7704
|
-
constructor(base: Base$2, index: Index);
|
|
7705
|
-
analyze(ctx: AnalysisContext): void;
|
|
7706
|
-
base(base: Base$2): this;
|
|
7707
|
-
index(index: Index): this;
|
|
7708
|
-
toAst(): ts.IndexedAccessTypeNode;
|
|
7709
|
-
}
|
|
7710
|
-
//#endregion
|
|
7711
|
-
//#region src/ts-dsl/type/operator.d.ts
|
|
7712
|
-
type Op = ts.SyntaxKind.KeyOfKeyword | ts.SyntaxKind.ReadonlyKeyword | ts.SyntaxKind.UniqueKeyword;
|
|
7713
|
-
type Type$2 = string | MaybeTsDsl<ts.TypeNode>;
|
|
7714
|
-
declare const Mixed$39: abstract new () => TypeTsDsl<ts.TypeOperatorNode>;
|
|
7715
|
-
/**
|
|
7716
|
-
* Builds a TypeScript `TypeOperatorNode`, such as:
|
|
7717
|
-
*
|
|
7718
|
-
* - `keyof T`
|
|
7719
|
-
* - `readonly U`
|
|
7720
|
-
* - `unique V`
|
|
7721
|
-
*
|
|
7722
|
-
* This DSL provides both a generic `.operator()` API and convenient
|
|
7723
|
-
* shorthand methods (`.keyof()`, `.readonly()`, `.unique()`).
|
|
7724
|
-
*
|
|
7725
|
-
* The node will throw during render if required fields are missing.
|
|
7726
|
-
*/
|
|
7727
|
-
declare class TypeOperatorTsDsl extends Mixed$39 {
|
|
7728
|
-
readonly '~dsl' = "TypeOperatorTsDsl";
|
|
7729
|
-
protected _op?: Op;
|
|
7730
|
-
protected _type?: Type$2;
|
|
7731
|
-
analyze(ctx: AnalysisContext): void;
|
|
7732
|
-
/** Shorthand: builds `keyof T`. */
|
|
7733
|
-
keyof(type: Type$2): this;
|
|
7734
|
-
/** Sets the operator explicitly. */
|
|
7735
|
-
operator(op: Op): this;
|
|
7736
|
-
/** Shorthand: builds `readonly T`. */
|
|
7737
|
-
readonly(type: Type$2): this;
|
|
7738
|
-
/** Sets the target type of the operator. */
|
|
7739
|
-
type(type: Type$2): this;
|
|
7740
|
-
/** Shorthand: builds `unique T`. */
|
|
7741
|
-
unique(type: Type$2): this;
|
|
7742
|
-
toAst(): ts.TypeOperatorNode;
|
|
7743
|
-
/** Throws if required fields are not set. */
|
|
7744
|
-
$validate(): asserts this is this & {
|
|
7745
|
-
_op: Op;
|
|
7746
|
-
_type: Type$2;
|
|
7747
|
-
};
|
|
7748
|
-
private missingRequiredCalls;
|
|
7749
|
-
}
|
|
7750
|
-
//#endregion
|
|
7751
|
-
//#region src/ts-dsl/type/query.d.ts
|
|
7752
|
-
declare const Mixed$38: MixinCtor<abstract new () => TypeTsDsl<ts.TypeQueryNode>, TypeExprMethods>;
|
|
7753
|
-
declare class TypeQueryTsDsl extends Mixed$38 {
|
|
7754
|
-
readonly '~dsl' = "TypeQueryTsDsl";
|
|
7755
|
-
protected _expr: string | MaybeTsDsl<TypeTsDsl | ts.Expression>;
|
|
7756
|
-
constructor(expr: string | MaybeTsDsl<TypeTsDsl | ts.Expression>);
|
|
7757
|
-
analyze(ctx: AnalysisContext): void;
|
|
7758
|
-
toAst(): ts.TypeQueryNode;
|
|
7759
|
-
}
|
|
7760
|
-
//#endregion
|
|
7761
|
-
//#region src/ts-dsl/mixins/type-expr.d.ts
|
|
7762
|
-
interface TypeExprMethods extends Node {
|
|
7763
|
-
/** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
|
|
7764
|
-
idx(this: MaybeTsDsl<TypeTsDsl>, index: string | number | MaybeTsDsl<ts.TypeNode>): TypeIdxTsDsl;
|
|
7765
|
-
/** Shorthand: builds `keyof T`. */
|
|
7766
|
-
keyof(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
|
|
7767
|
-
/** Shorthand: builds `readonly T`. */
|
|
7768
|
-
readonly(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
|
|
7769
|
-
/** Create a TypeExpr node representing ReturnType<this>. */
|
|
7770
|
-
returnType(this: MaybeTsDsl<ts.Expression>): TypeExprTsDsl;
|
|
7771
|
-
/** Create a TypeOfExpr node representing typeof this. */
|
|
7772
|
-
typeofExpr(this: MaybeTsDsl<ts.Expression>): TypeOfExprTsDsl;
|
|
7773
|
-
/** Create a TypeQuery node representing typeof this. */
|
|
7774
|
-
typeofType(this: MaybeTsDsl<TypeTsDsl | ts.Expression>): TypeQueryTsDsl;
|
|
7775
|
-
/** Shorthand: builds `unique T`. */
|
|
7776
|
-
unique(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
|
|
7777
|
-
}
|
|
7778
|
-
//#endregion
|
|
7779
|
-
//#region src/ts-dsl/type/attr.d.ts
|
|
7780
|
-
type Base$1 = Symbol | string | MaybeTsDsl<ts.EntityName>;
|
|
7781
|
-
type Right = Symbol | string | ts.Identifier;
|
|
7782
|
-
declare const Mixed$37: MixinCtor<abstract new () => TypeTsDsl<ts.QualifiedName>, TypeExprMethods>;
|
|
7783
|
-
declare class TypeAttrTsDsl extends Mixed$37 {
|
|
7784
|
-
readonly '~dsl' = "TypeAttrTsDsl";
|
|
7785
|
-
protected _base?: Ref<Base$1>;
|
|
7786
|
-
protected _right: Ref<Right>;
|
|
7787
|
-
constructor(base: Base$1 | Ref<Base$1>, right: string | ts.Identifier);
|
|
7788
|
-
constructor(right: Right);
|
|
7789
|
-
analyze(ctx: AnalysisContext): void;
|
|
7790
|
-
base(base?: Base$1 | Ref<Base$1>): this;
|
|
7791
|
-
right(right: Right): this;
|
|
7792
|
-
toAst(): ts.QualifiedName;
|
|
7793
|
-
}
|
|
7794
|
-
//#endregion
|
|
7795
|
-
//#region src/ts-dsl/type/expr.d.ts
|
|
7796
|
-
type TypeExprName = Symbol | string;
|
|
7797
|
-
type TypeExprExpr = TypeExprName | TypeAttrTsDsl;
|
|
7798
|
-
declare const Mixed$36: MixinCtor<MixinCtor<abstract new () => TypeTsDsl<ts.TypeReferenceNode>, TypeExprMethods>, TypeArgsMethods>;
|
|
7799
|
-
declare class TypeExprTsDsl extends Mixed$36 {
|
|
7800
|
-
readonly '~dsl' = "TypeExprTsDsl";
|
|
7801
|
-
protected _exprInput?: Ref<TypeExprExpr>;
|
|
7802
|
-
constructor();
|
|
7803
|
-
constructor(fn: (t: TypeExprTsDsl) => void);
|
|
7804
|
-
constructor(name: TypeExprName);
|
|
7805
|
-
constructor(name: TypeExprName, fn?: (t: TypeExprTsDsl) => void);
|
|
7806
|
-
analyze(ctx: AnalysisContext): void;
|
|
7807
|
-
/** Accesses a nested type (e.g. `Foo.Bar`). */
|
|
7808
|
-
attr(right: string | ts.Identifier | TypeAttrTsDsl): this;
|
|
7809
|
-
toAst(): ts.TypeReferenceNode;
|
|
7810
|
-
}
|
|
7811
|
-
//#endregion
|
|
7812
|
-
//#region src/ts-dsl/decl/field.d.ts
|
|
7813
|
-
type FieldType = TypeExprName | TypeTsDsl;
|
|
7814
|
-
declare const Mixed$35: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyDeclaration>, ValueMethods>, StaticMethods>, ReadonlyMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, DocMethods>, DecoratorMethods>;
|
|
7815
|
-
declare class FieldTsDsl extends Mixed$35 {
|
|
7816
|
-
readonly '~dsl' = "FieldTsDsl";
|
|
7817
|
-
protected name: string;
|
|
7818
|
-
protected _type?: TypeTsDsl;
|
|
7819
|
-
constructor(name: string, fn?: (f: FieldTsDsl) => void);
|
|
7820
|
-
analyze(ctx: AnalysisContext): void;
|
|
7821
|
-
/** Sets the field type. */
|
|
7822
|
-
type(type: FieldType): this;
|
|
7823
|
-
toAst(): ts.PropertyDeclaration;
|
|
7824
|
-
}
|
|
7825
|
-
//#endregion
|
|
7826
8040
|
//#region src/ts-dsl/decl/init.d.ts
|
|
7827
|
-
declare const Mixed$
|
|
7828
|
-
declare class InitTsDsl extends Mixed$
|
|
8041
|
+
declare const Mixed$28: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ConstructorDeclaration>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>;
|
|
8042
|
+
declare class InitTsDsl extends Mixed$28 {
|
|
7829
8043
|
readonly '~dsl' = "InitTsDsl";
|
|
7830
8044
|
constructor(fn?: (i: InitTsDsl) => void);
|
|
7831
8045
|
analyze(ctx: AnalysisContext): void;
|
|
7832
|
-
toAst(): ts.ConstructorDeclaration;
|
|
8046
|
+
toAst(ctx: AstContext): ts.ConstructorDeclaration;
|
|
7833
8047
|
}
|
|
7834
8048
|
//#endregion
|
|
7835
8049
|
//#region src/ts-dsl/decl/method.d.ts
|
|
7836
|
-
declare const Mixed$
|
|
7837
|
-
declare class MethodTsDsl extends Mixed$
|
|
8050
|
+
declare const Mixed$27: 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>;
|
|
8051
|
+
declare class MethodTsDsl extends Mixed$27 {
|
|
7838
8052
|
readonly '~dsl' = "MethodTsDsl";
|
|
7839
8053
|
protected name: string;
|
|
7840
|
-
protected _returns?: TypeTsDsl;
|
|
7841
8054
|
constructor(name: string, fn?: (m: MethodTsDsl) => void);
|
|
7842
8055
|
analyze(ctx: AnalysisContext): void;
|
|
7843
|
-
|
|
7844
|
-
returns(type: string | TypeTsDsl): this;
|
|
7845
|
-
toAst(): ts.MethodDeclaration;
|
|
8056
|
+
toAst(ctx: AstContext): ts.MethodDeclaration;
|
|
7846
8057
|
}
|
|
7847
8058
|
//#endregion
|
|
7848
8059
|
//#region src/ts-dsl/decl/class.d.ts
|
|
7849
8060
|
type Base = Symbol | string;
|
|
7850
8061
|
type Name$1 = Symbol | string;
|
|
7851
8062
|
type Body = Array<MaybeTsDsl<ts.ClassElement | ts.Node>>;
|
|
7852
|
-
declare const Mixed$
|
|
7853
|
-
declare class ClassTsDsl extends Mixed$
|
|
8063
|
+
declare const Mixed$26: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ClassDeclaration>, TypeParamsMethods>, ExportMethods>, DocMethods>, DefaultMethods>, DecoratorMethods>, AbstractMethods>;
|
|
8064
|
+
declare class ClassTsDsl extends Mixed$26 {
|
|
7854
8065
|
readonly '~dsl' = "ClassTsDsl";
|
|
7855
8066
|
protected baseClass?: Ref<Base>;
|
|
7856
8067
|
protected body: Body;
|
|
@@ -7862,71 +8073,26 @@ declare class ClassTsDsl extends Mixed$32 {
|
|
|
7862
8073
|
/** Records a base class to extend from. */
|
|
7863
8074
|
extends(base?: Base): this;
|
|
7864
8075
|
/** Adds a class field. */
|
|
7865
|
-
field(name:
|
|
8076
|
+
field(name: FieldName, fn?: (f: FieldTsDsl) => void): this;
|
|
7866
8077
|
/** Adds a class constructor. */
|
|
7867
8078
|
init(fn?: (i: InitTsDsl) => void): this;
|
|
7868
8079
|
/** Adds a class method. */
|
|
7869
8080
|
method(name: string, fn?: (m: MethodTsDsl) => void): this;
|
|
7870
8081
|
/** Inserts an empty line between members for formatting. */
|
|
7871
8082
|
newline(): this;
|
|
7872
|
-
toAst(): ts.ClassDeclaration;
|
|
8083
|
+
toAst(ctx: AstContext): ts.ClassDeclaration;
|
|
7873
8084
|
/** Builds heritage clauses (extends). */
|
|
7874
8085
|
private _heritage;
|
|
7875
8086
|
}
|
|
7876
8087
|
//#endregion
|
|
7877
|
-
//#region src/ts-dsl/decl/decorator.d.ts
|
|
7878
|
-
type DecoratorName = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7879
|
-
declare const Mixed$31: MixinCtor<abstract new () => TsDsl<ts.Decorator>, ArgsMethods>;
|
|
7880
|
-
declare class DecoratorTsDsl extends Mixed$31 {
|
|
7881
|
-
readonly '~dsl' = "DecoratorTsDsl";
|
|
7882
|
-
protected name: Ref<DecoratorName>;
|
|
7883
|
-
constructor(name: DecoratorName, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>);
|
|
7884
|
-
analyze(ctx: AnalysisContext): void;
|
|
7885
|
-
toAst(): ts.Decorator;
|
|
7886
|
-
}
|
|
7887
|
-
//#endregion
|
|
7888
|
-
//#region src/ts-dsl/decl/member.d.ts
|
|
7889
|
-
type Value$2 = string | number | MaybeTsDsl<ts.Expression>;
|
|
7890
|
-
type ValueFn$1 = Value$2 | ((m: EnumMemberTsDsl) => void);
|
|
7891
|
-
declare const Mixed$30: MixinCtor<abstract new () => TsDsl<ts.EnumMember>, DocMethods>;
|
|
7892
|
-
declare class EnumMemberTsDsl extends Mixed$30 {
|
|
7893
|
-
readonly '~dsl' = "EnumMemberTsDsl";
|
|
7894
|
-
private _name;
|
|
7895
|
-
private _value?;
|
|
7896
|
-
constructor(name: string, value?: ValueFn$1);
|
|
7897
|
-
analyze(ctx: AnalysisContext): void;
|
|
7898
|
-
/** Sets the enum member value. */
|
|
7899
|
-
value(value?: Value$2): this;
|
|
7900
|
-
toAst(): ts.EnumMember;
|
|
7901
|
-
}
|
|
7902
|
-
//#endregion
|
|
7903
|
-
//#region src/ts-dsl/decl/enum.d.ts
|
|
7904
|
-
type EnumName = Symbol | string;
|
|
7905
|
-
type Value$1 = string | number | MaybeTsDsl<ts.Expression>;
|
|
7906
|
-
type ValueFn = Value$1 | ((m: EnumMemberTsDsl) => void);
|
|
7907
|
-
declare const Mixed$29: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.EnumDeclaration>, ExportMethods>, DocMethods>, ConstMethods>;
|
|
7908
|
-
declare class EnumTsDsl extends Mixed$29 {
|
|
7909
|
-
readonly '~dsl' = "EnumTsDsl";
|
|
7910
|
-
private _members;
|
|
7911
|
-
private _name;
|
|
7912
|
-
constructor(name: EnumName, fn?: (e: EnumTsDsl) => void);
|
|
7913
|
-
analyze(ctx: AnalysisContext): void;
|
|
7914
|
-
/** Adds an enum member. */
|
|
7915
|
-
member(name: string, value?: ValueFn): this;
|
|
7916
|
-
/** Adds multiple enum members. */
|
|
7917
|
-
members(...members: ReadonlyArray<EnumMemberTsDsl>): this;
|
|
7918
|
-
toAst(): ts.EnumDeclaration;
|
|
7919
|
-
}
|
|
7920
|
-
//#endregion
|
|
7921
8088
|
//#region src/ts-dsl/decl/func.d.ts
|
|
7922
8089
|
type FuncMode = 'arrow' | 'decl' | 'expr';
|
|
7923
8090
|
type FuncName = Symbol | string;
|
|
7924
|
-
declare const Mixed$
|
|
7925
|
-
declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$
|
|
8091
|
+
declare const Mixed$25: 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>;
|
|
8092
|
+
declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$25 {
|
|
7926
8093
|
readonly '~dsl' = "FuncTsDsl";
|
|
7927
8094
|
protected mode?: FuncMode;
|
|
7928
8095
|
protected name?: Ref<FuncName>;
|
|
7929
|
-
protected _returns?: TypeTsDsl;
|
|
7930
8096
|
constructor();
|
|
7931
8097
|
constructor(fn: (f: ImplFuncTsDsl<'arrow'>) => void);
|
|
7932
8098
|
constructor(name: FuncName);
|
|
@@ -7938,9 +8104,7 @@ declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$28 {
|
|
|
7938
8104
|
decl(): FuncTsDsl<'decl'>;
|
|
7939
8105
|
/** Switches the function to a function expression form. */
|
|
7940
8106
|
expr(): FuncTsDsl<'expr'>;
|
|
7941
|
-
|
|
7942
|
-
returns(type: string | TypeTsDsl): this;
|
|
7943
|
-
toAst(): M extends 'decl' ? ts.FunctionDeclaration : M extends 'expr' ? ts.FunctionExpression : ts.ArrowFunction;
|
|
8107
|
+
toAst(ctx: AstContext): M extends 'decl' ? ts.FunctionDeclaration : M extends 'expr' ? ts.FunctionExpression : ts.ArrowFunction;
|
|
7944
8108
|
}
|
|
7945
8109
|
declare const FuncTsDsl: {
|
|
7946
8110
|
new (): FuncTsDsl<"arrow">;
|
|
@@ -7951,11 +8115,11 @@ declare const FuncTsDsl: {
|
|
|
7951
8115
|
type FuncTsDsl<M extends FuncMode = 'arrow'> = ImplFuncTsDsl<M>;
|
|
7952
8116
|
//#endregion
|
|
7953
8117
|
//#region src/ts-dsl/decl/pattern.d.ts
|
|
7954
|
-
declare const Mixed$
|
|
8118
|
+
declare const Mixed$24: abstract new () => TsDsl<ts.BindingName>;
|
|
7955
8119
|
/**
|
|
7956
8120
|
* Builds binding patterns (e.g. `{ foo, bar }`, `[a, b, ...rest]`).
|
|
7957
8121
|
*/
|
|
7958
|
-
declare class PatternTsDsl extends Mixed$
|
|
8122
|
+
declare class PatternTsDsl extends Mixed$24 {
|
|
7959
8123
|
readonly '~dsl' = "PatternTsDsl";
|
|
7960
8124
|
protected pattern?: {
|
|
7961
8125
|
kind: 'array';
|
|
@@ -7972,7 +8136,7 @@ declare class PatternTsDsl extends Mixed$27 {
|
|
|
7972
8136
|
object(...props: ReadonlyArray<MaybeArray$1<string> | Record<string, string>>): this;
|
|
7973
8137
|
/** Adds a spread element (e.g. `...rest`, `...options`, `...args`). */
|
|
7974
8138
|
spread(name: string): this;
|
|
7975
|
-
toAst(): ts.ObjectBindingPattern | ts.ArrayBindingPattern;
|
|
8139
|
+
toAst(ctx: AstContext): ts.ObjectBindingPattern | ts.ArrayBindingPattern;
|
|
7976
8140
|
private createSpread;
|
|
7977
8141
|
}
|
|
7978
8142
|
//#endregion
|
|
@@ -7989,8 +8153,8 @@ interface LayoutMethods extends Node {
|
|
|
7989
8153
|
}
|
|
7990
8154
|
//#endregion
|
|
7991
8155
|
//#region src/ts-dsl/expr/array.d.ts
|
|
7992
|
-
declare const Mixed$
|
|
7993
|
-
declare class ArrayTsDsl extends Mixed$
|
|
8156
|
+
declare const Mixed$23: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ArrayLiteralExpression>, LayoutMethods>, AsMethods>;
|
|
8157
|
+
declare class ArrayTsDsl extends Mixed$23 {
|
|
7994
8158
|
readonly '~dsl' = "ArrayTsDsl";
|
|
7995
8159
|
protected _elements: Array<{
|
|
7996
8160
|
expr: MaybeTsDsl<ts.Expression>;
|
|
@@ -8007,23 +8171,23 @@ declare class ArrayTsDsl extends Mixed$26 {
|
|
|
8007
8171
|
elements(...exprs: ReadonlyArray<string | number | boolean | MaybeTsDsl<ts.Expression>>): this;
|
|
8008
8172
|
/** Adds a spread element (`...expr`). */
|
|
8009
8173
|
spread(expr: MaybeTsDsl<ts.Expression>): this;
|
|
8010
|
-
toAst(): ts.ArrayLiteralExpression;
|
|
8174
|
+
toAst(ctx: AstContext): ts.ArrayLiteralExpression;
|
|
8011
8175
|
}
|
|
8012
8176
|
//#endregion
|
|
8013
8177
|
//#region src/ts-dsl/expr/expr.d.ts
|
|
8014
8178
|
type Id = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
8015
|
-
declare const Mixed$
|
|
8016
|
-
declare class ExprTsDsl extends Mixed$
|
|
8179
|
+
declare const Mixed$22: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Expression>, TypeExprMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
|
|
8180
|
+
declare class ExprTsDsl extends Mixed$22 {
|
|
8017
8181
|
readonly '~dsl' = "ExprTsDsl";
|
|
8018
8182
|
protected _exprInput: Ref<Id>;
|
|
8019
8183
|
constructor(id: Id);
|
|
8020
8184
|
analyze(ctx: AnalysisContext): void;
|
|
8021
|
-
toAst():
|
|
8185
|
+
toAst(ctx: AstContext): ts.Expression;
|
|
8022
8186
|
}
|
|
8023
8187
|
//#endregion
|
|
8024
8188
|
//#region src/ts-dsl/expr/id.d.ts
|
|
8025
|
-
declare const Mixed$
|
|
8026
|
-
declare class IdTsDsl extends Mixed$
|
|
8189
|
+
declare const Mixed$21: abstract new () => TsDsl<ts.Identifier>;
|
|
8190
|
+
declare class IdTsDsl extends Mixed$21 {
|
|
8027
8191
|
readonly '~dsl' = "IdTsDsl";
|
|
8028
8192
|
protected name: string;
|
|
8029
8193
|
constructor(name: string);
|
|
@@ -8032,41 +8196,13 @@ declare class IdTsDsl extends Mixed$24 {
|
|
|
8032
8196
|
}
|
|
8033
8197
|
//#endregion
|
|
8034
8198
|
//#region src/ts-dsl/expr/literal.d.ts
|
|
8035
|
-
declare const Mixed$
|
|
8036
|
-
declare class LiteralTsDsl extends Mixed$
|
|
8199
|
+
declare const Mixed$20: MixinCtor<abstract new () => TsDsl<ts.LiteralExpression | ts.NullLiteral | ts.BooleanLiteral | ts.PrefixUnaryExpression>, AsMethods>;
|
|
8200
|
+
declare class LiteralTsDsl extends Mixed$20 {
|
|
8037
8201
|
readonly '~dsl' = "LiteralTsDsl";
|
|
8038
8202
|
protected value: string | number | boolean | null;
|
|
8039
8203
|
constructor(value: string | number | boolean | null);
|
|
8040
8204
|
analyze(ctx: AnalysisContext): void;
|
|
8041
|
-
toAst():
|
|
8042
|
-
}
|
|
8043
|
-
//#endregion
|
|
8044
|
-
//#region src/ts-dsl/expr/new.d.ts
|
|
8045
|
-
type NewExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
8046
|
-
declare const Mixed$22: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.NewExpression>, TypeArgsMethods>, ExprMethods>, ArgsMethods>;
|
|
8047
|
-
declare class NewTsDsl extends Mixed$22 {
|
|
8048
|
-
readonly '~dsl' = "NewTsDsl";
|
|
8049
|
-
protected classExpr: Ref<NewExpr>;
|
|
8050
|
-
constructor(classExpr: NewExpr, ...args: ReadonlyArray<NewExpr>);
|
|
8051
|
-
analyze(ctx: AnalysisContext): void;
|
|
8052
|
-
toAst(): ts.NewExpression;
|
|
8053
|
-
}
|
|
8054
|
-
//#endregion
|
|
8055
|
-
//#region src/ts-dsl/layout/hint.d.ts
|
|
8056
|
-
declare class HintTsDsl extends TsDsl<ts.Node> {
|
|
8057
|
-
readonly '~dsl' = "HintTsDsl";
|
|
8058
|
-
protected _lines: Array<string>;
|
|
8059
|
-
constructor(lines?: MaybeArray$1<string>, fn?: (d: HintTsDsl) => void);
|
|
8060
|
-
analyze(ctx: AnalysisContext): void;
|
|
8061
|
-
add(...lines: ReadonlyArray<string>): this;
|
|
8062
|
-
apply<T extends ts.Node>(node: T): T;
|
|
8063
|
-
toAst(): ts.Node;
|
|
8064
|
-
}
|
|
8065
|
-
//#endregion
|
|
8066
|
-
//#region src/ts-dsl/mixins/hint.d.ts
|
|
8067
|
-
interface HintMethods extends Node {
|
|
8068
|
-
$hint<T extends ts.Node>(node: T): T;
|
|
8069
|
-
hint(lines?: MaybeArray$1<string>, fn?: (h: HintTsDsl) => void): this;
|
|
8205
|
+
toAst(ctx: AstContext): ts.StringLiteral | ts.NumericLiteral | ts.NullLiteral | ts.TrueLiteral | ts.FalseLiteral | ts.PrefixUnaryExpression;
|
|
8070
8206
|
}
|
|
8071
8207
|
//#endregion
|
|
8072
8208
|
//#region src/ts-dsl/expr/prop.d.ts
|
|
@@ -8089,8 +8225,8 @@ type Meta = {
|
|
|
8089
8225
|
kind: 'spread';
|
|
8090
8226
|
name?: undefined;
|
|
8091
8227
|
};
|
|
8092
|
-
declare const Mixed$
|
|
8093
|
-
declare class ObjectPropTsDsl extends Mixed$
|
|
8228
|
+
declare const Mixed$19: MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralElementLike>, DocMethods>;
|
|
8229
|
+
declare class ObjectPropTsDsl extends Mixed$19 {
|
|
8094
8230
|
readonly '~dsl' = "ObjectPropTsDsl";
|
|
8095
8231
|
protected _value?: Ref<Expr$1 | Stmt$1>;
|
|
8096
8232
|
protected meta: Meta;
|
|
@@ -8099,7 +8235,7 @@ declare class ObjectPropTsDsl extends Mixed$21 {
|
|
|
8099
8235
|
/** Returns true when all required builder calls are present. */
|
|
8100
8236
|
get isValid(): boolean;
|
|
8101
8237
|
value(value: Expr$1 | Stmt$1 | ((p: ObjectPropTsDsl) => void)): this;
|
|
8102
|
-
toAst():
|
|
8238
|
+
toAst(ctx: AstContext): ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.SpreadAssignment;
|
|
8103
8239
|
$validate(): asserts this is this & {
|
|
8104
8240
|
_value: Expr$1 | Stmt$1;
|
|
8105
8241
|
kind: Kind;
|
|
@@ -8112,8 +8248,8 @@ type Expr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
|
8112
8248
|
type Stmt = Symbol | string | MaybeTsDsl<ts.Statement>;
|
|
8113
8249
|
type ExprFn = Expr | ((p: ObjectPropTsDsl) => void);
|
|
8114
8250
|
type StmtFn = Stmt | ((p: ObjectPropTsDsl) => void);
|
|
8115
|
-
declare const Mixed$
|
|
8116
|
-
declare class ObjectTsDsl extends Mixed$
|
|
8251
|
+
declare const Mixed$18: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralExpression>, LayoutMethods>, HintMethods>, ExprMethods>, AsMethods>;
|
|
8252
|
+
declare class ObjectTsDsl extends Mixed$18 {
|
|
8117
8253
|
readonly '~dsl' = "ObjectTsDsl";
|
|
8118
8254
|
protected _props: Array<ObjectPropTsDsl>;
|
|
8119
8255
|
constructor(...props: Array<ObjectPropTsDsl>);
|
|
@@ -8134,12 +8270,12 @@ declare class ObjectTsDsl extends Mixed$20 {
|
|
|
8134
8270
|
setter(name: string, stmt: StmtFn): this;
|
|
8135
8271
|
/** Adds a spread property (e.g. `{ ...options }`). */
|
|
8136
8272
|
spread(expr: ExprFn): this;
|
|
8137
|
-
toAst(): ts.ObjectLiteralExpression;
|
|
8273
|
+
toAst(ctx: AstContext): ts.ObjectLiteralExpression;
|
|
8138
8274
|
}
|
|
8139
8275
|
//#endregion
|
|
8140
8276
|
//#region src/ts-dsl/expr/prefix.d.ts
|
|
8141
|
-
declare const Mixed$
|
|
8142
|
-
declare class PrefixTsDsl extends Mixed$
|
|
8277
|
+
declare const Mixed$17: abstract new () => TsDsl<ts.PrefixUnaryExpression>;
|
|
8278
|
+
declare class PrefixTsDsl extends Mixed$17 {
|
|
8143
8279
|
readonly '~dsl' = "PrefixTsDsl";
|
|
8144
8280
|
protected _expr?: string | MaybeTsDsl<ts.Expression>;
|
|
8145
8281
|
protected _op?: ts.PrefixUnaryOperator;
|
|
@@ -8153,14 +8289,14 @@ declare class PrefixTsDsl extends Mixed$19 {
|
|
|
8153
8289
|
not(): this;
|
|
8154
8290
|
/** Sets the operator (e.g. `ts.SyntaxKind.ExclamationToken` for `!`). */
|
|
8155
8291
|
op(op: ts.PrefixUnaryOperator): this;
|
|
8156
|
-
toAst(): ts.PrefixUnaryExpression;
|
|
8292
|
+
toAst(ctx: AstContext): ts.PrefixUnaryExpression;
|
|
8157
8293
|
}
|
|
8158
8294
|
//#endregion
|
|
8159
8295
|
//#region src/ts-dsl/expr/regexp.d.ts
|
|
8160
8296
|
type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u' | 'y';
|
|
8161
8297
|
type RegexFlags<Avail extends string = RegexFlag> = '' | { [K in Avail]: `${K}${RegexFlags<Exclude<Avail, K>>}` }[Avail];
|
|
8162
|
-
declare const Mixed$
|
|
8163
|
-
declare class RegExpTsDsl extends Mixed$
|
|
8298
|
+
declare const Mixed$16: abstract new () => TsDsl<ts.RegularExpressionLiteral>;
|
|
8299
|
+
declare class RegExpTsDsl extends Mixed$16 {
|
|
8164
8300
|
readonly '~dsl' = "RegExpTsDsl";
|
|
8165
8301
|
protected pattern: string;
|
|
8166
8302
|
protected flags?: RegexFlags;
|
|
@@ -8169,21 +8305,9 @@ declare class RegExpTsDsl extends Mixed$18 {
|
|
|
8169
8305
|
toAst(): ts.RegularExpressionLiteral;
|
|
8170
8306
|
}
|
|
8171
8307
|
//#endregion
|
|
8172
|
-
//#region src/ts-dsl/expr/template.d.ts
|
|
8173
|
-
type TemplatePart = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
8174
|
-
declare const Mixed$17: abstract new () => TsDsl<ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression>;
|
|
8175
|
-
declare class TemplateTsDsl extends Mixed$17 {
|
|
8176
|
-
readonly '~dsl' = "TemplateTsDsl";
|
|
8177
|
-
protected parts: Array<Ref<TemplatePart>>;
|
|
8178
|
-
constructor(value?: TemplatePart);
|
|
8179
|
-
analyze(ctx: AnalysisContext): void;
|
|
8180
|
-
add(value: TemplatePart): this;
|
|
8181
|
-
toAst(): ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression;
|
|
8182
|
-
}
|
|
8183
|
-
//#endregion
|
|
8184
8308
|
//#region src/ts-dsl/expr/ternary.d.ts
|
|
8185
|
-
declare const Mixed$
|
|
8186
|
-
declare class TernaryTsDsl extends Mixed$
|
|
8309
|
+
declare const Mixed$15: abstract new () => TsDsl<ts.ConditionalExpression>;
|
|
8310
|
+
declare class TernaryTsDsl extends Mixed$15 {
|
|
8187
8311
|
readonly '~dsl' = "TernaryTsDsl";
|
|
8188
8312
|
protected _condition?: string | MaybeTsDsl<ts.Expression>;
|
|
8189
8313
|
protected _then?: string | MaybeTsDsl<ts.Expression>;
|
|
@@ -8193,49 +8317,38 @@ declare class TernaryTsDsl extends Mixed$16 {
|
|
|
8193
8317
|
condition(condition: string | MaybeTsDsl<ts.Expression>): this;
|
|
8194
8318
|
do(expr: string | MaybeTsDsl<ts.Expression>): this;
|
|
8195
8319
|
otherwise(expr: string | MaybeTsDsl<ts.Expression>): this;
|
|
8196
|
-
toAst(): ts.ConditionalExpression;
|
|
8320
|
+
toAst(ctx: AstContext): ts.ConditionalExpression;
|
|
8197
8321
|
}
|
|
8198
8322
|
//#endregion
|
|
8199
8323
|
//#region src/ts-dsl/layout/newline.d.ts
|
|
8200
8324
|
declare class NewlineTsDsl extends TsDsl<ts.Identifier> {
|
|
8201
8325
|
readonly '~dsl' = "NewlineTsDsl";
|
|
8202
8326
|
analyze(ctx: AnalysisContext): void;
|
|
8203
|
-
toAst(): ts.Identifier;
|
|
8204
|
-
}
|
|
8205
|
-
//#endregion
|
|
8206
|
-
//#region src/ts-dsl/layout/note.d.ts
|
|
8207
|
-
declare class NoteTsDsl extends TsDsl<ts.Node> {
|
|
8208
|
-
readonly '~dsl' = "NoteTsDsl";
|
|
8209
|
-
protected _lines: Array<string>;
|
|
8210
|
-
constructor(lines?: MaybeArray$1<string>, fn?: (d: NoteTsDsl) => void);
|
|
8211
|
-
analyze(ctx: AnalysisContext): void;
|
|
8212
|
-
add(...lines: ReadonlyArray<string>): this;
|
|
8213
|
-
apply<T extends ts.Node>(node: T): T;
|
|
8214
|
-
toAst(): ts.Node;
|
|
8327
|
+
toAst(ctx: AstContext): ts.Identifier;
|
|
8215
8328
|
}
|
|
8216
8329
|
//#endregion
|
|
8217
8330
|
//#region src/ts-dsl/stmt/block.d.ts
|
|
8218
|
-
declare const Mixed$
|
|
8219
|
-
declare class BlockTsDsl extends Mixed$
|
|
8331
|
+
declare const Mixed$14: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Block>, LayoutMethods>, DoMethods>;
|
|
8332
|
+
declare class BlockTsDsl extends Mixed$14 {
|
|
8220
8333
|
readonly '~dsl' = "BlockTsDsl";
|
|
8221
8334
|
constructor(...items: Array<DoExpr>);
|
|
8222
8335
|
analyze(ctx: AnalysisContext): void;
|
|
8223
|
-
toAst(): ts.Block;
|
|
8336
|
+
toAst(ctx: AstContext): ts.Block;
|
|
8224
8337
|
}
|
|
8225
8338
|
//#endregion
|
|
8226
8339
|
//#region src/ts-dsl/stmt/stmt.d.ts
|
|
8227
|
-
declare const Mixed$
|
|
8228
|
-
declare class StmtTsDsl extends Mixed$
|
|
8340
|
+
declare const Mixed$13: abstract new () => TsDsl<ts.Statement>;
|
|
8341
|
+
declare class StmtTsDsl extends Mixed$13 {
|
|
8229
8342
|
readonly '~dsl' = "StmtTsDsl";
|
|
8230
8343
|
protected _inner: ts.Expression | ts.Statement | TsDsl<any>;
|
|
8231
8344
|
constructor(inner: ts.Expression | ts.Statement | TsDsl<any>);
|
|
8232
8345
|
analyze(ctx: AnalysisContext): void;
|
|
8233
|
-
toAst(): ts.Statement;
|
|
8346
|
+
toAst(ctx: AstContext): ts.Statement;
|
|
8234
8347
|
}
|
|
8235
8348
|
//#endregion
|
|
8236
8349
|
//#region src/ts-dsl/stmt/throw.d.ts
|
|
8237
|
-
declare const Mixed$
|
|
8238
|
-
declare class ThrowTsDsl extends Mixed$
|
|
8350
|
+
declare const Mixed$12: abstract new () => TsDsl<ts.ThrowStatement>;
|
|
8351
|
+
declare class ThrowTsDsl extends Mixed$12 {
|
|
8239
8352
|
readonly '~dsl' = "ThrowTsDsl";
|
|
8240
8353
|
protected error: string | MaybeTsDsl<ts.Expression>;
|
|
8241
8354
|
protected msg?: string | MaybeTsDsl<ts.Expression>;
|
|
@@ -8243,13 +8356,13 @@ declare class ThrowTsDsl extends Mixed$13 {
|
|
|
8243
8356
|
constructor(error: string | MaybeTsDsl<ts.Expression>, useNew?: boolean);
|
|
8244
8357
|
analyze(ctx: AnalysisContext): void;
|
|
8245
8358
|
message(value: string | MaybeTsDsl<ts.Expression>): this;
|
|
8246
|
-
toAst(): ts.ThrowStatement;
|
|
8359
|
+
toAst(ctx: AstContext): ts.ThrowStatement;
|
|
8247
8360
|
}
|
|
8248
8361
|
//#endregion
|
|
8249
8362
|
//#region src/ts-dsl/stmt/try.d.ts
|
|
8250
|
-
declare const Mixed$
|
|
8363
|
+
declare const Mixed$11: abstract new () => TsDsl<ts.TryStatement>;
|
|
8251
8364
|
type CatchParam = Symbol | string;
|
|
8252
|
-
declare class TryTsDsl extends Mixed$
|
|
8365
|
+
declare class TryTsDsl extends Mixed$11 {
|
|
8253
8366
|
readonly '~dsl' = "TryTsDsl";
|
|
8254
8367
|
protected _catch?: Array<DoExpr>;
|
|
8255
8368
|
protected _catchArg?: CatchParam;
|
|
@@ -8261,25 +8374,7 @@ declare class TryTsDsl extends Mixed$12 {
|
|
|
8261
8374
|
catchArg(arg: CatchParam): this;
|
|
8262
8375
|
finally(...items: Array<DoExpr>): this;
|
|
8263
8376
|
try(...items: Array<DoExpr>): this;
|
|
8264
|
-
toAst(): ts.TryStatement;
|
|
8265
|
-
}
|
|
8266
|
-
//#endregion
|
|
8267
|
-
//#region src/ts-dsl/stmt/var.d.ts
|
|
8268
|
-
type VarName = Symbol | string;
|
|
8269
|
-
declare const Mixed$11: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.VariableStatement>, ValueMethods>, PatternMethods>, HintMethods>, ExportMethods>, DocMethods>, DefaultMethods>;
|
|
8270
|
-
declare class VarTsDsl extends Mixed$11 {
|
|
8271
|
-
readonly '~dsl' = "VarTsDsl";
|
|
8272
|
-
protected kind: ts.NodeFlags;
|
|
8273
|
-
protected name?: Ref<VarName>;
|
|
8274
|
-
protected _type?: TypeTsDsl;
|
|
8275
|
-
constructor(name?: VarName);
|
|
8276
|
-
analyze(ctx: AnalysisContext): void;
|
|
8277
|
-
const(): this;
|
|
8278
|
-
let(): this;
|
|
8279
|
-
/** Sets the variable type. */
|
|
8280
|
-
type(type: string | TypeTsDsl): this;
|
|
8281
|
-
var(): this;
|
|
8282
|
-
toAst(): ts.VariableStatement;
|
|
8377
|
+
toAst(ctx: AstContext): ts.TryStatement;
|
|
8283
8378
|
}
|
|
8284
8379
|
//#endregion
|
|
8285
8380
|
//#region src/ts-dsl/token.d.ts
|
|
@@ -8315,44 +8410,41 @@ declare class TypeAliasTsDsl extends Mixed$10 {
|
|
|
8315
8410
|
analyze(ctx: AnalysisContext): void;
|
|
8316
8411
|
/** Sets the type expression on the right-hand side of `= ...`. */
|
|
8317
8412
|
type(node: Value): this;
|
|
8318
|
-
toAst(): ts.TypeAliasDeclaration;
|
|
8413
|
+
toAst(ctx: AstContext): ts.TypeAliasDeclaration;
|
|
8319
8414
|
}
|
|
8320
8415
|
//#endregion
|
|
8321
8416
|
//#region src/ts-dsl/type/and.d.ts
|
|
8322
8417
|
type Type$1 = Symbol | string | ts.TypeNode | TypeTsDsl;
|
|
8323
|
-
declare const Mixed$9: abstract new () =>
|
|
8418
|
+
declare const Mixed$9: abstract new () => TsDsl<ts.IntersectionTypeNode>;
|
|
8324
8419
|
declare class TypeAndTsDsl extends Mixed$9 {
|
|
8325
8420
|
readonly '~dsl' = "TypeAndTsDsl";
|
|
8326
8421
|
protected _types: Array<Ref<Type$1>>;
|
|
8327
8422
|
constructor(...nodes: Array<Type$1>);
|
|
8328
8423
|
analyze(ctx: AnalysisContext): void;
|
|
8329
8424
|
types(...nodes: Array<Type$1>): this;
|
|
8330
|
-
toAst(): ts.IntersectionTypeNode;
|
|
8425
|
+
toAst(ctx: AstContext): ts.IntersectionTypeNode;
|
|
8331
8426
|
}
|
|
8332
8427
|
//#endregion
|
|
8333
8428
|
//#region src/ts-dsl/type/func.d.ts
|
|
8334
|
-
declare const Mixed$8: MixinCtor<MixinCtor<MixinCtor<abstract new () =>
|
|
8429
|
+
declare const Mixed$8: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.FunctionTypeNode>, TypeReturnsMethods>, TypeParamsMethods>, ParamMethods>, DocMethods>;
|
|
8335
8430
|
declare class TypeFuncTsDsl extends Mixed$8 {
|
|
8336
8431
|
readonly '~dsl' = "TypeFuncTsDsl";
|
|
8337
|
-
protected _returns?: TypeTsDsl;
|
|
8338
8432
|
analyze(ctx: AnalysisContext): void;
|
|
8339
|
-
|
|
8340
|
-
returns(type: string | TypeTsDsl): this;
|
|
8341
|
-
toAst(): ts.FunctionTypeNode;
|
|
8433
|
+
toAst(ctx: AstContext): ts.FunctionTypeNode;
|
|
8342
8434
|
}
|
|
8343
8435
|
//#endregion
|
|
8344
8436
|
//#region src/ts-dsl/type/literal.d.ts
|
|
8345
|
-
declare const Mixed$7: abstract new () =>
|
|
8437
|
+
declare const Mixed$7: abstract new () => TsDsl<ts.LiteralTypeNode>;
|
|
8346
8438
|
declare class TypeLiteralTsDsl extends Mixed$7 {
|
|
8347
8439
|
readonly '~dsl' = "TypeLiteralTsDsl";
|
|
8348
8440
|
protected value: string | number | boolean | null;
|
|
8349
8441
|
constructor(value: string | number | boolean | null);
|
|
8350
8442
|
analyze(ctx: AnalysisContext): void;
|
|
8351
|
-
toAst(): ts.LiteralTypeNode;
|
|
8443
|
+
toAst(ctx: AstContext): ts.LiteralTypeNode;
|
|
8352
8444
|
}
|
|
8353
8445
|
//#endregion
|
|
8354
8446
|
//#region src/ts-dsl/type/mapped.d.ts
|
|
8355
|
-
declare const Mixed$6: abstract new () =>
|
|
8447
|
+
declare const Mixed$6: abstract new () => TsDsl<ts.MappedTypeNode>;
|
|
8356
8448
|
declare class TypeMappedTsDsl extends Mixed$6 {
|
|
8357
8449
|
readonly '~dsl' = "TypeMappedTsDsl";
|
|
8358
8450
|
protected questionToken?: TokenTsDsl<ts.SyntaxKind.QuestionToken | ts.SyntaxKind.PlusToken | ts.SyntaxKind.MinusToken>;
|
|
@@ -8378,7 +8470,7 @@ declare class TypeMappedTsDsl extends Mixed$6 {
|
|
|
8378
8470
|
required(): this;
|
|
8379
8471
|
/** Sets the mapped value type: `[K in X]: ValueType` */
|
|
8380
8472
|
type(type: string | MaybeTsDsl<ts.TypeNode>): this;
|
|
8381
|
-
toAst(): ts.MappedTypeNode;
|
|
8473
|
+
toAst(ctx: AstContext): ts.MappedTypeNode;
|
|
8382
8474
|
$validate(): asserts this is this & {
|
|
8383
8475
|
_key: string | MaybeTsDsl<ts.TypeNode>;
|
|
8384
8476
|
_name: string;
|
|
@@ -8390,7 +8482,7 @@ declare class TypeMappedTsDsl extends Mixed$6 {
|
|
|
8390
8482
|
//#region src/ts-dsl/type/idx-sig.d.ts
|
|
8391
8483
|
type TypeIdxSigName = string;
|
|
8392
8484
|
type TypeIdxSigType = string | MaybeTsDsl<ts.TypeNode>;
|
|
8393
|
-
declare const Mixed$5: MixinCtor<MixinCtor<abstract new () =>
|
|
8485
|
+
declare const Mixed$5: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.IndexSignatureDeclaration>, ReadonlyMethods>, DocMethods>;
|
|
8394
8486
|
declare class TypeIdxSigTsDsl extends Mixed$5 {
|
|
8395
8487
|
readonly '~dsl' = "TypeIdxSigTsDsl";
|
|
8396
8488
|
protected _key?: TypeIdxSigType;
|
|
@@ -8404,7 +8496,7 @@ declare class TypeIdxSigTsDsl extends Mixed$5 {
|
|
|
8404
8496
|
key(type: TypeIdxSigType): this;
|
|
8405
8497
|
/** Sets the property type. */
|
|
8406
8498
|
type(type: TypeIdxSigType): this;
|
|
8407
|
-
toAst(): ts.IndexSignatureDeclaration;
|
|
8499
|
+
toAst(ctx: AstContext): ts.IndexSignatureDeclaration;
|
|
8408
8500
|
$validate(): asserts this is this & {
|
|
8409
8501
|
_key: TypeIdxSigType;
|
|
8410
8502
|
_name: TypeIdxSigName;
|
|
@@ -8416,7 +8508,7 @@ declare class TypeIdxSigTsDsl extends Mixed$5 {
|
|
|
8416
8508
|
//#region src/ts-dsl/type/prop.d.ts
|
|
8417
8509
|
type TypePropName = string;
|
|
8418
8510
|
type TypePropType = Symbol | string | MaybeTsDsl<ts.TypeNode>;
|
|
8419
|
-
declare const Mixed$4: MixinCtor<MixinCtor<MixinCtor<abstract new () =>
|
|
8511
|
+
declare const Mixed$4: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.TypeElement>, ReadonlyMethods>, OptionalMethods>, DocMethods>;
|
|
8420
8512
|
declare class TypePropTsDsl extends Mixed$4 {
|
|
8421
8513
|
readonly '~dsl' = "TypePropTsDsl";
|
|
8422
8514
|
protected name: TypePropName;
|
|
@@ -8425,11 +8517,11 @@ declare class TypePropTsDsl extends Mixed$4 {
|
|
|
8425
8517
|
analyze(ctx: AnalysisContext): void;
|
|
8426
8518
|
/** Sets the property type. */
|
|
8427
8519
|
type(type: TypePropType): this;
|
|
8428
|
-
toAst(): ts.PropertySignature;
|
|
8520
|
+
toAst(ctx: AstContext): ts.PropertySignature;
|
|
8429
8521
|
}
|
|
8430
8522
|
//#endregion
|
|
8431
8523
|
//#region src/ts-dsl/type/object.d.ts
|
|
8432
|
-
declare const Mixed$3: abstract new () =>
|
|
8524
|
+
declare const Mixed$3: abstract new () => TsDsl<ts.TypeNode>;
|
|
8433
8525
|
declare class TypeObjectTsDsl extends Mixed$3 {
|
|
8434
8526
|
readonly '~dsl' = "TypeObjectTsDsl";
|
|
8435
8527
|
protected props: Array<TypePropTsDsl | TypeIdxSigTsDsl>;
|
|
@@ -8442,23 +8534,23 @@ declare class TypeObjectTsDsl extends Mixed$3 {
|
|
|
8442
8534
|
get isEmpty(): boolean;
|
|
8443
8535
|
/** Adds a property signature (returns property builder). */
|
|
8444
8536
|
prop(name: string, fn: (p: TypePropTsDsl) => void): this;
|
|
8445
|
-
toAst(): ts.TypeLiteralNode;
|
|
8537
|
+
toAst(ctx: AstContext): ts.TypeLiteralNode;
|
|
8446
8538
|
}
|
|
8447
8539
|
//#endregion
|
|
8448
8540
|
//#region src/ts-dsl/type/or.d.ts
|
|
8449
8541
|
type Type = Symbol | string | ts.TypeNode | TypeTsDsl;
|
|
8450
|
-
declare const Mixed$2: abstract new () =>
|
|
8542
|
+
declare const Mixed$2: abstract new () => TsDsl<ts.UnionTypeNode>;
|
|
8451
8543
|
declare class TypeOrTsDsl extends Mixed$2 {
|
|
8452
8544
|
readonly '~dsl' = "TypeOrTsDsl";
|
|
8453
8545
|
protected _types: Array<Ref<Type>>;
|
|
8454
8546
|
constructor(...nodes: Array<Type>);
|
|
8455
8547
|
analyze(ctx: AnalysisContext): void;
|
|
8456
8548
|
types(...nodes: Array<Type>): this;
|
|
8457
|
-
toAst(): ts.UnionTypeNode;
|
|
8549
|
+
toAst(ctx: AstContext): ts.UnionTypeNode;
|
|
8458
8550
|
}
|
|
8459
8551
|
//#endregion
|
|
8460
8552
|
//#region src/ts-dsl/type/template.d.ts
|
|
8461
|
-
declare const Mixed$1: abstract new () =>
|
|
8553
|
+
declare const Mixed$1: abstract new () => TsDsl<ts.TemplateLiteralTypeNode>;
|
|
8462
8554
|
declare class TypeTemplateTsDsl extends Mixed$1 {
|
|
8463
8555
|
readonly '~dsl' = "TypeTemplateTsDsl";
|
|
8464
8556
|
protected parts: Array<string | MaybeTsDsl<ts.TypeNode>>;
|
|
@@ -8466,18 +8558,18 @@ declare class TypeTemplateTsDsl extends Mixed$1 {
|
|
|
8466
8558
|
analyze(ctx: AnalysisContext): void;
|
|
8467
8559
|
/** Adds a raw string segment or embedded type expression. */
|
|
8468
8560
|
add(part: string | MaybeTsDsl<ts.TypeNode>): this;
|
|
8469
|
-
toAst(): ts.TemplateLiteralTypeNode;
|
|
8561
|
+
toAst(ctx: AstContext): ts.TemplateLiteralTypeNode;
|
|
8470
8562
|
}
|
|
8471
8563
|
//#endregion
|
|
8472
8564
|
//#region src/ts-dsl/type/tuple.d.ts
|
|
8473
|
-
declare const Mixed: abstract new () =>
|
|
8565
|
+
declare const Mixed: abstract new () => TsDsl<ts.TupleTypeNode>;
|
|
8474
8566
|
declare class TypeTupleTsDsl extends Mixed {
|
|
8475
8567
|
readonly '~dsl' = "TypeTupleTsDsl";
|
|
8476
8568
|
protected _elements: Array<string | ts.TypeNode | TypeTsDsl>;
|
|
8477
8569
|
constructor(...nodes: Array<string | ts.TypeNode | TypeTsDsl>);
|
|
8478
8570
|
analyze(ctx: AnalysisContext): void;
|
|
8479
8571
|
elements(...types: Array<string | ts.TypeNode | TypeTsDsl>): this;
|
|
8480
|
-
toAst(): ts.TupleTypeNode;
|
|
8572
|
+
toAst(ctx: AstContext): ts.TupleTypeNode;
|
|
8481
8573
|
}
|
|
8482
8574
|
//#endregion
|
|
8483
8575
|
//#region src/ts-dsl/render/typescript.d.ts
|
|
@@ -8574,39 +8666,39 @@ declare const reserved: {
|
|
|
8574
8666
|
};
|
|
8575
8667
|
//#endregion
|
|
8576
8668
|
//#region src/ts-dsl/index.d.ts
|
|
8577
|
-
declare const $: ((id:
|
|
8669
|
+
declare const $: ((id: string | _hey_api_codegen_core0.Symbol | ts.Expression | TsDsl<ts.Expression>) => ExprTsDsl) & {
|
|
8578
8670
|
/** Creates an array literal expression (e.g. `[1, 2, 3]`). */
|
|
8579
8671
|
array: (...args: ConstructorParameters<typeof ArrayTsDsl>) => ArrayTsDsl;
|
|
8580
8672
|
/** Creates an `as` type assertion expression (e.g. `value as Type`). */
|
|
8581
|
-
as: (expr:
|
|
8673
|
+
as: (expr: AsExpr, type: AsType) => AsTsDsl;
|
|
8582
8674
|
/** Creates a property access expression (e.g. `obj.foo`). */
|
|
8583
|
-
attr: (left:
|
|
8675
|
+
attr: (left: AttrLeft, right: AttrRight) => AttrTsDsl;
|
|
8584
8676
|
/** Creates an await expression (e.g. `await promise`). */
|
|
8585
|
-
await: (expr:
|
|
8677
|
+
await: (expr: AwaitExpr) => AwaitTsDsl;
|
|
8586
8678
|
/** Creates a binary expression (e.g. `a + b`). */
|
|
8587
|
-
binary: (base:
|
|
8679
|
+
binary: (base: string | _hey_api_codegen_core0.Symbol | ts.Expression | TsDsl<ts.Expression>, op?: (("!=" | "!==" | "&&" | "*" | "+" | "-" | "/" | "<" | "<=" | "=" | "==" | "===" | ">" | ">=" | "??" | "??=" | "||") | ts.BinaryOperator) | undefined, expr?: (string | _hey_api_codegen_core0.Symbol | ts.Expression | TsDsl<ts.Expression>) | undefined) => BinaryTsDsl;
|
|
8588
8680
|
/** Creates a statement block (`{ ... }`). */
|
|
8589
8681
|
block: (...args: ConstructorParameters<typeof BlockTsDsl>) => BlockTsDsl;
|
|
8590
8682
|
/** Creates a function or method call expression (e.g. `fn(arg)`). */
|
|
8591
|
-
call: (callee: CallCallee, ...args:
|
|
8683
|
+
call: (callee: CallCallee, ...args: (CallArg | undefined)[]) => CallTsDsl;
|
|
8592
8684
|
/** Creates a class declaration or expression. */
|
|
8593
|
-
class: (name:
|
|
8685
|
+
class: (name: string | _hey_api_codegen_core0.Symbol) => ClassTsDsl;
|
|
8594
8686
|
/** Creates a constant variable declaration (`const`). */
|
|
8595
|
-
const: (name?:
|
|
8687
|
+
const: (name?: VarName | undefined) => VarTsDsl;
|
|
8596
8688
|
/** Creates a decorator expression (e.g. `@decorator`). */
|
|
8597
|
-
decorator: (name:
|
|
8689
|
+
decorator: (name: DecoratorName, ...args: (string | ts.Expression | TsDsl<ts.Expression>)[]) => DecoratorTsDsl;
|
|
8598
8690
|
/** Creates a JSDoc documentation block. */
|
|
8599
|
-
doc: (lines?:
|
|
8691
|
+
doc: (lines?: DocLines | undefined, fn?: DocFn | undefined) => DocTsDsl;
|
|
8600
8692
|
/** Creates an enum declaration. */
|
|
8601
|
-
enum: (name:
|
|
8693
|
+
enum: (name: EnumName, fn?: ((e: EnumTsDsl) => void) | undefined) => EnumTsDsl;
|
|
8602
8694
|
/** Creates a general expression node. */
|
|
8603
|
-
expr: (id:
|
|
8695
|
+
expr: (id: string | _hey_api_codegen_core0.Symbol | ts.Expression | TsDsl<ts.Expression>) => ExprTsDsl;
|
|
8604
8696
|
/** Creates a field declaration in a class or object. */
|
|
8605
|
-
field: (name:
|
|
8697
|
+
field: (name: FieldName, fn?: ((f: FieldTsDsl) => void) | undefined) => FieldTsDsl;
|
|
8606
8698
|
/** Converts a runtime value into a corresponding expression node. */
|
|
8607
8699
|
fromValue: (input: unknown, options?: {
|
|
8608
8700
|
layout?: "pretty";
|
|
8609
|
-
} | undefined) => TsDsl<
|
|
8701
|
+
} | undefined) => TsDsl<ts.Expression>;
|
|
8610
8702
|
/** Creates a function expression or declaration. */
|
|
8611
8703
|
func: {
|
|
8612
8704
|
(): FuncTsDsl<"arrow">;
|
|
@@ -8618,39 +8710,41 @@ declare const $: ((id: any) => ExprTsDsl) & {
|
|
|
8618
8710
|
/** Creates a getter method declaration. */
|
|
8619
8711
|
getter: (name: GetterName, fn?: ((g: GetterTsDsl) => void) | undefined) => GetterTsDsl;
|
|
8620
8712
|
/** Creates a single-line comment (//). */
|
|
8621
|
-
hint: (lines?:
|
|
8713
|
+
hint: (lines?: HintLines | undefined, fn?: HintFn | undefined) => HintTsDsl;
|
|
8622
8714
|
/** Creates an identifier (e.g. `foo`). */
|
|
8623
8715
|
id: (name: string) => IdTsDsl;
|
|
8624
8716
|
/** Creates an if statement. */
|
|
8625
8717
|
if: (condition?: IfCondition | undefined) => IfTsDsl;
|
|
8626
8718
|
/** Creates an initialization block or statement. */
|
|
8627
8719
|
init: (fn?: ((i: InitTsDsl) => void) | undefined) => InitTsDsl;
|
|
8720
|
+
/** Creates a lazy, context-aware node with deferred evaluation. */
|
|
8721
|
+
lazy: <T extends ts.Node>(thunk: LazyThunk<T>) => LazyTsDsl<T>;
|
|
8628
8722
|
/** Creates a let variable declaration (`let`). */
|
|
8629
|
-
let: (name?:
|
|
8723
|
+
let: (name?: VarName | undefined) => VarTsDsl;
|
|
8630
8724
|
/** Creates a literal value (e.g. string, number, boolean). */
|
|
8631
8725
|
literal: (value: string | number | boolean | null) => LiteralTsDsl;
|
|
8632
8726
|
/** Creates an enum member declaration. */
|
|
8633
|
-
member: (name: string, value?: ((string | number |
|
|
8727
|
+
member: (name: string, value?: ((string | number | ts.Expression | TsDsl<ts.Expression>) | ((m: EnumMemberTsDsl) => void)) | undefined) => EnumMemberTsDsl;
|
|
8634
8728
|
/** Creates a method declaration inside a class or object. */
|
|
8635
8729
|
method: (name: string, fn?: ((m: MethodTsDsl) => void) | undefined) => MethodTsDsl;
|
|
8636
8730
|
/** Creates a negation expression (`-x`). */
|
|
8637
|
-
neg: (expr?: string |
|
|
8731
|
+
neg: (expr?: string | ts.Expression | TsDsl<ts.Expression> | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl;
|
|
8638
8732
|
/** Creates a new expression (e.g. `new ClassName()`). */
|
|
8639
|
-
new: (classExpr:
|
|
8733
|
+
new: (classExpr: NewExpr, ...args: NewExpr[]) => NewTsDsl;
|
|
8640
8734
|
/** Creates a newline (for formatting purposes). */
|
|
8641
8735
|
newline: () => NewlineTsDsl;
|
|
8642
8736
|
/** Creates a logical NOT expression (`!x`). */
|
|
8643
|
-
not: (expr?: string |
|
|
8737
|
+
not: (expr?: string | ts.Expression | TsDsl<ts.Expression> | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl;
|
|
8644
8738
|
/** Creates a block comment (/* ... *\/). */
|
|
8645
|
-
note: (lines?:
|
|
8739
|
+
note: (lines?: NoteLines | undefined, fn?: NoteFn | undefined) => NoteTsDsl;
|
|
8646
8740
|
/** Creates an object literal expression. */
|
|
8647
8741
|
object: (...args: ConstructorParameters<typeof ObjectTsDsl>) => ObjectTsDsl;
|
|
8648
8742
|
/** Creates a parameter declaration for functions or methods. */
|
|
8649
|
-
param: (name:
|
|
8743
|
+
param: (name: ParamName | ((p: ParamTsDsl) => void), fn?: ((p: ParamTsDsl) => void) | undefined) => ParamTsDsl;
|
|
8650
8744
|
/** Creates a pattern for destructuring or matching. */
|
|
8651
8745
|
pattern: () => PatternTsDsl;
|
|
8652
8746
|
/** Creates a prefix unary expression (e.g. `-x`, `!x`, `~x`). */
|
|
8653
|
-
prefix: (expr?: string |
|
|
8747
|
+
prefix: (expr?: string | ts.Expression | TsDsl<ts.Expression> | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl;
|
|
8654
8748
|
/** Creates an object literal property (e.g. `{ foo: bar }`). */
|
|
8655
8749
|
prop: (meta: {
|
|
8656
8750
|
kind: "computed";
|
|
@@ -8671,37 +8765,37 @@ declare const $: ((id: any) => ExprTsDsl) & {
|
|
|
8671
8765
|
/** Creates a regular expression literal (e.g. `/foo/gi`). */
|
|
8672
8766
|
regexp: (pattern: string, flags?: ("" | "g" | "i" | "m" | "s" | "u" | "y" | "uy" | "yu" | "su" | "sy" | "suy" | "syu" | "ys" | "us" | "usy" | "uys" | "ysu" | "yus" | "ms" | "mu" | "my" | "muy" | "myu" | "msu" | "msy" | "msuy" | "msyu" | "mys" | "mus" | "musy" | "muys" | "mysu" | "myus" | "ym" | "um" | "umy" | "uym" | "ymu" | "yum" | "sm" | "smu" | "smy" | "smuy" | "smyu" | "sym" | "sum" | "sumy" | "suym" | "symu" | "syum" | "yms" | "ysm" | "ums" | "umsy" | "umys" | "usm" | "usmy" | "usym" | "uyms" | "uysm" | "ymsu" | "ymus" | "ysmu" | "ysum" | "yums" | "yusm" | "im" | "is" | "iu" | "iy" | "iuy" | "iyu" | "isu" | "isy" | "isuy" | "isyu" | "iys" | "ius" | "iusy" | "iuys" | "iysu" | "iyus" | "ims" | "imu" | "imy" | "imuy" | "imyu" | "imsu" | "imsy" | "imsuy" | "imsyu" | "imys" | "imus" | "imusy" | "imuys" | "imysu" | "imyus" | "iym" | "ium" | "iumy" | "iuym" | "iymu" | "iyum" | "ism" | "ismu" | "ismy" | "ismuy" | "ismyu" | "isym" | "isum" | "isumy" | "isuym" | "isymu" | "isyum" | "iyms" | "iysm" | "iums" | "iumsy" | "iumys" | "iusm" | "iusmy" | "iusym" | "iuyms" | "iuysm" | "iymsu" | "iymus" | "iysmu" | "iysum" | "iyums" | "iyusm" | "yi" | "ui" | "uiy" | "uyi" | "yiu" | "yui" | "si" | "siu" | "siy" | "siuy" | "siyu" | "syi" | "sui" | "suiy" | "suyi" | "syiu" | "syui" | "yis" | "ysi" | "uis" | "uisy" | "uiys" | "usi" | "usiy" | "usyi" | "uyis" | "uysi" | "yisu" | "yius" | "ysiu" | "ysui" | "yuis" | "yusi" | "mi" | "mis" | "miu" | "miy" | "miuy" | "miyu" | "misu" | "misy" | "misuy" | "misyu" | "miys" | "mius" | "miusy" | "miuys" | "miysu" | "miyus" | "myi" | "mui" | "muiy" | "muyi" | "myiu" | "myui" | "msi" | "msiu" | "msiy" | "msiuy" | "msiyu" | "msyi" | "msui" | "msuiy" | "msuyi" | "msyiu" | "msyui" | "myis" | "mysi" | "muis" | "muisy" | "muiys" | "musi" | "musiy" | "musyi" | "muyis" | "muysi" | "myisu" | "myius" | "mysiu" | "mysui" | "myuis" | "myusi" | "yim" | "ymi" | "uim" | "uimy" | "uiym" | "umi" | "umiy" | "umyi" | "uyim" | "uymi" | "yimu" | "yium" | "ymiu" | "ymui" | "yuim" | "yumi" | "sim" | "simu" | "simy" | "simuy" | "simyu" | "siym" | "sium" | "siumy" | "siuym" | "siymu" | "siyum" | "smi" | "smiu" | "smiy" | "smiuy" | "smiyu" | "smyi" | "smui" | "smuiy" | "smuyi" | "smyiu" | "smyui" | "syim" | "symi" | "suim" | "suimy" | "suiym" | "sumi" | "sumiy" | "sumyi" | "suyim" | "suymi" | "syimu" | "syium" | "symiu" | "symui" | "syuim" | "syumi" | "yims" | "yism" | "ymis" | "ymsi" | "ysim" | "ysmi" | "uims" | "uimsy" | "uimys" | "uism" | "uismy" | "uisym" | "uiyms" | "uiysm" | "umis" | "umisy" | "umiys" | "umsi" | "umsiy" | "umsyi" | "umyis" | "umysi" | "usim" | "usimy" | "usiym" | "usmi" | "usmiy" | "usmyi" | "usyim" | "usymi" | "uyims" | "uyism" | "uymis" | "uymsi" | "uysim" | "uysmi" | "yimsu" | "yimus" | "yismu" | "yisum" | "yiums" | "yiusm" | "ymisu" | "ymius" | "ymsiu" | "ymsui" | "ymuis" | "ymusi" | "ysimu" | "ysium" | "ysmiu" | "ysmui" | "ysuim" | "ysumi" | "yuims" | "yuism" | "yumis" | "yumsi" | "yusim" | "yusmi" | "gi" | "gm" | "gs" | "gu" | "gy" | "guy" | "gyu" | "gsu" | "gsy" | "gsuy" | "gsyu" | "gys" | "gus" | "gusy" | "guys" | "gysu" | "gyus" | "gms" | "gmu" | "gmy" | "gmuy" | "gmyu" | "gmsu" | "gmsy" | "gmsuy" | "gmsyu" | "gmys" | "gmus" | "gmusy" | "gmuys" | "gmysu" | "gmyus" | "gym" | "gum" | "gumy" | "guym" | "gymu" | "gyum" | "gsm" | "gsmu" | "gsmy" | "gsmuy" | "gsmyu" | "gsym" | "gsum" | "gsumy" | "gsuym" | "gsymu" | "gsyum" | "gyms" | "gysm" | "gums" | "gumsy" | "gumys" | "gusm" | "gusmy" | "gusym" | "guyms" | "guysm" | "gymsu" | "gymus" | "gysmu" | "gysum" | "gyums" | "gyusm" | "gim" | "gis" | "giu" | "giy" | "giuy" | "giyu" | "gisu" | "gisy" | "gisuy" | "gisyu" | "giys" | "gius" | "giusy" | "giuys" | "giysu" | "giyus" | "gims" | "gimu" | "gimy" | "gimuy" | "gimyu" | "gimsu" | "gimsy" | "gimsuy" | "gimsyu" | "gimys" | "gimus" | "gimusy" | "gimuys" | "gimysu" | "gimyus" | "giym" | "gium" | "giumy" | "giuym" | "giymu" | "giyum" | "gism" | "gismu" | "gismy" | "gismuy" | "gismyu" | "gisym" | "gisum" | "gisumy" | "gisuym" | "gisymu" | "gisyum" | "giyms" | "giysm" | "giums" | "giumsy" | "giumys" | "giusm" | "giusmy" | "giusym" | "giuyms" | "giuysm" | "giymsu" | "giymus" | "giysmu" | "giysum" | "giyums" | "giyusm" | "gyi" | "gui" | "guiy" | "guyi" | "gyiu" | "gyui" | "gsi" | "gsiu" | "gsiy" | "gsiuy" | "gsiyu" | "gsyi" | "gsui" | "gsuiy" | "gsuyi" | "gsyiu" | "gsyui" | "gyis" | "gysi" | "guis" | "guisy" | "guiys" | "gusi" | "gusiy" | "gusyi" | "guyis" | "guysi" | "gyisu" | "gyius" | "gysiu" | "gysui" | "gyuis" | "gyusi" | "gmi" | "gmis" | "gmiu" | "gmiy" | "gmiuy" | "gmiyu" | "gmisu" | "gmisy" | "gmisuy" | "gmisyu" | "gmiys" | "gmius" | "gmiusy" | "gmiuys" | "gmiysu" | "gmiyus" | "gmyi" | "gmui" | "gmuiy" | "gmuyi" | "gmyiu" | "gmyui" | "gmsi" | "gmsiu" | "gmsiy" | "gmsiuy" | "gmsiyu" | "gmsyi" | "gmsui" | "gmsuiy" | "gmsuyi" | "gmsyiu" | "gmsyui" | "gmyis" | "gmysi" | "gmuis" | "gmuisy" | "gmuiys" | "gmusi" | "gmusiy" | "gmusyi" | "gmuyis" | "gmuysi" | "gmyisu" | "gmyius" | "gmysiu" | "gmysui" | "gmyuis" | "gmyusi" | "gyim" | "gymi" | "guim" | "guimy" | "guiym" | "gumi" | "gumiy" | "gumyi" | "guyim" | "guymi" | "gyimu" | "gyium" | "gymiu" | "gymui" | "gyuim" | "gyumi" | "gsim" | "gsimu" | "gsimy" | "gsimuy" | "gsimyu" | "gsiym" | "gsium" | "gsiumy" | "gsiuym" | "gsiymu" | "gsiyum" | "gsmi" | "gsmiu" | "gsmiy" | "gsmiuy" | "gsmiyu" | "gsmyi" | "gsmui" | "gsmuiy" | "gsmuyi" | "gsmyiu" | "gsmyui" | "gsyim" | "gsymi" | "gsuim" | "gsuimy" | "gsuiym" | "gsumi" | "gsumiy" | "gsumyi" | "gsuyim" | "gsuymi" | "gsyimu" | "gsyium" | "gsymiu" | "gsymui" | "gsyuim" | "gsyumi" | "gyims" | "gyism" | "gymis" | "gymsi" | "gysim" | "gysmi" | "guims" | "guimsy" | "guimys" | "guism" | "guismy" | "guisym" | "guiyms" | "guiysm" | "gumis" | "gumisy" | "gumiys" | "gumsi" | "gumsiy" | "gumsyi" | "gumyis" | "gumysi" | "gusim" | "gusimy" | "gusiym" | "gusmi" | "gusmiy" | "gusmyi" | "gusyim" | "gusymi" | "guyims" | "guyism" | "guymis" | "guymsi" | "guysim" | "guysmi" | "gyimsu" | "gyimus" | "gyismu" | "gyisum" | "gyiums" | "gyiusm" | "gymisu" | "gymius" | "gymsiu" | "gymsui" | "gymuis" | "gymusi" | "gysimu" | "gysium" | "gysmiu" | "gysmui" | "gysuim" | "gysumi" | "gyuims" | "gyuism" | "gyumis" | "gyumsi" | "gyusim" | "gyusmi" | "yg" | "ug" | "ugy" | "uyg" | "ygu" | "yug" | "sg" | "sgu" | "sgy" | "sguy" | "sgyu" | "syg" | "sug" | "sugy" | "suyg" | "sygu" | "syug" | "ygs" | "ysg" | "ugs" | "ugsy" | "ugys" | "usg" | "usgy" | "usyg" | "uygs" | "uysg" | "ygsu" | "ygus" | "ysgu" | "ysug" | "yugs" | "yusg" | "mg" | "mgs" | "mgu" | "mgy" | "mguy" | "mgyu" | "mgsu" | "mgsy" | "mgsuy" | "mgsyu" | "mgys" | "mgus" | "mgusy" | "mguys" | "mgysu" | "mgyus" | "myg" | "mug" | "mugy" | "muyg" | "mygu" | "myug" | "msg" | "msgu" | "msgy" | "msguy" | "msgyu" | "msyg" | "msug" | "msugy" | "msuyg" | "msygu" | "msyug" | "mygs" | "mysg" | "mugs" | "mugsy" | "mugys" | "musg" | "musgy" | "musyg" | "muygs" | "muysg" | "mygsu" | "mygus" | "mysgu" | "mysug" | "myugs" | "myusg" | "ygm" | "ymg" | "ugm" | "ugmy" | "ugym" | "umg" | "umgy" | "umyg" | "uygm" | "uymg" | "ygmu" | "ygum" | "ymgu" | "ymug" | "yugm" | "yumg" | "sgm" | "sgmu" | "sgmy" | "sgmuy" | "sgmyu" | "sgym" | "sgum" | "sgumy" | "sguym" | "sgymu" | "sgyum" | "smg" | "smgu" | "smgy" | "smguy" | "smgyu" | "smyg" | "smug" | "smugy" | "smuyg" | "smygu" | "smyug" | "sygm" | "symg" | "sugm" | "sugmy" | "sugym" | "sumg" | "sumgy" | "sumyg" | "suygm" | "suymg" | "sygmu" | "sygum" | "symgu" | "symug" | "syugm" | "syumg" | "ygms" | "ygsm" | "ymgs" | "ymsg" | "ysgm" | "ysmg" | "ugms" | "ugmsy" | "ugmys" | "ugsm" | "ugsmy" | "ugsym" | "ugyms" | "ugysm" | "umgs" | "umgsy" | "umgys" | "umsg" | "umsgy" | "umsyg" | "umygs" | "umysg" | "usgm" | "usgmy" | "usgym" | "usmg" | "usmgy" | "usmyg" | "usygm" | "usymg" | "uygms" | "uygsm" | "uymgs" | "uymsg" | "uysgm" | "uysmg" | "ygmsu" | "ygmus" | "ygsmu" | "ygsum" | "ygums" | "ygusm" | "ymgsu" | "ymgus" | "ymsgu" | "ymsug" | "ymugs" | "ymusg" | "ysgmu" | "ysgum" | "ysmgu" | "ysmug" | "ysugm" | "ysumg" | "yugms" | "yugsm" | "yumgs" | "yumsg" | "yusgm" | "yusmg" | "ig" | "igm" | "igs" | "igu" | "igy" | "iguy" | "igyu" | "igsu" | "igsy" | "igsuy" | "igsyu" | "igys" | "igus" | "igusy" | "iguys" | "igysu" | "igyus" | "igms" | "igmu" | "igmy" | "igmuy" | "igmyu" | "igmsu" | "igmsy" | "igmsuy" | "igmsyu" | "igmys" | "igmus" | "igmusy" | "igmuys" | "igmysu" | "igmyus" | "igym" | "igum" | "igumy" | "iguym" | "igymu" | "igyum" | "igsm" | "igsmu" | "igsmy" | "igsmuy" | "igsmyu" | "igsym" | "igsum" | "igsumy" | "igsuym" | "igsymu" | "igsyum" | "igyms" | "igysm" | "igums" | "igumsy" | "igumys" | "igusm" | "igusmy" | "igusym" | "iguyms" | "iguysm" | "igymsu" | "igymus" | "igysmu" | "igysum" | "igyums" | "igyusm" | "iyg" | "iug" | "iugy" | "iuyg" | "iygu" | "iyug" | "isg" | "isgu" | "isgy" | "isguy" | "isgyu" | "isyg" | "isug" | "isugy" | "isuyg" | "isygu" | "isyug" | "iygs" | "iysg" | "iugs" | "iugsy" | "iugys" | "iusg" | "iusgy" | "iusyg" | "iuygs" | "iuysg" | "iygsu" | "iygus" | "iysgu" | "iysug" | "iyugs" | "iyusg" | "img" | "imgs" | "imgu" | "imgy" | "imguy" | "imgyu" | "imgsu" | "imgsy" | "imgsuy" | "imgsyu" | "imgys" | "imgus" | "imgusy" | "imguys" | "imgysu" | "imgyus" | "imyg" | "imug" | "imugy" | "imuyg" | "imygu" | "imyug" | "imsg" | "imsgu" | "imsgy" | "imsguy" | "imsgyu" | "imsyg" | "imsug" | "imsugy" | "imsuyg" | "imsygu" | "imsyug" | "imygs" | "imysg" | "imugs" | "imugsy" | "imugys" | "imusg" | "imusgy" | "imusyg" | "imuygs" | "imuysg" | "imygsu" | "imygus" | "imysgu" | "imysug" | "imyugs" | "imyusg" | "iygm" | "iymg" | "iugm" | "iugmy" | "iugym" | "iumg" | "iumgy" | "iumyg" | "iuygm" | "iuymg" | "iygmu" | "iygum" | "iymgu" | "iymug" | "iyugm" | "iyumg" | "isgm" | "isgmu" | "isgmy" | "isgmuy" | "isgmyu" | "isgym" | "isgum" | "isgumy" | "isguym" | "isgymu" | "isgyum" | "ismg" | "ismgu" | "ismgy" | "ismguy" | "ismgyu" | "ismyg" | "ismug" | "ismugy" | "ismuyg" | "ismygu" | "ismyug" | "isygm" | "isymg" | "isugm" | "isugmy" | "isugym" | "isumg" | "isumgy" | "isumyg" | "isuygm" | "isuymg" | "isygmu" | "isygum" | "isymgu" | "isymug" | "isyugm" | "isyumg" | "iygms" | "iygsm" | "iymgs" | "iymsg" | "iysgm" | "iysmg" | "iugms" | "iugmsy" | "iugmys" | "iugsm" | "iugsmy" | "iugsym" | "iugyms" | "iugysm" | "iumgs" | "iumgsy" | "iumgys" | "iumsg" | "iumsgy" | "iumsyg" | "iumygs" | "iumysg" | "iusgm" | "iusgmy" | "iusgym" | "iusmg" | "iusmgy" | "iusmyg" | "iusygm" | "iusymg" | "iuygms" | "iuygsm" | "iuymgs" | "iuymsg" | "iuysgm" | "iuysmg" | "iygmsu" | "iygmus" | "iygsmu" | "iygsum" | "iygums" | "iygusm" | "iymgsu" | "iymgus" | "iymsgu" | "iymsug" | "iymugs" | "iymusg" | "iysgmu" | "iysgum" | "iysmgu" | "iysmug" | "iysugm" | "iysumg" | "iyugms" | "iyugsm" | "iyumgs" | "iyumsg" | "iyusgm" | "iyusmg" | "ygi" | "yig" | "ugi" | "ugiy" | "ugyi" | "uig" | "uigy" | "uiyg" | "uygi" | "uyig" | "ygiu" | "ygui" | "yigu" | "yiug" | "yugi" | "yuig" | "sgi" | "sgiu" | "sgiy" | "sgiuy" | "sgiyu" | "sgyi" | "sgui" | "sguiy" | "sguyi" | "sgyiu" | "sgyui" | "sig" | "sigu" | "sigy" | "siguy" | "sigyu" | "siyg" | "siug" | "siugy" | "siuyg" | "siygu" | "siyug" | "sygi" | "syig" | "sugi" | "sugiy" | "sugyi" | "suig" | "suigy" | "suiyg" | "suygi" | "suyig" | "sygiu" | "sygui" | "syigu" | "syiug" | "syugi" | "syuig" | "ygis" | "ygsi" | "yigs" | "yisg" | "ysgi" | "ysig" | "ugis" | "ugisy" | "ugiys" | "ugsi" | "ugsiy" | "ugsyi" | "ugyis" | "ugysi" | "uigs" | "uigsy" | "uigys" | "uisg" | "uisgy" | "uisyg" | "uiygs" | "uiysg" | "usgi" | "usgiy" | "usgyi" | "usig" | "usigy" | "usiyg" | "usygi" | "usyig" | "uygis" | "uygsi" | "uyigs" | "uyisg" | "uysgi" | "uysig" | "ygisu" | "ygius" | "ygsiu" | "ygsui" | "yguis" | "ygusi" | "yigsu" | "yigus" | "yisgu" | "yisug" | "yiugs" | "yiusg" | "ysgiu" | "ysgui" | "ysigu" | "ysiug" | "ysugi" | "ysuig" | "yugis" | "yugsi" | "yuigs" | "yuisg" | "yusgi" | "yusig" | "mgi" | "mgis" | "mgiu" | "mgiy" | "mgiuy" | "mgiyu" | "mgisu" | "mgisy" | "mgisuy" | "mgisyu" | "mgiys" | "mgius" | "mgiusy" | "mgiuys" | "mgiysu" | "mgiyus" | "mgyi" | "mgui" | "mguiy" | "mguyi" | "mgyiu" | "mgyui" | "mgsi" | "mgsiu" | "mgsiy" | "mgsiuy" | "mgsiyu" | "mgsyi" | "mgsui" | "mgsuiy" | "mgsuyi" | "mgsyiu" | "mgsyui" | "mgyis" | "mgysi" | "mguis" | "mguisy" | "mguiys" | "mgusi" | "mgusiy" | "mgusyi" | "mguyis" | "mguysi" | "mgyisu" | "mgyius" | "mgysiu" | "mgysui" | "mgyuis" | "mgyusi" | "mig" | "migs" | "migu" | "migy" | "miguy" | "migyu" | "migsu" | "migsy" | "migsuy" | "migsyu" | "migys" | "migus" | "migusy" | "miguys" | "migysu" | "migyus" | "miyg" | "miug" | "miugy" | "miuyg" | "miygu" | "miyug" | "misg" | "misgu" | "misgy" | "misguy" | "misgyu" | "misyg" | "misug" | "misugy" | "misuyg" | "misygu" | "misyug" | "miygs" | "miysg" | "miugs" | "miugsy" | "miugys" | "miusg" | "miusgy" | "miusyg" | "miuygs" | "miuysg" | "miygsu" | "miygus" | "miysgu" | "miysug" | "miyugs" | "miyusg" | "mygi" | "myig" | "mugi" | "mugiy" | "mugyi" | "muig" | "muigy" | "muiyg" | "muygi" | "muyig" | "mygiu" | "mygui" | "myigu" | "myiug" | "myugi" | "myuig" | "msgi" | "msgiu" | "msgiy" | "msgiuy" | "msgiyu" | "msgyi" | "msgui" | "msguiy" | "msguyi" | "msgyiu" | "msgyui" | "msig" | "msigu" | "msigy" | "msiguy" | "msigyu" | "msiyg" | "msiug" | "msiugy" | "msiuyg" | "msiygu" | "msiyug" | "msygi" | "msyig" | "msugi" | "msugiy" | "msugyi" | "msuig" | "msuigy" | "msuiyg" | "msuygi" | "msuyig" | "msygiu" | "msygui" | "msyigu" | "msyiug" | "msyugi" | "msyuig" | "mygis" | "mygsi" | "myigs" | "myisg" | "mysgi" | "mysig" | "mugis" | "mugisy" | "mugiys" | "mugsi" | "mugsiy" | "mugsyi" | "mugyis" | "mugysi" | "muigs" | "muigsy" | "muigys" | "muisg" | "muisgy" | "muisyg" | "muiygs" | "muiysg" | "musgi" | "musgiy" | "musgyi" | "musig" | "musigy" | "musiyg" | "musygi" | "musyig" | "muygis" | "muygsi" | "muyigs" | "muyisg" | "muysgi" | "muysig" | "mygisu" | "mygius" | "mygsiu" | "mygsui" | "myguis" | "mygusi" | "myigsu" | "myigus" | "myisgu" | "myisug" | "myiugs" | "myiusg" | "mysgiu" | "mysgui" | "mysigu" | "mysiug" | "mysugi" | "mysuig" | "myugis" | "myugsi" | "myuigs" | "myuisg" | "myusgi" | "myusig" | "ygim" | "ygmi" | "yigm" | "yimg" | "ymgi" | "ymig" | "ugim" | "ugimy" | "ugiym" | "ugmi" | "ugmiy" | "ugmyi" | "ugyim" | "ugymi" | "uigm" | "uigmy" | "uigym" | "uimg" | "uimgy" | "uimyg" | "uiygm" | "uiymg" | "umgi" | "umgiy" | "umgyi" | "umig" | "umigy" | "umiyg" | "umygi" | "umyig" | "uygim" | "uygmi" | "uyigm" | "uyimg" | "uymgi" | "uymig" | "ygimu" | "ygium" | "ygmiu" | "ygmui" | "yguim" | "ygumi" | "yigmu" | "yigum" | "yimgu" | "yimug" | "yiugm" | "yiumg" | "ymgiu" | "ymgui" | "ymigu" | "ymiug" | "ymugi" | "ymuig" | "yugim" | "yugmi" | "yuigm" | "yuimg" | "yumgi" | "yumig" | "sgim" | "sgimu" | "sgimy" | "sgimuy" | "sgimyu" | "sgiym" | "sgium" | "sgiumy" | "sgiuym" | "sgiymu" | "sgiyum" | "sgmi" | "sgmiu" | "sgmiy" | "sgmiuy" | "sgmiyu" | "sgmyi" | "sgmui" | "sgmuiy" | "sgmuyi" | "sgmyiu" | "sgmyui" | "sgyim" | "sgymi" | "sguim" | "sguimy" | "sguiym" | "sgumi" | "sgumiy" | "sgumyi" | "sguyim" | "sguymi" | "sgyimu" | "sgyium" | "sgymiu" | "sgymui" | "sgyuim" | "sgyumi" | "sigm" | "sigmu" | "sigmy" | "sigmuy" | "sigmyu" | "sigym" | "sigum" | "sigumy" | "siguym" | "sigymu" | "sigyum" | "simg" | "simgu" | "simgy" | "simguy" | "simgyu" | "simyg" | "simug" | "simugy" | "simuyg" | "simygu" | "simyug" | "siygm" | "siymg" | "siugm" | "siugmy" | "siugym" | "siumg" | "siumgy" | "siumyg" | "siuygm" | "siuymg" | "siygmu" | "siygum" | "siymgu" | "siymug" | "siyugm" | "siyumg" | "smgi" | "smgiu" | "smgiy" | "smgiuy" | "smgiyu" | "smgyi" | "smgui" | "smguiy" | "smguyi" | "smgyiu" | "smgyui" | "smig" | "smigu" | "smigy" | "smiguy" | "smigyu" | "smiyg" | "smiug" | "smiugy" | "smiuyg" | "smiygu" | "smiyug" | "smygi" | "smyig" | "smugi" | "smugiy" | "smugyi" | "smuig" | "smuigy" | "smuiyg" | "smuygi" | "smuyig" | "smygiu" | "smygui" | "smyigu" | "smyiug" | "smyugi" | "smyuig" | "sygim" | "sygmi" | "syigm" | "syimg" | "symgi" | "symig" | "sugim" | "sugimy" | "sugiym" | "sugmi" | "sugmiy" | "sugmyi" | "sugyim" | "sugymi" | "suigm" | "suigmy" | "suigym" | "suimg" | "suimgy" | "suimyg" | "suiygm" | "suiymg" | "sumgi" | "sumgiy" | "sumgyi" | "sumig" | "sumigy" | "sumiyg" | "sumygi" | "sumyig" | "suygim" | "suygmi" | "suyigm" | "suyimg" | "suymgi" | "suymig" | "sygimu" | "sygium" | "sygmiu" | "sygmui" | "syguim" | "sygumi" | "syigmu" | "syigum" | "syimgu" | "syimug" | "syiugm" | "syiumg" | "symgiu" | "symgui" | "symigu" | "symiug" | "symugi" | "symuig" | "syugim" | "syugmi" | "syuigm" | "syuimg" | "syumgi" | "syumig" | "ygims" | "ygism" | "ygmis" | "ygmsi" | "ygsim" | "ygsmi" | "yigms" | "yigsm" | "yimgs" | "yimsg" | "yisgm" | "yismg" | "ymgis" | "ymgsi" | "ymigs" | "ymisg" | "ymsgi" | "ymsig" | "ysgim" | "ysgmi" | "ysigm" | "ysimg" | "ysmgi" | "ysmig" | "ugims" | "ugimsy" | "ugimys" | "ugism" | "ugismy" | "ugisym" | "ugiyms" | "ugiysm" | "ugmis" | "ugmisy" | "ugmiys" | "ugmsi" | "ugmsiy" | "ugmsyi" | "ugmyis" | "ugmysi" | "ugsim" | "ugsimy" | "ugsiym" | "ugsmi" | "ugsmiy" | "ugsmyi" | "ugsyim" | "ugsymi" | "ugyims" | "ugyism" | "ugymis" | "ugymsi" | "ugysim" | "ugysmi" | "uigms" | "uigmsy" | "uigmys" | "uigsm" | "uigsmy" | "uigsym" | "uigyms" | "uigysm" | "uimgs" | "uimgsy" | "uimgys" | "uimsg" | "uimsgy" | "uimsyg" | "uimygs" | "uimysg" | "uisgm" | "uisgmy" | "uisgym" | "uismg" | "uismgy" | "uismyg" | "uisygm" | "uisymg" | "uiygms" | "uiygsm" | "uiymgs" | "uiymsg" | "uiysgm" | "uiysmg" | "umgis" | "umgisy" | "umgiys" | "umgsi" | "umgsiy" | "umgsyi" | "umgyis" | "umgysi" | "umigs" | "umigsy" | "umigys" | "umisg" | "umisgy" | "umisyg" | "umiygs" | "umiysg" | "umsgi" | "umsgiy" | "umsgyi" | "umsig" | "umsigy" | "umsiyg" | "umsygi" | "umsyig" | "umygis" | "umygsi" | "umyigs" | "umyisg" | "umysgi" | "umysig" | "usgim" | "usgimy" | "usgiym" | "usgmi" | "usgmiy" | "usgmyi" | "usgyim" | "usgymi" | "usigm" | "usigmy" | "usigym" | "usimg" | "usimgy" | "usimyg" | "usiygm" | "usiymg" | "usmgi" | "usmgiy" | "usmgyi" | "usmig" | "usmigy" | "usmiyg" | "usmygi" | "usmyig" | "usygim" | "usygmi" | "usyigm" | "usyimg" | "usymgi" | "usymig" | "uygims" | "uygism" | "uygmis" | "uygmsi" | "uygsim" | "uygsmi" | "uyigms" | "uyigsm" | "uyimgs" | "uyimsg" | "uyisgm" | "uyismg" | "uymgis" | "uymgsi" | "uymigs" | "uymisg" | "uymsgi" | "uymsig" | "uysgim" | "uysgmi" | "uysigm" | "uysimg" | "uysmgi" | "uysmig" | "ygimsu" | "ygimus" | "ygismu" | "ygisum" | "ygiums" | "ygiusm" | "ygmisu" | "ygmius" | "ygmsiu" | "ygmsui" | "ygmuis" | "ygmusi" | "ygsimu" | "ygsium" | "ygsmiu" | "ygsmui" | "ygsuim" | "ygsumi" | "yguims" | "yguism" | "ygumis" | "ygumsi" | "ygusim" | "ygusmi" | "yigmsu" | "yigmus" | "yigsmu" | "yigsum" | "yigums" | "yigusm" | "yimgsu" | "yimgus" | "yimsgu" | "yimsug" | "yimugs" | "yimusg" | "yisgmu" | "yisgum" | "yismgu" | "yismug" | "yisugm" | "yisumg" | "yiugms" | "yiugsm" | "yiumgs" | "yiumsg" | "yiusgm" | "yiusmg" | "ymgisu" | "ymgius" | "ymgsiu" | "ymgsui" | "ymguis" | "ymgusi" | "ymigsu" | "ymigus" | "ymisgu" | "ymisug" | "ymiugs" | "ymiusg" | "ymsgiu" | "ymsgui" | "ymsigu" | "ymsiug" | "ymsugi" | "ymsuig" | "ymugis" | "ymugsi" | "ymuigs" | "ymuisg" | "ymusgi" | "ymusig" | "ysgimu" | "ysgium" | "ysgmiu" | "ysgmui" | "ysguim" | "ysgumi" | "ysigmu" | "ysigum" | "ysimgu" | "ysimug" | "ysiugm" | "ysiumg" | "ysmgiu" | "ysmgui" | "ysmigu" | "ysmiug" | "ysmugi" | "ysmuig" | "ysugim" | "ysugmi" | "ysuigm" | "ysuimg" | "ysumgi" | "ysumig" | "yugims" | "yugism" | "yugmis" | "yugmsi" | "yugsim" | "yugsmi" | "yuigms" | "yuigsm" | "yuimgs" | "yuimsg" | "yuisgm" | "yuismg" | "yumgis" | "yumgsi" | "yumigs" | "yumisg" | "yumsgi" | "yumsig" | "yusgim" | "yusgmi" | "yusigm" | "yusimg" | "yusmgi" | "yusmig") | undefined) => RegExpTsDsl;
|
|
8673
8767
|
/** Creates a return statement. */
|
|
8674
|
-
return: (expr?:
|
|
8768
|
+
return: (expr?: ReturnExpr | undefined) => ReturnTsDsl;
|
|
8675
8769
|
/** Creates a setter method declaration. */
|
|
8676
8770
|
setter: (name: SetterName, fn?: ((s: SetterTsDsl) => void) | undefined) => SetterTsDsl;
|
|
8677
8771
|
/** Wraps an expression or statement-like value into a `StmtTsDsl`. */
|
|
8678
|
-
stmt: (inner:
|
|
8772
|
+
stmt: (inner: ts.Expression | ts.Statement | TsDsl<any>) => StmtTsDsl;
|
|
8679
8773
|
/** Creates a template literal expression. */
|
|
8680
|
-
template: (value?:
|
|
8774
|
+
template: (value?: TemplatePart | undefined) => TemplateTsDsl;
|
|
8681
8775
|
/** Creates a ternary conditional expression (if ? then : else). */
|
|
8682
|
-
ternary: (condition?: string |
|
|
8776
|
+
ternary: (condition?: string | ts.Expression | TsDsl<ts.Expression> | undefined) => TernaryTsDsl;
|
|
8683
8777
|
/** Creates a throw statement. */
|
|
8684
|
-
throw: (error: string |
|
|
8778
|
+
throw: (error: string | ts.Expression | TsDsl<ts.Expression>, useNew?: boolean | undefined) => ThrowTsDsl;
|
|
8685
8779
|
/** Creates a syntax token (e.g. `?`, `readonly`, `+`, `-`). */
|
|
8686
8780
|
token: () => TokenTsDsl<never>;
|
|
8687
8781
|
/** Creates a try/catch/finally statement. */
|
|
8688
8782
|
try: (...args: ConstructorParameters<typeof TryTsDsl>) => TryTsDsl;
|
|
8689
8783
|
/** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */
|
|
8690
|
-
type: ((name:
|
|
8784
|
+
type: ((name: TypeExprName, fn?: TypeExprFn | undefined) => TypeExprTsDsl) & {
|
|
8691
8785
|
/** Creates a type alias declaration (e.g. `type Foo = Bar`). */
|
|
8692
|
-
alias: (name:
|
|
8786
|
+
alias: (name: string | _hey_api_codegen_core0.Symbol, fn?: ((t: TypeAliasTsDsl) => void) | undefined) => TypeAliasTsDsl;
|
|
8693
8787
|
/** Creates an intersection type (e.g. `A & B`). */
|
|
8694
8788
|
and: (...args: ConstructorParameters<typeof TypeAndTsDsl>) => TypeAndTsDsl;
|
|
8695
8789
|
/** Creates a qualified type reference (e.g. Foo.Bar). */
|
|
8696
|
-
attr: (right:
|
|
8790
|
+
attr: (right: string | _hey_api_codegen_core0.Symbol | ts.Identifier) => TypeAttrTsDsl;
|
|
8697
8791
|
/** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */
|
|
8698
|
-
expr: (name:
|
|
8792
|
+
expr: (name: TypeExprName, fn?: TypeExprFn | undefined) => TypeExprTsDsl;
|
|
8699
8793
|
/** Converts a runtime value into a corresponding type expression node. */
|
|
8700
|
-
fromValue: (input: unknown) => TsDsl<
|
|
8794
|
+
fromValue: (input: unknown) => TsDsl<ts.TypeNode>;
|
|
8701
8795
|
/** Creates a function type node (e.g. `(a: string) => number`). */
|
|
8702
8796
|
func: (...args: ConstructorParameters<typeof TypeFuncTsDsl>) => TypeFuncTsDsl;
|
|
8703
8797
|
/** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
|
|
8704
|
-
idx: (base: string |
|
|
8798
|
+
idx: (base: string | ts.TypeNode | TsDsl<ts.TypeNode>, index: string | number | ts.TypeNode | TsDsl<ts.TypeNode>) => TypeIdxTsDsl;
|
|
8705
8799
|
/** Creates a literal type node (e.g. 'foo', 42, or true). */
|
|
8706
8800
|
literal: (value: string | number | boolean | null) => TypeLiteralTsDsl;
|
|
8707
8801
|
/** Creates a mapped type (e.g. `{ [K in keyof T]: U }`). */
|
|
@@ -8713,18 +8807,18 @@ declare const $: ((id: any) => ExprTsDsl) & {
|
|
|
8713
8807
|
/** Represents a union type (e.g. `A | B | C`). */
|
|
8714
8808
|
or: (...args: ConstructorParameters<typeof TypeOrTsDsl>) => TypeOrTsDsl;
|
|
8715
8809
|
/** Creates a type parameter (e.g. `<T>`). */
|
|
8716
|
-
param: (name?:
|
|
8810
|
+
param: (name?: TypeParamName | undefined, fn?: ((name: TypeParamTsDsl) => void) | undefined) => TypeParamTsDsl;
|
|
8717
8811
|
/** Creates a type query node (e.g. `typeof Foo`). */
|
|
8718
|
-
query: (expr:
|
|
8812
|
+
query: (expr: TypeQueryExpr) => TypeQueryTsDsl;
|
|
8719
8813
|
/** Builds a TypeScript template literal *type* (e.g. `${Foo}-${Bar}` as a type). */
|
|
8720
|
-
template: (value?: string |
|
|
8814
|
+
template: (value?: string | ts.TypeNode | TsDsl<ts.TypeNode> | undefined) => TypeTemplateTsDsl;
|
|
8721
8815
|
/** Creates a tuple type (e.g. [A, B, C]). */
|
|
8722
8816
|
tuple: (...args: ConstructorParameters<typeof TypeTupleTsDsl>) => TypeTupleTsDsl;
|
|
8723
8817
|
};
|
|
8724
|
-
/** Creates a
|
|
8725
|
-
typeofExpr: (expr:
|
|
8726
|
-
/** Creates a variable declaration (var). */
|
|
8727
|
-
var: (name?:
|
|
8818
|
+
/** Creates a `typeof` expression (e.g. `typeof value`). */
|
|
8819
|
+
typeofExpr: (expr: TypeOfExpr) => TypeOfExprTsDsl;
|
|
8820
|
+
/** Creates a variable declaration (`var`). */
|
|
8821
|
+
var: (name?: VarName | undefined) => VarTsDsl;
|
|
8728
8822
|
};
|
|
8729
8823
|
type DollarTsDsl = {
|
|
8730
8824
|
/**
|
|
@@ -8741,7 +8835,7 @@ type DollarTsDsl = {
|
|
|
8741
8835
|
*
|
|
8742
8836
|
* Returns:
|
|
8743
8837
|
* - A new `ExprTsDsl` instance when called directly.
|
|
8744
|
-
* - The `
|
|
8838
|
+
* - The `tsDsl` object for constructing more specific nodes.
|
|
8745
8839
|
*/
|
|
8746
8840
|
$: typeof $;
|
|
8747
8841
|
};
|
|
@@ -15007,8 +15101,6 @@ declare class PluginInstance<T extends Plugin.Types = Plugin.Types> {
|
|
|
15007
15101
|
gen: IProject;
|
|
15008
15102
|
name: string;
|
|
15009
15103
|
});
|
|
15010
|
-
addNode(node: Node | null): number;
|
|
15011
|
-
updateNode(index: number, node: Node | null): void;
|
|
15012
15104
|
/**
|
|
15013
15105
|
* Iterates over various input elements as specified by the event types, in
|
|
15014
15106
|
* a specific order: servers, schemas, parameters, request bodies, then
|
|
@@ -15059,6 +15151,14 @@ declare class PluginInstance<T extends Plugin.Types = Plugin.Types> {
|
|
|
15059
15151
|
};
|
|
15060
15152
|
};
|
|
15061
15153
|
isSymbolRegistered(identifier: SymbolIdentifier): boolean;
|
|
15154
|
+
/**
|
|
15155
|
+
* Sets or adds a node to the project graph.
|
|
15156
|
+
*
|
|
15157
|
+
* @param node The node to be added or updated in the project graph.
|
|
15158
|
+
* @param index The index at which to update the node. If undefined, the node will be added.
|
|
15159
|
+
* @returns The index of the added node or void if updated.
|
|
15160
|
+
*/
|
|
15161
|
+
node<T extends number | undefined = undefined>(node: Node | null, index?: T): T extends number ? void : number;
|
|
15062
15162
|
querySymbol(filter: SymbolMeta): Symbol | undefined;
|
|
15063
15163
|
referenceSymbol(meta: SymbolMeta): Symbol;
|
|
15064
15164
|
/**
|
|
@@ -15637,8 +15737,8 @@ type UserOutput = {
|
|
|
15637
15737
|
/**
|
|
15638
15738
|
* If specified, this will be the file extension used when importing
|
|
15639
15739
|
* other modules. By default, we don't add a file extension and let the
|
|
15640
|
-
* runtime resolve it. If you're using moduleResolution `nodenext
|
|
15641
|
-
* default to `.js`.
|
|
15740
|
+
* runtime resolve it. If you're using moduleResolution `nodenext` or
|
|
15741
|
+
* `node16`, we default to `.js`.
|
|
15642
15742
|
*
|
|
15643
15743
|
* @default undefined
|
|
15644
15744
|
*/
|
|
@@ -15736,8 +15836,8 @@ type Output = {
|
|
|
15736
15836
|
/**
|
|
15737
15837
|
* If specified, this will be the file extension used when importing
|
|
15738
15838
|
* other modules. By default, we don't add a file extension and let the
|
|
15739
|
-
* runtime resolve it. If you're using moduleResolution `nodenext
|
|
15740
|
-
* default to `.js`.
|
|
15839
|
+
* runtime resolve it. If you're using moduleResolution `nodenext` or
|
|
15840
|
+
* `node16`, we default to `.js`.
|
|
15741
15841
|
*/
|
|
15742
15842
|
importFileExtension: ImportFileExtensions | (string & {}) | null | undefined;
|
|
15743
15843
|
/**
|
|
@@ -16424,4 +16524,4 @@ type Config = Omit<Required<UserConfig>, 'input' | 'logs' | 'output' | 'parser'
|
|
|
16424
16524
|
};
|
|
16425
16525
|
//#endregion
|
|
16426
16526
|
export { Client$4 as A, MaybeTsDsl as C, PluginHandler as D, Client as E, IR$1 as F, LazyOrAsync as I, MaybeArray as L, Client$6 as M, Client$7 as N, Client$2 as O, StringCase as P, TypeScriptRenderer as S, TypeTsDsl as T, $ as _, Plugin as a, regexp as b, OpenApiOperationObject as c, OpenApiResponseObject as d, OpenApiSchemaObject as f, ExpressionTransformer as g, TypeTransformer as h, DefinePlugin as i, Client$5 as j, Client$3 as k, OpenApiParameterObject as l, Logger as m, UserConfig as n, OpenApi as o, Context as p, Input as r, OpenApiMetaObject as s, Config as t, OpenApiRequestBodyObject as u, DollarTsDsl as v, TsDsl as w, keywords as x, reserved as y };
|
|
16427
|
-
//# sourceMappingURL=config-
|
|
16527
|
+
//# sourceMappingURL=config-DsA-xawl.d.mts.map
|