@hey-api/openapi-ts 0.89.0 → 0.89.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { AnalysisContext, File, FromRef, IProject, Language, NameConflictResolver, Node, Project, Ref, Refs, RenderContext, Renderer, Symbol, SymbolIdentifier, SymbolIn, SymbolMeta } from "@hey-api/codegen-core";
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";
2
3
  import { RangeOptions, SemVer } from "semver";
3
- import * as typescript0 from "typescript";
4
4
  import ts from "typescript";
5
5
 
6
6
  //#region src/openApi/shared/types/openapi-spec-extensions.d.ts
@@ -31,12 +31,20 @@ type LazyOrAsync<T> = T | (() => T) | (() => Promise<T>);
31
31
  type MaybeArray<T> = T | ReadonlyArray<T>;
32
32
  //#endregion
33
33
  //#region src/openApi/3.1.x/types/spec.d.ts
34
+ /**
35
+ * OpenAPI Specification Extensions.
36
+ *
37
+ * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
38
+ */
39
+ interface SpecificationExtensions$2 {
40
+ [extension: `x-${string}`]: unknown;
41
+ }
34
42
  /**
35
43
  * 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}.
36
44
  *
37
45
  * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
38
46
  */
39
- interface OpenApiV3_1_X {
47
+ interface OpenApiV3_1_X extends SpecificationExtensions$2 {
40
48
  /**
41
49
  * An element to hold various schemas for the document.
42
50
  */
@@ -159,11 +167,11 @@ interface OpenApiV3_1_X {
159
167
  * description: callback successfully processed
160
168
  * ```
161
169
  */
162
- interface CallbackObject$1 {
170
+ interface CallbackObject$1 extends SpecificationExtensions$2 {
163
171
  /**
164
172
  * 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.
165
173
  */
166
- [expression: string]: PathItemObject$2 | ReferenceObject$1;
174
+ [expression: string]: PathItemObject$2 | ReferenceObject$1 | unknown;
167
175
  }
168
176
  /**
169
177
  * 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.
@@ -254,7 +262,7 @@ interface CallbackObject$1 {
254
262
  * read:pets: read your pets
255
263
  * ```
256
264
  */
257
- interface ComponentsObject$1 {
265
+ interface ComponentsObject$1 extends SpecificationExtensions$2 {
258
266
  /**
259
267
  * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#callback-object Callback Objects}.
260
268
  */
@@ -308,7 +316,7 @@ interface ComponentsObject$1 {
308
316
  * email: support@example.com
309
317
  * ```
310
318
  */
311
- interface ContactObject$2 {
319
+ interface ContactObject$2 extends SpecificationExtensions$2 {
312
320
  /**
313
321
  * The email address of the contact person/organization. This MUST be in the form of an email address.
314
322
  */
@@ -448,7 +456,7 @@ interface ContactObject$2 {
448
456
  *
449
457
  * will map to `Dog` because of the definition in the `mapping` element.
450
458
  */
451
- interface DiscriminatorObject$1 {
459
+ interface DiscriminatorObject$1 extends SpecificationExtensions$2 {
452
460
  /**
453
461
  * An object to hold mappings between payload values and schema names or references.
454
462
  */
@@ -499,7 +507,7 @@ interface DiscriminatorObject$1 {
499
507
  * type: integer
500
508
  * ```
501
509
  */
502
- interface EncodingObject$1 {
510
+ interface EncodingObject$1 extends SpecificationExtensions$2 {
503
511
  /**
504
512
  * 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.
505
513
  */
@@ -587,7 +595,7 @@ interface EncodingObject$1 {
587
595
  * $ref: '#/components/examples/confirmation-success'
588
596
  * ```
589
597
  */
590
- interface ExampleObject$2 {
598
+ interface ExampleObject$2 extends SpecificationExtensions$2 {
591
599
  /**
592
600
  * Long description for the example. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
593
601
  */
@@ -616,7 +624,7 @@ interface ExampleObject$2 {
616
624
  * url: https://example.com
617
625
  * ```
618
626
  */
619
- interface ExternalDocumentationObject$2 {
627
+ interface ExternalDocumentationObject$2 extends SpecificationExtensions$2 {
620
628
  /**
621
629
  * A description of the target documentation. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
622
630
  */
@@ -662,7 +670,7 @@ type HeaderObject$2 = Omit<ParameterObject, 'in' | 'name'>;
662
670
  * version: 1.0.1
663
671
  * ```
664
672
  */
665
- interface InfoObject {
673
+ interface InfoObject extends SpecificationExtensions$2 {
666
674
  /**
667
675
  * The contact information for the exposed API.
668
676
  */
@@ -703,7 +711,7 @@ interface InfoObject {
703
711
  * identifier: Apache-2.0
704
712
  * ```
705
713
  */
706
- interface LicenseObject$2 {
714
+ interface LicenseObject$2 extends SpecificationExtensions$2 {
707
715
  /**
708
716
  * An {@link https://spdx.org/licenses/ SPDX} license expression for the API. The `identifier` field is mutually exclusive of the `url` field.
709
717
  */
@@ -864,7 +872,7 @@ interface LicenseObject$2 {
864
872
  *
865
873
  * Runtime expressions preserve the type of the referenced value. Expressions can be embedded into string values by surrounding the expression with `{}` curly braces.
866
874
  */
867
- interface LinkObject$1 {
875
+ interface LinkObject$1 extends SpecificationExtensions$2 {
868
876
  /**
869
877
  * A description of the link. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
870
878
  */
@@ -923,7 +931,7 @@ interface LinkObject$1 {
923
931
  * $ref: "#/components/examples/frog-example"
924
932
  * ```
925
933
  */
926
- interface MediaTypeObject$1 {
934
+ interface MediaTypeObject$1 extends SpecificationExtensions$2 {
927
935
  /**
928
936
  * 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`.
929
937
  */
@@ -964,7 +972,7 @@ interface MediaTypeObject$1 {
964
972
  * read:pets: read your pets
965
973
  * ```
966
974
  */
967
- interface OAuthFlowObject$1 {
975
+ interface OAuthFlowObject$1 extends SpecificationExtensions$2 {
968
976
  /**
969
977
  * **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.
970
978
  */
@@ -987,7 +995,7 @@ interface OAuthFlowObject$1 {
987
995
  *
988
996
  * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
989
997
  */
990
- interface OAuthFlowsObject$1 {
998
+ interface OAuthFlowsObject$1 extends SpecificationExtensions$2 {
991
999
  /**
992
1000
  * Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.
993
1001
  */
@@ -1054,7 +1062,7 @@ interface OAuthFlowsObject$1 {
1054
1062
  * - read:pets
1055
1063
  * ```
1056
1064
  */
1057
- interface OperationObject {
1065
+ interface OperationObject extends SpecificationExtensions$2 {
1058
1066
  /**
1059
1067
  * 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.
1060
1068
  */
@@ -1201,7 +1209,7 @@ interface OperationObject {
1201
1209
  * type: number
1202
1210
  * ```
1203
1211
  */
1204
- interface ParameterObject {
1212
+ interface ParameterObject extends SpecificationExtensions$2 {
1205
1213
  /**
1206
1214
  * 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.
1207
1215
  */
@@ -1296,7 +1304,7 @@ interface ParameterObject {
1296
1304
  * style: simple
1297
1305
  * ```
1298
1306
  */
1299
- interface PathItemObject$2 {
1307
+ interface PathItemObject$2 extends SpecificationExtensions$2 {
1300
1308
  /**
1301
1309
  * 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}.
1302
1310
  */
@@ -1395,7 +1403,7 @@ interface PathItemObject$2 {
1395
1403
  * $ref: '#/components/schemas/pet'
1396
1404
  * ```
1397
1405
  */
1398
- interface PathsObject$2 {
1406
+ interface PathsObject$2 extends SpecificationExtensions$2 {
1399
1407
  /**
1400
1408
  * 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.
1401
1409
  */
@@ -1498,7 +1506,7 @@ interface ReferenceObject$1 {
1498
1506
  * type: string
1499
1507
  * ```
1500
1508
  */
1501
- interface RequestBodyObject {
1509
+ interface RequestBodyObject extends SpecificationExtensions$2 {
1502
1510
  /**
1503
1511
  * **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/*
1504
1512
  */
@@ -1573,7 +1581,7 @@ interface RequestBodyObject {
1573
1581
  * description: object created
1574
1582
  * ```
1575
1583
  */
1576
- interface ResponseObject {
1584
+ interface ResponseObject extends SpecificationExtensions$2 {
1577
1585
  /**
1578
1586
  * 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/*
1579
1587
  */
@@ -1620,11 +1628,11 @@ interface ResponseObject {
1620
1628
  * $ref: '#/components/schemas/ErrorModel'
1621
1629
  * ```
1622
1630
  */
1623
- interface ResponsesObject$2 {
1631
+ interface ResponsesObject$2 extends SpecificationExtensions$2 {
1624
1632
  /**
1625
1633
  * 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.
1626
1634
  */
1627
- [httpStatusCode: string]: ResponseObject | ReferenceObject$1 | undefined;
1635
+ [httpStatusCode: string]: ResponseObject | ReferenceObject$1 | undefined | unknown;
1628
1636
  /**
1629
1637
  * The documentation of responses other than the ones declared for specific HTTP response codes. Use this field to cover undeclared responses.
1630
1638
  */
@@ -1654,7 +1662,7 @@ interface ResponsesObject$2 {
1654
1662
  *
1655
1663
  * 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.
1656
1664
  */
1657
- type SchemaObject = JsonSchemaDraft2020_12;
1665
+ type SchemaObject = JsonSchemaDraft2020_12 & SpecificationExtensions$2;
1658
1666
  /**
1659
1667
  * 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}.
1660
1668
  *
@@ -1739,7 +1747,7 @@ interface SecurityRequirementObject$2 {
1739
1747
  * read:pets: read your pets
1740
1748
  * ```
1741
1749
  */
1742
- type SecuritySchemeObject$2 = {
1750
+ type SecuritySchemeObject$2 = SpecificationExtensions$2 & {
1743
1751
  /**
1744
1752
  * A description for security scheme. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1745
1753
  */
@@ -1805,7 +1813,7 @@ type SecuritySchemeObject$2 = {
1805
1813
  * description: Development server
1806
1814
  * ```
1807
1815
  */
1808
- interface ServerObject$1 {
1816
+ interface ServerObject$1 extends SpecificationExtensions$2 {
1809
1817
  /**
1810
1818
  * An optional string describing the host designated by the URL. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1811
1819
  */
@@ -1824,7 +1832,7 @@ interface ServerObject$1 {
1824
1832
  *
1825
1833
  * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
1826
1834
  */
1827
- interface ServerVariableObject$1 {
1835
+ interface ServerVariableObject$1 extends SpecificationExtensions$2 {
1828
1836
  /**
1829
1837
  * **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.
1830
1838
  */
@@ -1849,7 +1857,7 @@ interface ServerVariableObject$1 {
1849
1857
  * description: Pets operations
1850
1858
  * ```
1851
1859
  */
1852
- interface TagObject$2 {
1860
+ interface TagObject$2 extends SpecificationExtensions$2 {
1853
1861
  /**
1854
1862
  * A description for the tag. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
1855
1863
  */
@@ -2055,7 +2063,7 @@ interface TagObject$2 {
2055
2063
  * </aliens>
2056
2064
  * ```
2057
2065
  */
2058
- interface XMLObject$2 {
2066
+ interface XMLObject$2 extends SpecificationExtensions$2 {
2059
2067
  /**
2060
2068
  * Declares whether the property definition translates to an attribute instead of an element. Default value is `false`.
2061
2069
  */
@@ -2102,7 +2110,7 @@ interface OpenApiSchemaExtensions {
2102
2110
  //#endregion
2103
2111
  //#region src/openApi/3.1.x/types/json-schema-draft-2020-12.d.ts
2104
2112
  // TODO: left out some keywords related to structuring a complex schema and declaring a dialect
2105
- interface JsonSchemaDraft2020_12 extends ArrayKeywords, NumberKeywords, ObjectKeywords, StringKeywords, EnumExtensions, OpenApiSchemaExtensions {
2113
+ interface JsonSchemaDraft2020_12 extends ArrayKeywords, NumberKeywords, ObjectKeywords, StringKeywords, EnumExtensions, OpenApiSchemaExtensions, SpecificationExtensions$2 {
2106
2114
  /**
2107
2115
  * 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.
2108
2116
  */
@@ -2427,6 +2435,14 @@ type JsonSchemaTypes$1 = 'array' | 'boolean' | 'integer' | 'null' | 'number' | '
2427
2435
  type IRMediaType = 'form-data' | 'json' | 'text' | 'url-search-params' | 'octet-stream';
2428
2436
  //#endregion
2429
2437
  //#region src/ir/types.d.ts
2438
+ /**
2439
+ * OpenAPI Specification Extensions.
2440
+ *
2441
+ * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#specification-extensions Specification Extensions}.
2442
+ */
2443
+ interface SpecificationExtensions$1 {
2444
+ [extension: `x-${string}`]: unknown;
2445
+ }
2430
2446
  interface IRBodyObject {
2431
2447
  mediaType: string;
2432
2448
  /**
@@ -2443,7 +2459,7 @@ interface IRComponentsObject {
2443
2459
  requestBodies?: Record<string, IRRequestBodyObject>;
2444
2460
  schemas?: Record<string, IRSchemaObject>;
2445
2461
  }
2446
- interface IROperationObject {
2462
+ interface IROperationObject extends SpecificationExtensions$1 {
2447
2463
  body?: IRBodyObject;
2448
2464
  deprecated?: boolean;
2449
2465
  description?: string;
@@ -2464,7 +2480,7 @@ interface IRParametersObject {
2464
2480
  path?: Record<string, IRParameterObject>;
2465
2481
  query?: Record<string, IRParameterObject>;
2466
2482
  }
2467
- interface IRParameterObject extends Pick<JsonSchemaDraft2020_12, 'deprecated' | 'description'> {
2483
+ interface IRParameterObject extends Pick<JsonSchemaDraft2020_12, 'deprecated' | 'description'>, SpecificationExtensions$1 {
2468
2484
  /**
2469
2485
  * 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.
2470
2486
  */
@@ -2522,7 +2538,7 @@ interface IRResponseObject {
2522
2538
  mediaType?: string;
2523
2539
  schema: IRSchemaObject;
2524
2540
  }
2525
- interface IRSchemaObject extends Pick<JsonSchemaDraft2020_12, '$ref' | 'const' | 'default' | 'deprecated' | 'description' | 'exclusiveMaximum' | 'exclusiveMinimum' | 'maximum' | 'maxItems' | 'maxLength' | 'minimum' | 'minItems' | 'minLength' | 'pattern' | 'required' | 'title' | 'example'> {
2541
+ 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 {
2526
2542
  /**
2527
2543
  * If the schema is intended to be used as an object property, it can be
2528
2544
  * marked as read-only or write-only. This value controls whether the schema
@@ -2551,6 +2567,11 @@ interface IRSchemaObject extends Pick<JsonSchemaDraft2020_12, '$ref' | 'const' |
2551
2567
  * @default 'or'
2552
2568
  */
2553
2569
  logicalOperator?: 'and' | 'or';
2570
+ /**
2571
+ * When used with `$ref` or `symbolRef`, specifies properties to omit from the referenced schema.
2572
+ * Useful for handling discriminator property conflicts in allOf compositions.
2573
+ */
2574
+ omit?: ReadonlyArray<string>;
2554
2575
  /**
2555
2576
  * When type is `object`, `patternProperties` can be used to define a schema
2556
2577
  * for properties that match a specific regex pattern.
@@ -4746,12 +4767,20 @@ interface OpenApiV2_0_XTypes {
4746
4767
  }
4747
4768
  //#endregion
4748
4769
  //#region src/openApi/3.0.x/types/spec.d.ts
4770
+ /**
4771
+ * OpenAPI Specification Extensions.
4772
+ *
4773
+ * See {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
4774
+ */
4775
+ interface SpecificationExtensions {
4776
+ [extension: `x-${string}`]: unknown;
4777
+ }
4749
4778
  /**
4750
4779
  * 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}.
4751
4780
  *
4752
4781
  * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
4753
4782
  */
4754
- interface OpenApiV3_0_X {
4783
+ interface OpenApiV3_0_X extends SpecificationExtensions {
4755
4784
  /**
4756
4785
  * An element to hold various Objects for the OpenAPI Description.
4757
4786
  */
@@ -4792,11 +4821,11 @@ interface OpenApiV3_0_X {
4792
4821
  *
4793
4822
  * TODO: examples
4794
4823
  */
4795
- interface CallbackObject {
4824
+ interface CallbackObject extends SpecificationExtensions {
4796
4825
  /**
4797
4826
  * 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.
4798
4827
  */
4799
- [expression: string]: PathItemObject | ReferenceObject$2;
4828
+ [expression: string]: PathItemObject | ReferenceObject$2 | unknown;
4800
4829
  }
4801
4830
  /**
4802
4831
  * 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.
@@ -4807,7 +4836,7 @@ interface CallbackObject {
4807
4836
  *
4808
4837
  * TODO: examples
4809
4838
  */
4810
- interface ComponentsObject {
4839
+ interface ComponentsObject extends SpecificationExtensions {
4811
4840
  /**
4812
4841
  * An object to hold reusable {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#callback-object Callback Objects}.
4813
4842
  */
@@ -4856,7 +4885,7 @@ interface ComponentsObject {
4856
4885
  * email: support@example.com
4857
4886
  * ```
4858
4887
  */
4859
- interface ContactObject {
4888
+ interface ContactObject extends SpecificationExtensions {
4860
4889
  /**
4861
4890
  * The email address of the contact person/organization. This MUST be in the form of an email address.
4862
4891
  */
@@ -4901,7 +4930,7 @@ interface DiscriminatorObject {
4901
4930
  * TODO: default values examples
4902
4931
  * TODO: examples
4903
4932
  */
4904
- interface EncodingObject {
4933
+ interface EncodingObject extends SpecificationExtensions {
4905
4934
  /**
4906
4935
  * 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`.
4907
4936
  */
@@ -4934,7 +4963,7 @@ interface EncodingObject {
4934
4963
  *
4935
4964
  * TODO: examples
4936
4965
  */
4937
- interface ExampleObject {
4966
+ interface ExampleObject extends SpecificationExtensions {
4938
4967
  /**
4939
4968
  * Long description for the example. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
4940
4969
  */
@@ -4964,7 +4993,7 @@ interface ExampleObject {
4964
4993
  * url: https://example.com
4965
4994
  * ```
4966
4995
  */
4967
- interface ExternalDocumentationObject {
4996
+ interface ExternalDocumentationObject extends SpecificationExtensions {
4968
4997
  /**
4969
4998
  * A description of the target documentation. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
4970
4999
  */
@@ -5006,7 +5035,7 @@ type HeaderObject = Omit<ParameterObject$1, 'in' | 'name'>;
5006
5035
  * version: 1.0.1
5007
5036
  * ```
5008
5037
  */
5009
- interface InfoObject$1 {
5038
+ interface InfoObject$1 extends SpecificationExtensions {
5010
5039
  /**
5011
5040
  * The contact information for the exposed API.
5012
5041
  */
@@ -5042,7 +5071,7 @@ interface InfoObject$1 {
5042
5071
  * url: https://www.apache.org/licenses/LICENSE-2.0.html
5043
5072
  * ```
5044
5073
  */
5045
- interface LicenseObject {
5074
+ interface LicenseObject extends SpecificationExtensions {
5046
5075
  /**
5047
5076
  * **REQUIRED**. The license name used for the API.
5048
5077
  */
@@ -5067,7 +5096,7 @@ interface LicenseObject {
5067
5096
  *
5068
5097
  * TODO: examples
5069
5098
  */
5070
- interface LinkObject {
5099
+ interface LinkObject extends SpecificationExtensions {
5071
5100
  /**
5072
5101
  * A description of the link. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
5073
5102
  */
@@ -5102,7 +5131,7 @@ interface LinkObject {
5102
5131
  *
5103
5132
  * TODO: examples
5104
5133
  */
5105
- interface MediaTypeObject {
5134
+ interface MediaTypeObject extends SpecificationExtensions {
5106
5135
  /**
5107
5136
  * 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.
5108
5137
  */
@@ -5127,7 +5156,7 @@ interface MediaTypeObject {
5127
5156
  *
5128
5157
  * TODO: examples
5129
5158
  */
5130
- interface OAuthFlowObject {
5159
+ interface OAuthFlowObject extends SpecificationExtensions {
5131
5160
  /**
5132
5161
  * **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.
5133
5162
  */
@@ -5150,7 +5179,7 @@ interface OAuthFlowObject {
5150
5179
  *
5151
5180
  * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
5152
5181
  */
5153
- interface OAuthFlowsObject {
5182
+ interface OAuthFlowsObject extends SpecificationExtensions {
5154
5183
  /**
5155
5184
  * Configuration for the OAuth Authorization Code flow. Previously called `accessCode` in OpenAPI 2.0.
5156
5185
  */
@@ -5175,7 +5204,7 @@ interface OAuthFlowsObject {
5175
5204
  *
5176
5205
  * TODO: examples
5177
5206
  */
5178
- interface OperationObject$1 {
5207
+ interface OperationObject$1 extends SpecificationExtensions {
5179
5208
  /**
5180
5209
  * 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.
5181
5210
  */
@@ -5269,7 +5298,7 @@ interface OperationObject$1 {
5269
5298
  *
5270
5299
  * TODO: examples
5271
5300
  */
5272
- interface ParameterObject$1 {
5301
+ interface ParameterObject$1 extends SpecificationExtensions {
5273
5302
  /**
5274
5303
  * 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.
5275
5304
  */
@@ -5333,7 +5362,7 @@ interface ParameterObject$1 {
5333
5362
  *
5334
5363
  * TODO: examples
5335
5364
  */
5336
- interface PathItemObject {
5365
+ interface PathItemObject extends SpecificationExtensions {
5337
5366
  /**
5338
5367
  * 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}.
5339
5368
  */
@@ -5394,7 +5423,7 @@ interface PathItemObject {
5394
5423
  *
5395
5424
  * TODO: examples
5396
5425
  */
5397
- interface PathsObject {
5426
+ interface PathsObject extends SpecificationExtensions {
5398
5427
  /**
5399
5428
  * 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.
5400
5429
  */
@@ -5440,7 +5469,7 @@ interface ReferenceObject$2 {
5440
5469
  *
5441
5470
  * TODO: examples
5442
5471
  */
5443
- interface RequestBodyObject$1 {
5472
+ interface RequestBodyObject$1 extends SpecificationExtensions {
5444
5473
  /**
5445
5474
  * **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/*"`
5446
5475
  */
@@ -5461,7 +5490,7 @@ interface RequestBodyObject$1 {
5461
5490
  *
5462
5491
  * TODO: examples
5463
5492
  */
5464
- interface ResponseObject$1 {
5493
+ interface ResponseObject$1 extends SpecificationExtensions {
5465
5494
  /**
5466
5495
  * 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/*"`
5467
5496
  */
@@ -5492,11 +5521,11 @@ interface ResponseObject$1 {
5492
5521
  *
5493
5522
  * TODO: examples
5494
5523
  */
5495
- interface ResponsesObject {
5524
+ interface ResponsesObject extends SpecificationExtensions {
5496
5525
  /**
5497
5526
  * 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.
5498
5527
  */
5499
- [httpStatusCode: string]: ResponseObject$1 | ReferenceObject$2 | undefined;
5528
+ [httpStatusCode: string]: ResponseObject$1 | ReferenceObject$2 | undefined | unknown;
5500
5529
  /**
5501
5530
  * 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.
5502
5531
  */
@@ -5553,7 +5582,7 @@ interface ResponsesObject {
5553
5582
  *
5554
5583
  * TODO: content, examples
5555
5584
  */
5556
- interface SchemaObject$1 extends EnumExtensions {
5585
+ interface SchemaObject$1 extends EnumExtensions, SpecificationExtensions {
5557
5586
  /**
5558
5587
  * The value of "additionalProperties" MUST be a boolean or a schema.
5559
5588
  *
@@ -5804,7 +5833,7 @@ interface SecurityRequirementObject {
5804
5833
  *
5805
5834
  * TODO: examples
5806
5835
  */
5807
- type SecuritySchemeObject = {
5836
+ type SecuritySchemeObject = SpecificationExtensions & {
5808
5837
  /**
5809
5838
  * A description for security scheme. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
5810
5839
  */
@@ -5861,7 +5890,7 @@ type SecuritySchemeObject = {
5861
5890
  *
5862
5891
  * TODO: examples
5863
5892
  */
5864
- interface ServerObject {
5893
+ interface ServerObject extends SpecificationExtensions {
5865
5894
  /**
5866
5895
  * An optional string describing the host designated by the URL. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
5867
5896
  */
@@ -5880,7 +5909,7 @@ interface ServerObject {
5880
5909
  *
5881
5910
  * This object MAY be extended with {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.4.md#specification-extensions Specification Extensions}.
5882
5911
  */
5883
- interface ServerVariableObject {
5912
+ interface ServerVariableObject extends SpecificationExtensions {
5884
5913
  /**
5885
5914
  * **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.
5886
5915
  */
@@ -5906,7 +5935,7 @@ interface ServerVariableObject {
5906
5935
  * description: Pets operations
5907
5936
  * ```
5908
5937
  */
5909
- interface TagObject {
5938
+ interface TagObject extends SpecificationExtensions {
5910
5939
  /**
5911
5940
  * A description for the tag. {@link https://spec.commonmark.org/ CommonMark syntax} MAY be used for rich text representation.
5912
5941
  */
@@ -5934,7 +5963,7 @@ interface TagObject {
5934
5963
  *
5935
5964
  * TODO: examples
5936
5965
  */
5937
- interface XMLObject {
5966
+ interface XMLObject extends SpecificationExtensions {
5938
5967
  /**
5939
5968
  * Declares whether the property definition translates to an attribute instead of an element. Default value is `false`.
5940
5969
  */
@@ -6250,10 +6279,8 @@ type Config$13 = Plugin.Name<'@hey-api/sdk'> & Plugin.Hooks & {
6250
6279
  * Set `instance` to create an instantiable SDK. Using `true` will use the
6251
6280
  * default instance name; in practice, you want to define your own by passing
6252
6281
  * a string value.
6253
- *
6254
- * @default false
6255
6282
  */
6256
- instance: string | boolean;
6283
+ instance: string;
6257
6284
  /**
6258
6285
  * Customise the name of methods within the service. By default,
6259
6286
  * {@link IR.OperationObject.id} is used.
@@ -6353,8 +6380,8 @@ declare abstract class TsDsl<T extends ts.Node = ts.Node> implements Node<T> {
6353
6380
  parent?: Node;
6354
6381
  root?: Node;
6355
6382
  symbol?: Symbol;
6356
- toAst(): T;
6357
- readonly '~brand': any;
6383
+ toAst(_: AstContext): T;
6384
+ readonly '~brand' = "heyapi.node";
6358
6385
  /** Branding property to identify the DSL class at runtime. */
6359
6386
  abstract readonly '~dsl': string;
6360
6387
  /** Conditionally applies a callback to this builder. */
@@ -6362,8 +6389,8 @@ declare abstract class TsDsl<T extends ts.Node = ts.Node> implements Node<T> {
6362
6389
  $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;
6363
6390
  $if<T extends TsDsl, V, R extends TsDsl = T>(this: T, value: V, ifTrue: () => R | void, ifFalse?: () => R | void): R | T;
6364
6391
  protected $maybeId<T extends string | ts.Expression>(expr: T): T extends string ? ts.Identifier : T;
6365
- protected $node<I>(value: I): NodeOfMaybe<I>;
6366
- protected $type<I>(value: I, args?: ReadonlyArray<ts.TypeNode>): TypeOfMaybe<I>;
6392
+ protected $node<I>(ctx: AstContext, value: I): NodeOfMaybe<I>;
6393
+ protected $type<I>(ctx: AstContext, value: I, args?: ReadonlyArray<ts.TypeNode>): TypeOfMaybe<I>;
6367
6394
  /** Unwraps nested nodes into raw TypeScript AST. */
6368
6395
  private unwrap;
6369
6396
  }
@@ -6375,19 +6402,9 @@ type TypeOfMaybe<I> = undefined extends I ? TypeOf<NonNullable<FromRef<I>>> | un
6375
6402
  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;
6376
6403
  //#endregion
6377
6404
  //#region src/ts-dsl/mixins/types.d.ts
6378
- type BaseCtor<T> = abstract new (...args: any[]) => TsDsl<T>;
6379
- type MixinCtor<T extends BaseCtor<any>, K$1> = abstract new (...args: any[]) => InstanceType<T> & K$1;
6380
- //#endregion
6381
- //#region src/ts-dsl/mixins/type-args.d.ts
6382
- type Arg$1 = Symbol | string | MaybeTsDsl<TypeTsDsl>;
6383
- interface TypeArgsMethods extends Node {
6384
- /** Returns the type arguments as an array of ts.TypeNode nodes. */
6385
- $generics(): ReadonlyArray<ts.TypeNode> | undefined;
6386
- /** Adds a single type argument (e.g. `string` in `Foo<string>`). */
6387
- generic(arg: Arg$1): this;
6388
- /** Adds type arguments (e.g. `Map<string, number>`). */
6389
- generics(...args: ReadonlyArray<Arg$1>): this;
6390
- }
6405
+ type BaseCtor<T> = abstract new (...args: Array<any>) => TsDsl<T>;
6406
+ type DropFirst<T extends Array<any>> = T extends [any, ...infer Rest] ? Rest : never;
6407
+ type MixinCtor<T extends BaseCtor<any>, K$1> = abstract new (...args: Array<any>) => InstanceType<T> & K$1;
6391
6408
  //#endregion
6392
6409
  //#region src/ts-dsl/mixins/optional.d.ts
6393
6410
  interface OptionalMethods extends Node {
@@ -6398,31 +6415,18 @@ interface OptionalMethods extends Node {
6398
6415
  required(condition?: boolean): this;
6399
6416
  }
6400
6417
  //#endregion
6401
- //#region src/ts-dsl/expr/as.d.ts
6402
- type AsExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
6403
- type AsType = Symbol | string | TypeTsDsl;
6404
- declare const Mixed$52: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.AsExpression>, ExprMethods>, AsMethods>;
6405
- declare class AsTsDsl extends Mixed$52 {
6406
- readonly '~dsl' = "AsTsDsl";
6407
- protected expr: Ref<AsExpr>;
6408
- protected type: Ref<AsType>;
6409
- constructor(expr: AsExpr, type: AsType);
6410
- analyze(ctx: AnalysisContext): void;
6411
- toAst(): ts.AsExpression;
6412
- }
6413
- //#endregion
6414
6418
  //#region src/ts-dsl/mixins/as.d.ts
6415
6419
  interface AsMethods extends Node {
6416
6420
  /** Creates an `as` type assertion expression (e.g. `value as Type`). */
6417
- as(type: AsType): AsTsDsl;
6421
+ as(...args: DropFirst<Parameters<typeof f.as>>): ReturnType<typeof f.as>;
6418
6422
  }
6419
6423
  //#endregion
6420
6424
  //#region src/ts-dsl/expr/binary.d.ts
6421
6425
  type Expr$3 = Symbol | string | MaybeTsDsl<ts.Expression>;
6422
6426
  type Op$1 = Operator | ts.BinaryOperator;
6423
- type Operator = '!=' | '!==' | '&&' | '*' | '+' | '-' | '/' | '<' | '<=' | '=' | '==' | '===' | '>' | '>=' | '??' | '||';
6424
- declare const Mixed$51: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.BinaryExpression>, ExprMethods>, AsMethods>;
6425
- declare class BinaryTsDsl extends Mixed$51 {
6427
+ type Operator = '!=' | '!==' | '&&' | '*' | '+' | '-' | '/' | '<' | '<=' | '=' | '==' | '===' | '>' | '>=' | '??' | '??=' | '||';
6428
+ declare const Mixed$52: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.BinaryExpression>, ExprMethods>, AsMethods>;
6429
+ declare class BinaryTsDsl extends Mixed$52 {
6426
6430
  readonly '~dsl' = "BinaryTsDsl";
6427
6431
  protected _base: Ref<Expr$3>;
6428
6432
  protected _expr?: Ref<Expr$3>;
@@ -6455,13 +6459,15 @@ declare class BinaryTsDsl extends Mixed$51 {
6455
6459
  minus(expr: Expr$3): this;
6456
6460
  /** Strict inequality — `this !== expr` */
6457
6461
  neq(expr: Expr$3): this;
6462
+ /** Nullish assignment — `this ??= expr` */
6463
+ nullishAssign(expr: Expr$3): this;
6458
6464
  /** Logical OR — `this || expr` */
6459
6465
  or(expr: Expr$3): this;
6460
6466
  /** Addition — `this + expr` */
6461
6467
  plus(expr: Expr$3): this;
6462
6468
  /** Multiplication — `this * expr` */
6463
6469
  times(expr: Expr$3): this;
6464
- toAst(): ts.BinaryExpression;
6470
+ toAst(ctx: AstContext): ts.BinaryExpression;
6465
6471
  /** Sets the binary operator and right-hand operand for this expression. */
6466
6472
  private opAndExpr;
6467
6473
  private opToToken;
@@ -6496,6 +6502,8 @@ interface OperatorMethods extends Node {
6496
6502
  minus(expr: Expr$2): BinaryTsDsl;
6497
6503
  /** Strict inequality — `this !== expr` */
6498
6504
  neq(expr: Expr$2): BinaryTsDsl;
6505
+ /** Nullish assignment — `this ??= expr` */
6506
+ nullishAssign(expr: Expr$2): BinaryTsDsl;
6499
6507
  /** Logical OR — `this || expr` */
6500
6508
  or(expr: Expr$2): BinaryTsDsl;
6501
6509
  /** Addition — `this + expr` */
@@ -6507,55 +6515,45 @@ interface OperatorMethods extends Node {
6507
6515
  //#region src/ts-dsl/expr/attr.d.ts
6508
6516
  type AttrLeft = Symbol | string | MaybeTsDsl<ts.Expression>;
6509
6517
  type AttrRight = Symbol | string | ts.MemberName | number;
6510
- declare const Mixed$50: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyAccessExpression | ts.ElementAccessExpression>, OptionalMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
6511
- declare class AttrTsDsl extends Mixed$50 {
6518
+ type AttrCtor = (left: AttrLeft, right: AttrRight) => AttrTsDsl;
6519
+ declare const Mixed$51: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyAccessExpression | ts.ElementAccessExpression>, OptionalMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
6520
+ declare class AttrTsDsl extends Mixed$51 {
6512
6521
  readonly '~dsl' = "AttrTsDsl";
6513
6522
  protected left: Ref<AttrLeft>;
6514
6523
  protected right: Ref<AttrRight>;
6515
6524
  constructor(left: AttrLeft, right: AttrRight);
6516
6525
  analyze(ctx: AnalysisContext): void;
6517
- toAst(): ts.PropertyAccessExpression | ts.ElementAccessExpression;
6526
+ toAst(ctx: AstContext): ts.PropertyAccessExpression | ts.ElementAccessExpression;
6518
6527
  }
6519
6528
  //#endregion
6520
6529
  //#region src/ts-dsl/expr/await.d.ts
6521
6530
  type AwaitExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
6522
- declare const Mixed$49: MixinCtor<abstract new () => TsDsl<ts.AwaitExpression>, ExprMethods>;
6523
- declare class AwaitTsDsl extends Mixed$49 {
6531
+ type AwaitCtor = (expr: AwaitExpr) => AwaitTsDsl;
6532
+ declare const Mixed$50: MixinCtor<abstract new () => TsDsl<ts.AwaitExpression>, ExprMethods>;
6533
+ declare class AwaitTsDsl extends Mixed$50 {
6524
6534
  readonly '~dsl' = "AwaitTsDsl";
6525
6535
  protected _awaitExpr: Ref<AwaitExpr>;
6526
6536
  constructor(expr: AwaitExpr);
6527
6537
  analyze(ctx: AnalysisContext): void;
6528
- toAst(): ts.AwaitExpression;
6529
- }
6530
- //#endregion
6531
- //#region src/ts-dsl/stmt/return.d.ts
6532
- type ReturnExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
6533
- declare const Mixed$48: abstract new () => TsDsl<ts.ReturnStatement>;
6534
- declare class ReturnTsDsl extends Mixed$48 {
6535
- readonly '~dsl' = "ReturnTsDsl";
6536
- protected _returnExpr?: Ref<ReturnExpr>;
6537
- constructor(expr?: ReturnExpr);
6538
- analyze(ctx: AnalysisContext): void;
6539
- toAst(): ts.ReturnStatement;
6538
+ toAst(ctx: AstContext): ts.AwaitExpression;
6540
6539
  }
6541
6540
  //#endregion
6542
- //#region src/ts-dsl/mixins/expr.d.ts
6543
- interface ExprMethods extends Node {
6544
- /** Accesses a property on the current expression (e.g. `this.foo`). */
6545
- attr(name: AttrRight): AttrTsDsl;
6546
- /** Awaits the current expression (e.g. `await expr`). */
6547
- await(): AwaitTsDsl;
6548
- /** Calls the current expression (e.g. `fn(arg1, arg2)`). */
6549
- call(...args: CallArgs): CallTsDsl;
6550
- /** Produces a `return` statement returning the current expression. */
6551
- return(): ReturnTsDsl;
6541
+ //#region src/ts-dsl/mixins/type-args.d.ts
6542
+ type Arg$1 = Symbol | string | MaybeTsDsl<TypeTsDsl>;
6543
+ interface TypeArgsMethods extends Node {
6544
+ /** Returns the type arguments as an array of ts.TypeNode nodes. */
6545
+ $generics(ctx: AstContext): ReadonlyArray<ts.TypeNode> | undefined;
6546
+ /** Adds a single type argument (e.g. `string` in `Foo<string>`). */
6547
+ generic(arg: Arg$1): this;
6548
+ /** Adds type arguments (e.g. `Map<string, number>`). */
6549
+ generics(...args: ReadonlyArray<Arg$1>): this;
6552
6550
  }
6553
6551
  //#endregion
6554
6552
  //#region src/ts-dsl/mixins/args.d.ts
6555
6553
  type Arg = Symbol | string | MaybeTsDsl<ts.Expression>;
6556
6554
  interface ArgsMethods extends Node {
6557
6555
  /** Renders the arguments into an array of `Expression`s. */
6558
- $args(): ReadonlyArray<ts.Expression>;
6556
+ $args(ctx: AstContext): ReadonlyArray<ts.Expression>;
6559
6557
  /** Adds a single expression argument. */
6560
6558
  arg(arg: Arg | undefined): this;
6561
6559
  /** Adds one or more expression arguments. */
@@ -6566,13 +6564,259 @@ interface ArgsMethods extends Node {
6566
6564
  type CallCallee = string | MaybeTsDsl<ts.Expression>;
6567
6565
  type CallArg = Symbol | string | MaybeTsDsl<ts.Expression>;
6568
6566
  type CallArgs = ReadonlyArray<CallArg | undefined>;
6569
- declare const Mixed$47: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.CallExpression>, TypeArgsMethods>, ExprMethods>, AsMethods>, ArgsMethods>;
6570
- declare class CallTsDsl extends Mixed$47 {
6567
+ type CallCtor = (callee: CallCallee, ...args: CallArgs) => CallTsDsl;
6568
+ declare const Mixed$49: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.CallExpression>, TypeArgsMethods>, ExprMethods>, AsMethods>, ArgsMethods>;
6569
+ declare class CallTsDsl extends Mixed$49 {
6571
6570
  readonly '~dsl' = "CallTsDsl";
6572
6571
  protected _callee: CallCallee;
6573
6572
  constructor(callee: CallCallee, ...args: CallArgs);
6574
6573
  analyze(ctx: AnalysisContext): void;
6575
- toAst(): ts.CallExpression;
6574
+ toAst(ctx: AstContext): ts.CallExpression;
6575
+ }
6576
+ //#endregion
6577
+ //#region src/ts-dsl/expr/typeof.d.ts
6578
+ type TypeOfExpr = string | MaybeTsDsl<ts.Expression>;
6579
+ type TypeOfExprCtor = (expr: TypeOfExpr) => TypeOfExprTsDsl;
6580
+ declare const Mixed$48: MixinCtor<abstract new () => TsDsl<ts.TypeOfExpression>, OperatorMethods>;
6581
+ declare class TypeOfExprTsDsl extends Mixed$48 {
6582
+ readonly '~dsl' = "TypeOfExprTsDsl";
6583
+ protected _expr: TypeOfExpr;
6584
+ constructor(expr: TypeOfExpr);
6585
+ analyze(ctx: AnalysisContext): void;
6586
+ toAst(ctx: AstContext): ts.TypeOfExpression;
6587
+ }
6588
+ //#endregion
6589
+ //#region src/ts-dsl/stmt/return.d.ts
6590
+ type ReturnExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
6591
+ type ReturnCtor = (expr?: ReturnExpr) => ReturnTsDsl;
6592
+ declare const Mixed$47: abstract new () => TsDsl<ts.ReturnStatement>;
6593
+ declare class ReturnTsDsl extends Mixed$47 {
6594
+ readonly '~dsl' = "ReturnTsDsl";
6595
+ protected _returnExpr?: Ref<ReturnExpr>;
6596
+ constructor(expr?: ReturnExpr);
6597
+ analyze(ctx: AnalysisContext): void;
6598
+ toAst(ctx: AstContext): ts.ReturnStatement;
6599
+ }
6600
+ //#endregion
6601
+ //#region src/ts-dsl/mixins/type-expr.d.ts
6602
+ interface TypeExprMethods extends Node {
6603
+ /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
6604
+ idx(this: Parameters<typeof f.type.idx>[0], ...args: DropFirst<Parameters<typeof f.type.idx>>): ReturnType<typeof f.type.idx>;
6605
+ /** Shorthand: builds `keyof T`. */
6606
+ keyof(this: MaybeTsDsl<TypeTsDsl>): ReturnType<typeof f.type.operator>;
6607
+ /** Shorthand: builds `readonly T`. */
6608
+ readonly(this: MaybeTsDsl<TypeTsDsl>): ReturnType<typeof f.type.operator>;
6609
+ /** Create a TypeExpr node representing ReturnType<this>. */
6610
+ returnType(this: Parameters<typeof f.type.query>[0], ...args: DropFirst<Parameters<typeof f.type.query>>): ReturnType<typeof f.type.expr>;
6611
+ /** Create a TypeOfExpr node representing typeof this. */
6612
+ typeofExpr(this: Parameters<typeof f.typeofExpr>[0], ...args: DropFirst<Parameters<typeof f.typeofExpr>>): ReturnType<typeof f.typeofExpr>;
6613
+ /** Create a TypeQuery node representing typeof this. */
6614
+ typeofType(this: Parameters<typeof f.type.query>[0], ...args: DropFirst<Parameters<typeof f.type.query>>): ReturnType<typeof f.type.query>;
6615
+ /** Shorthand: builds `unique T`. */
6616
+ unique(this: MaybeTsDsl<TypeTsDsl>): ReturnType<typeof f.type.operator>;
6617
+ }
6618
+ //#endregion
6619
+ //#region src/ts-dsl/type/attr.d.ts
6620
+ type Base$2 = Symbol | string | MaybeTsDsl<ts.EntityName>;
6621
+ type Right = Symbol | string | ts.Identifier;
6622
+ declare const Mixed$46: MixinCtor<abstract new () => TsDsl<ts.QualifiedName>, TypeExprMethods>;
6623
+ declare class TypeAttrTsDsl extends Mixed$46 {
6624
+ readonly '~dsl' = "TypeAttrTsDsl";
6625
+ protected _base?: Ref<Base$2>;
6626
+ protected _right: Ref<Right>;
6627
+ constructor(base: Base$2 | Ref<Base$2>, right: string | ts.Identifier);
6628
+ constructor(right: Right);
6629
+ analyze(ctx: AnalysisContext): void;
6630
+ base(base?: Base$2 | Ref<Base$2>): this;
6631
+ right(right: Right): this;
6632
+ toAst(ctx: AstContext): ts.QualifiedName;
6633
+ }
6634
+ //#endregion
6635
+ //#region src/ts-dsl/type/expr.d.ts
6636
+ type TypeExprName = Symbol | string;
6637
+ type TypeExprExpr = TypeExprName | TypeAttrTsDsl;
6638
+ type TypeExprFn = (t: TypeExprTsDsl) => void;
6639
+ type TypeExprCtor = (nameOrFn?: TypeExprName | TypeExprFn, fn?: TypeExprFn) => TypeExprTsDsl;
6640
+ declare const Mixed$45: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.TypeReferenceNode>, TypeExprMethods>, TypeArgsMethods>;
6641
+ declare class TypeExprTsDsl extends Mixed$45 {
6642
+ readonly '~dsl' = "TypeExprTsDsl";
6643
+ protected _exprInput?: Ref<TypeExprExpr>;
6644
+ constructor();
6645
+ constructor(fn: TypeExprFn);
6646
+ constructor(name: TypeExprName);
6647
+ constructor(name: TypeExprName, fn?: TypeExprFn);
6648
+ analyze(ctx: AnalysisContext): void;
6649
+ /** Accesses a nested type (e.g. `Foo.Bar`). */
6650
+ attr(right: string | ts.Identifier | TypeAttrTsDsl): this;
6651
+ toAst(ctx: AstContext): ts.TypeReferenceNode;
6652
+ }
6653
+ //#endregion
6654
+ //#region src/ts-dsl/type/idx.d.ts
6655
+ type Base$1 = string | MaybeTsDsl<ts.TypeNode>;
6656
+ type Index = string | number | MaybeTsDsl<ts.TypeNode>;
6657
+ type TypeIdxCtor = (base: Base$1, index: Index) => TypeIdxTsDsl;
6658
+ declare const Mixed$44: MixinCtor<abstract new () => TsDsl<ts.IndexedAccessTypeNode>, TypeExprMethods>;
6659
+ declare class TypeIdxTsDsl extends Mixed$44 {
6660
+ readonly '~dsl' = "TypeIdxTsDsl";
6661
+ protected _base: Base$1;
6662
+ protected _index: Index;
6663
+ constructor(base: Base$1, index: Index);
6664
+ analyze(ctx: AnalysisContext): void;
6665
+ base(base: Base$1): this;
6666
+ index(index: Index): this;
6667
+ toAst(ctx: AstContext): ts.IndexedAccessTypeNode;
6668
+ }
6669
+ //#endregion
6670
+ //#region src/ts-dsl/type/operator.d.ts
6671
+ type Op = ts.SyntaxKind.KeyOfKeyword | ts.SyntaxKind.ReadonlyKeyword | ts.SyntaxKind.UniqueKeyword;
6672
+ type Type$2 = string | MaybeTsDsl<ts.TypeNode>;
6673
+ type TypeOperatorCtor = () => TypeOperatorTsDsl;
6674
+ declare const Mixed$43: abstract new () => TsDsl<ts.TypeOperatorNode>;
6675
+ /**
6676
+ * Builds a TypeScript `TypeOperatorNode`, such as:
6677
+ *
6678
+ * - `keyof T`
6679
+ * - `readonly U`
6680
+ * - `unique V`
6681
+ *
6682
+ * This DSL provides both a generic `.operator()` API and convenient
6683
+ * shorthand methods (`.keyof()`, `.readonly()`, `.unique()`).
6684
+ *
6685
+ * The node will throw during render if required fields are missing.
6686
+ */
6687
+ declare class TypeOperatorTsDsl extends Mixed$43 {
6688
+ readonly '~dsl' = "TypeOperatorTsDsl";
6689
+ protected _op?: Op;
6690
+ protected _type?: Type$2;
6691
+ analyze(ctx: AnalysisContext): void;
6692
+ /** Shorthand: builds `keyof T`. */
6693
+ keyof(type: Type$2): this;
6694
+ /** Sets the operator explicitly. */
6695
+ operator(op: Op): this;
6696
+ /** Shorthand: builds `readonly T`. */
6697
+ readonly(type: Type$2): this;
6698
+ /** Sets the target type of the operator. */
6699
+ type(type: Type$2): this;
6700
+ /** Shorthand: builds `unique T`. */
6701
+ unique(type: Type$2): this;
6702
+ toAst(ctx: AstContext): ts.TypeOperatorNode;
6703
+ /** Throws if required fields are not set. */
6704
+ $validate(): asserts this is this & {
6705
+ _op: Op;
6706
+ _type: Type$2;
6707
+ };
6708
+ private missingRequiredCalls;
6709
+ }
6710
+ //#endregion
6711
+ //#region src/ts-dsl/type/query.d.ts
6712
+ type TypeQueryExpr = string | MaybeTsDsl<TypeTsDsl | ts.Expression>;
6713
+ type TypeQueryCtor = (expr: TypeQueryExpr) => TypeQueryTsDsl;
6714
+ declare const Mixed$42: MixinCtor<abstract new () => TsDsl<ts.TypeQueryNode>, TypeExprMethods>;
6715
+ declare class TypeQueryTsDsl extends Mixed$42 {
6716
+ readonly '~dsl' = "TypeQueryTsDsl";
6717
+ protected _expr: TypeQueryExpr;
6718
+ constructor(expr: TypeQueryExpr);
6719
+ analyze(ctx: AnalysisContext): void;
6720
+ toAst(ctx: AstContext): ts.TypeQueryNode;
6721
+ }
6722
+ //#endregion
6723
+ //#region src/ts-dsl/utils/factories.d.ts
6724
+ type Ctor = (...args: Array<any>) => any;
6725
+ type Factory<T extends Ctor> = {
6726
+ (...args: Parameters<T>): ReturnType<T>;
6727
+ /** Sets the implementation of this factory. */
6728
+ set(fn: T): void;
6729
+ };
6730
+ declare const f: {
6731
+ /** Factory for creating `as` type assertion expressions (e.g. `value as Type`). */
6732
+ as: Factory<AsCtor>;
6733
+ /** Factory for creating property access expressions (e.g. `obj.foo`). */
6734
+ attr: Factory<AttrCtor>;
6735
+ /** Factory for creating await expressions (e.g. `await promise`). */
6736
+ await: Factory<AwaitCtor>;
6737
+ /** Factory for creating function or method call expressions (e.g. `fn(arg)`). */
6738
+ call: Factory<CallCtor>;
6739
+ /** Factory for creating return statements. */
6740
+ return: Factory<ReturnCtor>;
6741
+ /** Factories for creating type nodes. */
6742
+ type: {
6743
+ /** Factory for creating basic type references or type expressions (e.g. Foo or Foo<T>). */
6744
+ expr: Factory<TypeExprCtor>;
6745
+ /** Factory for creating indexed-access types (e.g. `Foo<T>[K]`). */
6746
+ idx: Factory<TypeIdxCtor>;
6747
+ /** Factory for creating type operator nodes (e.g. `readonly T`, `keyof T`, `unique T`). */
6748
+ operator: Factory<TypeOperatorCtor>;
6749
+ /** Factory for creating type query nodes (e.g. `typeof Foo`). */
6750
+ query: Factory<TypeQueryCtor>;
6751
+ };
6752
+ /** Factory for creating `typeof` expressions (e.g. `typeof value`). */
6753
+ typeofExpr: Factory<TypeOfExprCtor>;
6754
+ };
6755
+ //#endregion
6756
+ //#region src/ts-dsl/mixins/expr.d.ts
6757
+ interface ExprMethods extends Node {
6758
+ /** Accesses a property on the current expression (e.g. `this.foo`). */
6759
+ attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr>;
6760
+ /** Awaits the current expression (e.g. `await expr`). */
6761
+ await(): ReturnType<typeof f.await>;
6762
+ /** Calls the current expression (e.g. `fn(arg1, arg2)`). */
6763
+ call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call>;
6764
+ /** Produces a `return` statement returning the current expression. */
6765
+ return(): ReturnType<typeof f.return>;
6766
+ }
6767
+ //#endregion
6768
+ //#region src/ts-dsl/expr/as.d.ts
6769
+ type AsExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
6770
+ type AsType = Symbol | string | TypeTsDsl;
6771
+ type AsCtor = (expr: AsExpr, type: AsType) => AsTsDsl;
6772
+ declare const Mixed$41: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.AsExpression>, ExprMethods>, AsMethods>;
6773
+ declare class AsTsDsl extends Mixed$41 {
6774
+ readonly '~dsl' = "AsTsDsl";
6775
+ protected expr: Ref<AsExpr>;
6776
+ protected type: Ref<AsType>;
6777
+ constructor(expr: AsExpr, type: AsType);
6778
+ analyze(ctx: AnalysisContext): void;
6779
+ toAst(ctx: AstContext): ts.AsExpression;
6780
+ }
6781
+ //#endregion
6782
+ //#region src/ts-dsl/mixins/value.d.ts
6783
+ type ValueExpr = string | MaybeTsDsl<ts.Expression>;
6784
+ interface ValueMethods extends Node {
6785
+ $value(ctx: AstContext): ts.Expression | undefined;
6786
+ /** Sets the initializer expression (e.g. `= expr`). */
6787
+ assign(expr: ValueExpr): this;
6788
+ }
6789
+ //#endregion
6790
+ //#region src/ts-dsl/mixins/pattern.d.ts
6791
+ interface PatternMethods extends Node {
6792
+ /** Renders the pattern into a `BindingName`. */
6793
+ $pattern(ctx: AstContext): ts.BindingName | undefined;
6794
+ /** Defines an array binding pattern. */
6795
+ array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
6796
+ /** Defines an object binding pattern. */
6797
+ object(...props: ReadonlyArray<MaybeArray$1<string> | Record<string, string>>): this;
6798
+ /** Adds a spread element (e.g. `...args`, `...options`) to the pattern. */
6799
+ spread(name: string): this;
6800
+ }
6801
+ //#endregion
6802
+ //#region src/ts-dsl/layout/hint.d.ts
6803
+ type HintMaybeLazy<T> = ((ctx: AstContext) => T) | T;
6804
+ type HintFn = (d: HintTsDsl) => void;
6805
+ type HintLines = HintMaybeLazy<MaybeArray$1<string>>;
6806
+ declare class HintTsDsl extends TsDsl<ts.Node> {
6807
+ readonly '~dsl' = "HintTsDsl";
6808
+ protected _lines: Array<HintLines>;
6809
+ constructor(lines?: HintLines, fn?: HintFn);
6810
+ analyze(ctx: AnalysisContext): void;
6811
+ add(lines: HintLines): this;
6812
+ apply<T extends ts.Node>(ctx: AstContext, node: T): T;
6813
+ toAst(ctx: AstContext): ts.Node;
6814
+ }
6815
+ //#endregion
6816
+ //#region src/ts-dsl/mixins/hint.d.ts
6817
+ interface HintMethods extends Node {
6818
+ $hint<T extends ts.Node>(ctx: AstContext, node: T): T;
6819
+ hint(lines?: HintLines, fn?: HintFn): this;
6576
6820
  }
6577
6821
  //#endregion
6578
6822
  //#region src/ts-dsl/mixins/modifiers.d.ts
@@ -6670,39 +6914,124 @@ interface StaticMethods extends Modifiers {
6670
6914
  static(condition?: boolean): this;
6671
6915
  }
6672
6916
  //#endregion
6673
- //#region src/ts-dsl/mixins/value.d.ts
6674
- type ValueExpr = string | MaybeTsDsl<ts.Expression>;
6675
- interface ValueMethods extends Node {
6676
- $value(): ts.Expression | undefined;
6677
- /** Sets the initializer expression (e.g. `= expr`). */
6678
- assign(expr: ValueExpr): this;
6917
+ //#region src/ts-dsl/layout/doc.d.ts
6918
+ type DocMaybeLazy<T> = ((ctx: AstContext) => T) | T;
6919
+ type DocFn = (d: DocTsDsl) => void;
6920
+ type DocLines = DocMaybeLazy<MaybeArray$1<string>>;
6921
+ declare class DocTsDsl extends TsDsl<ts.Node> {
6922
+ readonly '~dsl' = "DocTsDsl";
6923
+ protected _lines: Array<DocLines>;
6924
+ constructor(lines?: DocLines, fn?: DocFn);
6925
+ analyze(ctx: AnalysisContext): void;
6926
+ add(lines: DocLines): this;
6927
+ apply<T extends ts.Node>(ctx: AstContext, node: T): T;
6928
+ toAst(ctx: AstContext): ts.Node;
6679
6929
  }
6680
6930
  //#endregion
6681
- //#region src/ts-dsl/mixins/pattern.d.ts
6682
- interface PatternMethods extends Node {
6683
- /** Renders the pattern into a `BindingName`. */
6684
- $pattern(): ts.BindingName | undefined;
6685
- /** Defines an array binding pattern. */
6686
- array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
6687
- /** Defines an object binding pattern. */
6688
- object(...props: ReadonlyArray<MaybeArray$1<string> | Record<string, string>>): this;
6689
- /** Adds a spread element (e.g. `...args`, `...options`) to the pattern. */
6690
- spread(name: string): this;
6931
+ //#region src/ts-dsl/mixins/doc.d.ts
6932
+ interface DocMethods extends Node {
6933
+ $docs<T extends ts.Node>(ctx: AstContext, node: T): T;
6934
+ doc(lines?: DocLines, fn?: DocFn): this;
6935
+ }
6936
+ //#endregion
6937
+ //#region src/ts-dsl/stmt/var.d.ts
6938
+ type VarName = Symbol | string;
6939
+ declare const Mixed$40: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.VariableStatement>, ValueMethods>, PatternMethods>, HintMethods>, ExportMethods>, DocMethods>, DefaultMethods>;
6940
+ declare class VarTsDsl extends Mixed$40 {
6941
+ readonly '~dsl' = "VarTsDsl";
6942
+ protected kind: ts.NodeFlags;
6943
+ protected name?: Ref<VarName>;
6944
+ protected _type?: TypeTsDsl;
6945
+ constructor(name?: VarName);
6946
+ analyze(ctx: AnalysisContext): void;
6947
+ const(): this;
6948
+ let(): this;
6949
+ /** Sets the variable type. */
6950
+ type(type: string | TypeTsDsl): this;
6951
+ var(): this;
6952
+ toAst(ctx: AstContext): ts.VariableStatement;
6953
+ }
6954
+ //#endregion
6955
+ //#region src/ts-dsl/decl/decorator.d.ts
6956
+ type DecoratorName = Symbol | string | MaybeTsDsl<ts.Expression>;
6957
+ declare const Mixed$39: MixinCtor<abstract new () => TsDsl<ts.Decorator>, ArgsMethods>;
6958
+ declare class DecoratorTsDsl extends Mixed$39 {
6959
+ readonly '~dsl' = "DecoratorTsDsl";
6960
+ protected name: Ref<DecoratorName>;
6961
+ constructor(name: DecoratorName, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>);
6962
+ analyze(ctx: AnalysisContext): void;
6963
+ toAst(ctx: AstContext): ts.Decorator;
6964
+ }
6965
+ //#endregion
6966
+ //#region src/ts-dsl/decl/member.d.ts
6967
+ type Value$2 = string | number | MaybeTsDsl<ts.Expression>;
6968
+ type ValueFn$1 = Value$2 | ((m: EnumMemberTsDsl) => void);
6969
+ declare const Mixed$38: MixinCtor<abstract new () => TsDsl<ts.EnumMember>, DocMethods>;
6970
+ declare class EnumMemberTsDsl extends Mixed$38 {
6971
+ readonly '~dsl' = "EnumMemberTsDsl";
6972
+ private _name;
6973
+ private _value?;
6974
+ constructor(name: string, value?: ValueFn$1);
6975
+ analyze(ctx: AnalysisContext): void;
6976
+ /** Sets the enum member value. */
6977
+ value(value?: Value$2): this;
6978
+ toAst(ctx: AstContext): ts.EnumMember;
6979
+ }
6980
+ //#endregion
6981
+ //#region src/ts-dsl/decl/enum.d.ts
6982
+ type EnumName = Symbol | string;
6983
+ type Value$1 = string | number | MaybeTsDsl<ts.Expression>;
6984
+ type ValueFn = Value$1 | ((m: EnumMemberTsDsl) => void);
6985
+ declare const Mixed$37: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.EnumDeclaration>, ExportMethods>, DocMethods>, ConstMethods>;
6986
+ declare class EnumTsDsl extends Mixed$37 {
6987
+ readonly '~dsl' = "EnumTsDsl";
6988
+ private _members;
6989
+ private _name;
6990
+ constructor(name: EnumName, fn?: (e: EnumTsDsl) => void);
6991
+ analyze(ctx: AnalysisContext): void;
6992
+ /** Adds an enum member. */
6993
+ member(name: string, value?: ValueFn): this;
6994
+ /** Adds multiple enum members. */
6995
+ members(...members: ReadonlyArray<EnumMemberTsDsl>): this;
6996
+ toAst(ctx: AstContext): ts.EnumDeclaration;
6691
6997
  }
6692
6998
  //#endregion
6693
6999
  //#region src/ts-dsl/mixins/decorator.d.ts
6694
7000
  interface DecoratorMethods extends Node {
6695
7001
  /** Renders the decorators into an array of `ts.Decorator`s. */
6696
- $decorators(): ReadonlyArray<ts.Decorator>;
7002
+ $decorators(ctx: AstContext): ReadonlyArray<ts.Decorator>;
6697
7003
  /** Adds a decorator (e.g. `@sealed({ in: 'root' })`). */
6698
7004
  decorator(name: Symbol | string | MaybeTsDsl<ts.Expression>, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>): this;
6699
7005
  }
6700
7006
  //#endregion
7007
+ //#region src/ts-dsl/decl/field.d.ts
7008
+ type FieldName = Symbol | string;
7009
+ type FieldType = TypeExprName | TypeTsDsl;
7010
+ 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>;
7011
+ declare class FieldTsDsl extends Mixed$36 {
7012
+ readonly '~dsl' = "FieldTsDsl";
7013
+ protected name: FieldName;
7014
+ protected _type?: TypeTsDsl;
7015
+ constructor(name: FieldName, fn?: (f: FieldTsDsl) => void);
7016
+ analyze(ctx: AnalysisContext): void;
7017
+ /** Sets the field type. */
7018
+ type(type: FieldType): this;
7019
+ toAst(ctx: AstContext): ts.PropertyDeclaration;
7020
+ }
7021
+ //#endregion
7022
+ //#region src/ts-dsl/mixins/type-returns.d.ts
7023
+ interface TypeReturnsMethods extends Node {
7024
+ /** Returns the return type node. */
7025
+ $returns(ctx: AstContext): ts.TypeNode | undefined;
7026
+ /** Sets the return type. */
7027
+ returns(type: TypeExprName | TypeTsDsl): this;
7028
+ }
7029
+ //#endregion
6701
7030
  //#region src/ts-dsl/decl/param.d.ts
6702
7031
  type ParamName = Symbol | string;
6703
7032
  type ParamCtor = (name: ParamName | ((p: ParamTsDsl) => void), fn?: (p: ParamTsDsl) => void) => ParamTsDsl;
6704
- declare const Mixed$46: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ParameterDeclaration>, ValueMethods>, PatternMethods>, OptionalMethods>, DecoratorMethods>;
6705
- declare class ParamTsDsl extends Mixed$46 {
7033
+ declare const Mixed$35: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ParameterDeclaration>, ValueMethods>, PatternMethods>, OptionalMethods>, DecoratorMethods>;
7034
+ declare class ParamTsDsl extends Mixed$35 {
6706
7035
  readonly '~dsl' = "ParamTsDsl";
6707
7036
  protected name?: Ref<ParamName>;
6708
7037
  protected _type?: TypeTsDsl;
@@ -6710,41 +7039,24 @@ declare class ParamTsDsl extends Mixed$46 {
6710
7039
  analyze(ctx: AnalysisContext): void;
6711
7040
  /** Sets the parameter type. */
6712
7041
  type(type: string | TypeTsDsl): this;
6713
- toAst(): ts.ParameterDeclaration;
7042
+ toAst(ctx: AstContext): ts.ParameterDeclaration;
6714
7043
  }
6715
7044
  //#endregion
6716
7045
  //#region src/ts-dsl/mixins/param.d.ts
6717
7046
  interface ParamMethods extends Node {
6718
7047
  /** Renders the parameters into an array of `ParameterDeclaration`s. */
6719
- $params(): ReadonlyArray<ts.ParameterDeclaration>;
7048
+ $params(ast: AstContext): ReadonlyArray<ts.ParameterDeclaration>;
6720
7049
  /** Adds a parameter. */
6721
7050
  param(...args: Parameters<ParamCtor>): this;
6722
7051
  /** Adds multiple parameters. */
6723
7052
  params(...params: ReadonlyArray<MaybeTsDsl<ts.ParameterDeclaration>>): this;
6724
7053
  }
6725
7054
  //#endregion
6726
- //#region src/ts-dsl/layout/doc.d.ts
6727
- declare class DocTsDsl extends TsDsl<ts.Node> {
6728
- readonly '~dsl' = "DocTsDsl";
6729
- protected _lines: Array<string>;
6730
- constructor(lines?: MaybeArray$1<string>, fn?: (d: DocTsDsl) => void);
6731
- analyze(ctx: AnalysisContext): void;
6732
- add(...lines: ReadonlyArray<string>): this;
6733
- apply<T extends ts.Node>(node: T): T;
6734
- toAst(): ts.Node;
6735
- }
6736
- //#endregion
6737
- //#region src/ts-dsl/mixins/doc.d.ts
6738
- interface DocMethods extends Node {
6739
- $docs<T extends ts.Node>(node: T): T;
6740
- doc(lines?: MaybeArray$1<string>, fn?: (d: DocTsDsl) => void): this;
6741
- }
6742
- //#endregion
6743
7055
  //#region src/ts-dsl/mixins/do.d.ts
6744
7056
  type DoExpr = MaybeTsDsl<ts.Expression | ts.Statement>;
6745
7057
  interface DoMethods extends Node {
6746
7058
  /** Renders the collected `.do()` calls into an array of `Statement` nodes. */
6747
- $do(): ReadonlyArray<ts.Statement>;
7059
+ $do(ctx: AstContext): ReadonlyArray<ts.Statement>;
6748
7060
  _do: Array<DoExpr>;
6749
7061
  /** Adds one or more expressions/statements to the body. */
6750
7062
  do(...items: ReadonlyArray<DoExpr>): this;
@@ -6752,19 +7064,19 @@ interface DoMethods extends Node {
6752
7064
  //#endregion
6753
7065
  //#region src/ts-dsl/decl/getter.d.ts
6754
7066
  type GetterName = string | ts.PropertyName;
6755
- declare const Mixed$45: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.GetAccessorDeclaration>, StaticMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AbstractMethods>;
6756
- declare class GetterTsDsl extends Mixed$45 {
7067
+ 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>;
7068
+ declare class GetterTsDsl extends Mixed$34 {
6757
7069
  readonly '~dsl' = "GetterTsDsl";
6758
7070
  protected name: GetterName;
6759
7071
  constructor(name: GetterName, fn?: (g: GetterTsDsl) => void);
6760
7072
  analyze(ctx: AnalysisContext): void;
6761
- toAst(): ts.GetAccessorDeclaration;
7073
+ toAst(ctx: AstContext): ts.GetAccessorDeclaration;
6762
7074
  }
6763
7075
  //#endregion
6764
7076
  //#region src/ts-dsl/stmt/if.d.ts
6765
7077
  type IfCondition = string | MaybeTsDsl<ts.Expression>;
6766
- declare const Mixed$44: MixinCtor<abstract new () => TsDsl<ts.IfStatement>, DoMethods>;
6767
- declare class IfTsDsl extends Mixed$44 {
7078
+ declare const Mixed$33: MixinCtor<abstract new () => TsDsl<ts.IfStatement>, DoMethods>;
7079
+ declare class IfTsDsl extends Mixed$33 {
6768
7080
  readonly '~dsl' = "IfTsDsl";
6769
7081
  protected _condition?: IfCondition;
6770
7082
  protected _else?: Array<DoExpr>;
@@ -6772,25 +7084,72 @@ declare class IfTsDsl extends Mixed$44 {
6772
7084
  analyze(ctx: AnalysisContext): void;
6773
7085
  condition(condition: IfCondition): this;
6774
7086
  otherwise(...items: Array<DoExpr>): this;
6775
- toAst(): ts.IfStatement;
7087
+ toAst(ctx: AstContext): ts.IfStatement;
7088
+ }
7089
+ //#endregion
7090
+ //#region src/ts-dsl/utils/lazy.d.ts
7091
+ type LazyThunk<T extends ts.Node> = (ctx: AstContext) => TsDsl<T>;
7092
+ declare class LazyTsDsl<T extends ts.Node = ts.Node> extends TsDsl<T> {
7093
+ readonly '~dsl' = "LazyTsDsl";
7094
+ private _thunk;
7095
+ constructor(thunk: LazyThunk<T>);
7096
+ analyze(ctx: AnalysisContext): void;
7097
+ toAst(ctx: AstContext): T;
7098
+ }
7099
+ //#endregion
7100
+ //#region src/ts-dsl/expr/new.d.ts
7101
+ type NewExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
7102
+ declare const Mixed$32: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.NewExpression>, TypeArgsMethods>, ExprMethods>, ArgsMethods>;
7103
+ declare class NewTsDsl extends Mixed$32 {
7104
+ readonly '~dsl' = "NewTsDsl";
7105
+ protected classExpr: Ref<NewExpr>;
7106
+ constructor(classExpr: NewExpr, ...args: ReadonlyArray<NewExpr>);
7107
+ analyze(ctx: AnalysisContext): void;
7108
+ toAst(ctx: AstContext): ts.NewExpression;
7109
+ }
7110
+ //#endregion
7111
+ //#region src/ts-dsl/layout/note.d.ts
7112
+ type NoteMaybeLazy<T> = ((ctx: AstContext) => T) | T;
7113
+ type NoteFn = (d: NoteTsDsl) => void;
7114
+ type NoteLines = NoteMaybeLazy<MaybeArray$1<string>>;
7115
+ declare class NoteTsDsl extends TsDsl<ts.Node> {
7116
+ readonly '~dsl' = "NoteTsDsl";
7117
+ protected _lines: Array<NoteLines>;
7118
+ constructor(lines?: NoteLines, fn?: NoteFn);
7119
+ analyze(ctx: AnalysisContext): void;
7120
+ add(lines: NoteLines): this;
7121
+ apply<T extends ts.Node>(ctx: AstContext, node: T): T;
7122
+ toAst(ctx: AstContext): ts.Node;
6776
7123
  }
6777
7124
  //#endregion
6778
7125
  //#region src/ts-dsl/decl/setter.d.ts
6779
7126
  type SetterName = string | ts.PropertyName;
6780
- declare const Mixed$43: 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>;
6781
- declare class SetterTsDsl extends Mixed$43 {
7127
+ 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>;
7128
+ declare class SetterTsDsl extends Mixed$31 {
6782
7129
  readonly '~dsl' = "SetterTsDsl";
6783
7130
  protected name: SetterName;
6784
7131
  constructor(name: SetterName, fn?: (s: SetterTsDsl) => void);
6785
7132
  analyze(ctx: AnalysisContext): void;
6786
- toAst(): ts.SetAccessorDeclaration;
7133
+ toAst(ctx: AstContext): ts.SetAccessorDeclaration;
7134
+ }
7135
+ //#endregion
7136
+ //#region src/ts-dsl/expr/template.d.ts
7137
+ type TemplatePart = Symbol | string | MaybeTsDsl<ts.Expression>;
7138
+ declare const Mixed$30: abstract new () => TsDsl<ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression>;
7139
+ declare class TemplateTsDsl extends Mixed$30 {
7140
+ readonly '~dsl' = "TemplateTsDsl";
7141
+ protected parts: Array<Ref<TemplatePart>>;
7142
+ constructor(value?: TemplatePart);
7143
+ analyze(ctx: AnalysisContext): void;
7144
+ add(value: TemplatePart): this;
7145
+ toAst(ctx: AstContext): ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression;
6787
7146
  }
6788
7147
  //#endregion
6789
7148
  //#region src/ts-dsl/type/param.d.ts
6790
7149
  type TypeParamName = Symbol | string;
6791
7150
  type TypeParamExpr = Symbol | string | boolean | MaybeTsDsl<TypeTsDsl>;
6792
- declare const Mixed$42: abstract new () => TypeTsDsl<ts.TypeParameterDeclaration>;
6793
- declare class TypeParamTsDsl extends Mixed$42 {
7151
+ declare const Mixed$29: abstract new () => TsDsl<ts.TypeParameterDeclaration>;
7152
+ declare class TypeParamTsDsl extends Mixed$29 {
6794
7153
  readonly '~dsl' = "TypeParamTsDsl";
6795
7154
  protected constraint?: Ref<TypeParamExpr>;
6796
7155
  protected defaultValue?: Ref<TypeParamExpr>;
@@ -6799,187 +7158,44 @@ declare class TypeParamTsDsl extends Mixed$42 {
6799
7158
  analyze(ctx: AnalysisContext): void;
6800
7159
  default(value: TypeParamExpr): this;
6801
7160
  extends(constraint: TypeParamExpr): this;
6802
- toAst(): ts.TypeParameterDeclaration;
7161
+ toAst(ctx: AstContext): ts.TypeParameterDeclaration;
6803
7162
  }
6804
7163
  //#endregion
6805
7164
  //#region src/ts-dsl/mixins/type-params.d.ts
6806
7165
  interface TypeParamsMethods extends Node {
6807
7166
  /** Returns the type parameters as an array of ts.TypeParameterDeclaration nodes. */
6808
- $generics(): ReadonlyArray<ts.TypeParameterDeclaration> | undefined;
7167
+ $generics(ast: AstContext): ReadonlyArray<ts.TypeParameterDeclaration> | undefined;
6809
7168
  /** Adds a single type parameter (e.g. `T` in `Array<T>`). */
6810
7169
  generic(...args: ConstructorParameters<typeof TypeParamTsDsl>): this;
6811
7170
  /** Adds type parameters (e.g. `Map<string, T>`). */
6812
7171
  generics(...args: ReadonlyArray<Symbol | string | MaybeTsDsl<TypeParamTsDsl>>): this;
6813
7172
  }
6814
7173
  //#endregion
6815
- //#region src/ts-dsl/expr/typeof.d.ts
6816
- declare const Mixed$41: MixinCtor<abstract new () => TsDsl<ts.TypeOfExpression>, OperatorMethods>;
6817
- declare class TypeOfExprTsDsl extends Mixed$41 {
6818
- readonly '~dsl' = "TypeOfExprTsDsl";
6819
- protected _expr: string | MaybeTsDsl<ts.Expression>;
6820
- constructor(expr: string | MaybeTsDsl<ts.Expression>);
6821
- analyze(ctx: AnalysisContext): void;
6822
- toAst(): ts.TypeOfExpression;
6823
- }
6824
- //#endregion
6825
- //#region src/ts-dsl/type/idx.d.ts
6826
- type Base$2 = string | MaybeTsDsl<ts.TypeNode>;
6827
- type Index = string | number | MaybeTsDsl<ts.TypeNode>;
6828
- declare const Mixed$40: MixinCtor<abstract new () => TypeTsDsl<ts.IndexedAccessTypeNode>, TypeExprMethods>;
6829
- declare class TypeIdxTsDsl extends Mixed$40 {
6830
- readonly '~dsl' = "TypeIdxTsDsl";
6831
- protected _base: Base$2;
6832
- protected _index: Index;
6833
- constructor(base: Base$2, index: Index);
6834
- analyze(ctx: AnalysisContext): void;
6835
- base(base: Base$2): this;
6836
- index(index: Index): this;
6837
- toAst(): ts.IndexedAccessTypeNode;
6838
- }
6839
- //#endregion
6840
- //#region src/ts-dsl/type/operator.d.ts
6841
- type Op = ts.SyntaxKind.KeyOfKeyword | ts.SyntaxKind.ReadonlyKeyword | ts.SyntaxKind.UniqueKeyword;
6842
- type Type$2 = string | MaybeTsDsl<ts.TypeNode>;
6843
- declare const Mixed$39: abstract new () => TypeTsDsl<ts.TypeOperatorNode>;
6844
- /**
6845
- * Builds a TypeScript `TypeOperatorNode`, such as:
6846
- *
6847
- * - `keyof T`
6848
- * - `readonly U`
6849
- * - `unique V`
6850
- *
6851
- * This DSL provides both a generic `.operator()` API and convenient
6852
- * shorthand methods (`.keyof()`, `.readonly()`, `.unique()`).
6853
- *
6854
- * The node will throw during render if required fields are missing.
6855
- */
6856
- declare class TypeOperatorTsDsl extends Mixed$39 {
6857
- readonly '~dsl' = "TypeOperatorTsDsl";
6858
- protected _op?: Op;
6859
- protected _type?: Type$2;
6860
- analyze(ctx: AnalysisContext): void;
6861
- /** Shorthand: builds `keyof T`. */
6862
- keyof(type: Type$2): this;
6863
- /** Sets the operator explicitly. */
6864
- operator(op: Op): this;
6865
- /** Shorthand: builds `readonly T`. */
6866
- readonly(type: Type$2): this;
6867
- /** Sets the target type of the operator. */
6868
- type(type: Type$2): this;
6869
- /** Shorthand: builds `unique T`. */
6870
- unique(type: Type$2): this;
6871
- toAst(): ts.TypeOperatorNode;
6872
- /** Throws if required fields are not set. */
6873
- $validate(): asserts this is this & {
6874
- _op: Op;
6875
- _type: Type$2;
6876
- };
6877
- private missingRequiredCalls;
6878
- }
6879
- //#endregion
6880
- //#region src/ts-dsl/type/query.d.ts
6881
- declare const Mixed$38: MixinCtor<abstract new () => TypeTsDsl<ts.TypeQueryNode>, TypeExprMethods>;
6882
- declare class TypeQueryTsDsl extends Mixed$38 {
6883
- readonly '~dsl' = "TypeQueryTsDsl";
6884
- protected _expr: string | MaybeTsDsl<TypeTsDsl | ts.Expression>;
6885
- constructor(expr: string | MaybeTsDsl<TypeTsDsl | ts.Expression>);
6886
- analyze(ctx: AnalysisContext): void;
6887
- toAst(): ts.TypeQueryNode;
6888
- }
6889
- //#endregion
6890
- //#region src/ts-dsl/mixins/type-expr.d.ts
6891
- interface TypeExprMethods extends Node {
6892
- /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
6893
- idx(this: MaybeTsDsl<TypeTsDsl>, index: string | number | MaybeTsDsl<ts.TypeNode>): TypeIdxTsDsl;
6894
- /** Shorthand: builds `keyof T`. */
6895
- keyof(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
6896
- /** Shorthand: builds `readonly T`. */
6897
- readonly(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
6898
- /** Create a TypeExpr node representing ReturnType<this>. */
6899
- returnType(this: MaybeTsDsl<ts.Expression>): TypeExprTsDsl;
6900
- /** Create a TypeOfExpr node representing typeof this. */
6901
- typeofExpr(this: MaybeTsDsl<ts.Expression>): TypeOfExprTsDsl;
6902
- /** Create a TypeQuery node representing typeof this. */
6903
- typeofType(this: MaybeTsDsl<TypeTsDsl | ts.Expression>): TypeQueryTsDsl;
6904
- /** Shorthand: builds `unique T`. */
6905
- unique(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
6906
- }
6907
- //#endregion
6908
- //#region src/ts-dsl/type/attr.d.ts
6909
- type Base$1 = Symbol | string | MaybeTsDsl<ts.EntityName>;
6910
- type Right = Symbol | string | ts.Identifier;
6911
- declare const Mixed$37: MixinCtor<abstract new () => TypeTsDsl<ts.QualifiedName>, TypeExprMethods>;
6912
- declare class TypeAttrTsDsl extends Mixed$37 {
6913
- readonly '~dsl' = "TypeAttrTsDsl";
6914
- protected _base?: Ref<Base$1>;
6915
- protected _right: Ref<Right>;
6916
- constructor(base: Base$1 | Ref<Base$1>, right: string | ts.Identifier);
6917
- constructor(right: Right);
6918
- analyze(ctx: AnalysisContext): void;
6919
- base(base?: Base$1 | Ref<Base$1>): this;
6920
- right(right: Right): this;
6921
- toAst(): ts.QualifiedName;
6922
- }
6923
- //#endregion
6924
- //#region src/ts-dsl/type/expr.d.ts
6925
- type TypeExprName = Symbol | string;
6926
- type TypeExprExpr = TypeExprName | TypeAttrTsDsl;
6927
- declare const Mixed$36: MixinCtor<MixinCtor<abstract new () => TypeTsDsl<ts.TypeReferenceNode>, TypeExprMethods>, TypeArgsMethods>;
6928
- declare class TypeExprTsDsl extends Mixed$36 {
6929
- readonly '~dsl' = "TypeExprTsDsl";
6930
- protected _exprInput?: Ref<TypeExprExpr>;
6931
- constructor();
6932
- constructor(fn: (t: TypeExprTsDsl) => void);
6933
- constructor(name: TypeExprName);
6934
- constructor(name: TypeExprName, fn?: (t: TypeExprTsDsl) => void);
6935
- analyze(ctx: AnalysisContext): void;
6936
- /** Accesses a nested type (e.g. `Foo.Bar`). */
6937
- attr(right: string | ts.Identifier | TypeAttrTsDsl): this;
6938
- toAst(): ts.TypeReferenceNode;
6939
- }
6940
- //#endregion
6941
- //#region src/ts-dsl/decl/field.d.ts
6942
- type FieldType = TypeExprName | TypeTsDsl;
6943
- 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>;
6944
- declare class FieldTsDsl extends Mixed$35 {
6945
- readonly '~dsl' = "FieldTsDsl";
6946
- protected name: string;
6947
- protected _type?: TypeTsDsl;
6948
- constructor(name: string, fn?: (f: FieldTsDsl) => void);
6949
- analyze(ctx: AnalysisContext): void;
6950
- /** Sets the field type. */
6951
- type(type: FieldType): this;
6952
- toAst(): ts.PropertyDeclaration;
6953
- }
6954
- //#endregion
6955
7174
  //#region src/ts-dsl/decl/init.d.ts
6956
- declare const Mixed$34: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ConstructorDeclaration>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>;
6957
- declare class InitTsDsl extends Mixed$34 {
7175
+ declare const Mixed$28: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ConstructorDeclaration>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>;
7176
+ declare class InitTsDsl extends Mixed$28 {
6958
7177
  readonly '~dsl' = "InitTsDsl";
6959
7178
  constructor(fn?: (i: InitTsDsl) => void);
6960
7179
  analyze(ctx: AnalysisContext): void;
6961
- toAst(): ts.ConstructorDeclaration;
7180
+ toAst(ctx: AstContext): ts.ConstructorDeclaration;
6962
7181
  }
6963
7182
  //#endregion
6964
7183
  //#region src/ts-dsl/decl/method.d.ts
6965
- declare const Mixed$33: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.MethodDeclaration>, TypeParamsMethods>, StaticMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, OptionalMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AbstractMethods>;
6966
- declare class MethodTsDsl extends Mixed$33 {
7184
+ 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>;
7185
+ declare class MethodTsDsl extends Mixed$27 {
6967
7186
  readonly '~dsl' = "MethodTsDsl";
6968
7187
  protected name: string;
6969
- protected _returns?: TypeTsDsl;
6970
7188
  constructor(name: string, fn?: (m: MethodTsDsl) => void);
6971
7189
  analyze(ctx: AnalysisContext): void;
6972
- /** Sets the return type. */
6973
- returns(type: string | TypeTsDsl): this;
6974
- toAst(): ts.MethodDeclaration;
7190
+ toAst(ctx: AstContext): ts.MethodDeclaration;
6975
7191
  }
6976
7192
  //#endregion
6977
7193
  //#region src/ts-dsl/decl/class.d.ts
6978
7194
  type Base = Symbol | string;
6979
7195
  type Name$1 = Symbol | string;
6980
7196
  type Body = Array<MaybeTsDsl<ts.ClassElement | ts.Node>>;
6981
- declare const Mixed$32: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ClassDeclaration>, TypeParamsMethods>, ExportMethods>, DocMethods>, DefaultMethods>, DecoratorMethods>, AbstractMethods>;
6982
- declare class ClassTsDsl extends Mixed$32 {
7197
+ declare const Mixed$26: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ClassDeclaration>, TypeParamsMethods>, ExportMethods>, DocMethods>, DefaultMethods>, DecoratorMethods>, AbstractMethods>;
7198
+ declare class ClassTsDsl extends Mixed$26 {
6983
7199
  readonly '~dsl' = "ClassTsDsl";
6984
7200
  protected baseClass?: Ref<Base>;
6985
7201
  protected body: Body;
@@ -6991,71 +7207,26 @@ declare class ClassTsDsl extends Mixed$32 {
6991
7207
  /** Records a base class to extend from. */
6992
7208
  extends(base?: Base): this;
6993
7209
  /** Adds a class field. */
6994
- field(name: string, fn?: (f: FieldTsDsl) => void): this;
7210
+ field(name: FieldName, fn?: (f: FieldTsDsl) => void): this;
6995
7211
  /** Adds a class constructor. */
6996
7212
  init(fn?: (i: InitTsDsl) => void): this;
6997
7213
  /** Adds a class method. */
6998
7214
  method(name: string, fn?: (m: MethodTsDsl) => void): this;
6999
7215
  /** Inserts an empty line between members for formatting. */
7000
7216
  newline(): this;
7001
- toAst(): ts.ClassDeclaration;
7217
+ toAst(ctx: AstContext): ts.ClassDeclaration;
7002
7218
  /** Builds heritage clauses (extends). */
7003
7219
  private _heritage;
7004
7220
  }
7005
7221
  //#endregion
7006
- //#region src/ts-dsl/decl/decorator.d.ts
7007
- type DecoratorName = Symbol | string | MaybeTsDsl<ts.Expression>;
7008
- declare const Mixed$31: MixinCtor<abstract new () => TsDsl<ts.Decorator>, ArgsMethods>;
7009
- declare class DecoratorTsDsl extends Mixed$31 {
7010
- readonly '~dsl' = "DecoratorTsDsl";
7011
- protected name: Ref<DecoratorName>;
7012
- constructor(name: DecoratorName, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>);
7013
- analyze(ctx: AnalysisContext): void;
7014
- toAst(): ts.Decorator;
7015
- }
7016
- //#endregion
7017
- //#region src/ts-dsl/decl/member.d.ts
7018
- type Value$2 = string | number | MaybeTsDsl<ts.Expression>;
7019
- type ValueFn$1 = Value$2 | ((m: EnumMemberTsDsl) => void);
7020
- declare const Mixed$30: MixinCtor<abstract new () => TsDsl<ts.EnumMember>, DocMethods>;
7021
- declare class EnumMemberTsDsl extends Mixed$30 {
7022
- readonly '~dsl' = "EnumMemberTsDsl";
7023
- private _name;
7024
- private _value?;
7025
- constructor(name: string, value?: ValueFn$1);
7026
- analyze(ctx: AnalysisContext): void;
7027
- /** Sets the enum member value. */
7028
- value(value?: Value$2): this;
7029
- toAst(): ts.EnumMember;
7030
- }
7031
- //#endregion
7032
- //#region src/ts-dsl/decl/enum.d.ts
7033
- type EnumName = Symbol | string;
7034
- type Value$1 = string | number | MaybeTsDsl<ts.Expression>;
7035
- type ValueFn = Value$1 | ((m: EnumMemberTsDsl) => void);
7036
- declare const Mixed$29: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.EnumDeclaration>, ExportMethods>, DocMethods>, ConstMethods>;
7037
- declare class EnumTsDsl extends Mixed$29 {
7038
- readonly '~dsl' = "EnumTsDsl";
7039
- private _members;
7040
- private _name;
7041
- constructor(name: EnumName, fn?: (e: EnumTsDsl) => void);
7042
- analyze(ctx: AnalysisContext): void;
7043
- /** Adds an enum member. */
7044
- member(name: string, value?: ValueFn): this;
7045
- /** Adds multiple enum members. */
7046
- members(...members: ReadonlyArray<EnumMemberTsDsl>): this;
7047
- toAst(): ts.EnumDeclaration;
7048
- }
7049
- //#endregion
7050
7222
  //#region src/ts-dsl/decl/func.d.ts
7051
7223
  type FuncMode = 'arrow' | 'decl' | 'expr';
7052
7224
  type FuncName = Symbol | string;
7053
- declare const Mixed$28: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ArrowFunction>, TypeParamsMethods>, StaticMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AsMethods>, AbstractMethods>;
7054
- declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$28 {
7225
+ 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>;
7226
+ declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$25 {
7055
7227
  readonly '~dsl' = "FuncTsDsl";
7056
7228
  protected mode?: FuncMode;
7057
7229
  protected name?: Ref<FuncName>;
7058
- protected _returns?: TypeTsDsl;
7059
7230
  constructor();
7060
7231
  constructor(fn: (f: ImplFuncTsDsl<'arrow'>) => void);
7061
7232
  constructor(name: FuncName);
@@ -7067,9 +7238,7 @@ declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$28 {
7067
7238
  decl(): FuncTsDsl<'decl'>;
7068
7239
  /** Switches the function to a function expression form. */
7069
7240
  expr(): FuncTsDsl<'expr'>;
7070
- /** Sets the return type. */
7071
- returns(type: string | TypeTsDsl): this;
7072
- toAst(): M extends 'decl' ? ts.FunctionDeclaration : M extends 'expr' ? ts.FunctionExpression : ts.ArrowFunction;
7241
+ toAst(ctx: AstContext): M extends 'decl' ? ts.FunctionDeclaration : M extends 'expr' ? ts.FunctionExpression : ts.ArrowFunction;
7073
7242
  }
7074
7243
  declare const FuncTsDsl: {
7075
7244
  new (): FuncTsDsl<"arrow">;
@@ -7080,11 +7249,11 @@ declare const FuncTsDsl: {
7080
7249
  type FuncTsDsl<M extends FuncMode = 'arrow'> = ImplFuncTsDsl<M>;
7081
7250
  //#endregion
7082
7251
  //#region src/ts-dsl/decl/pattern.d.ts
7083
- declare const Mixed$27: abstract new () => TsDsl<ts.BindingName>;
7252
+ declare const Mixed$24: abstract new () => TsDsl<ts.BindingName>;
7084
7253
  /**
7085
7254
  * Builds binding patterns (e.g. `{ foo, bar }`, `[a, b, ...rest]`).
7086
7255
  */
7087
- declare class PatternTsDsl extends Mixed$27 {
7256
+ declare class PatternTsDsl extends Mixed$24 {
7088
7257
  readonly '~dsl' = "PatternTsDsl";
7089
7258
  protected pattern?: {
7090
7259
  kind: 'array';
@@ -7101,7 +7270,7 @@ declare class PatternTsDsl extends Mixed$27 {
7101
7270
  object(...props: ReadonlyArray<MaybeArray$1<string> | Record<string, string>>): this;
7102
7271
  /** Adds a spread element (e.g. `...rest`, `...options`, `...args`). */
7103
7272
  spread(name: string): this;
7104
- toAst(): ts.ObjectBindingPattern | ts.ArrayBindingPattern;
7273
+ toAst(ctx: AstContext): ts.ObjectBindingPattern | ts.ArrayBindingPattern;
7105
7274
  private createSpread;
7106
7275
  }
7107
7276
  //#endregion
@@ -7118,8 +7287,8 @@ interface LayoutMethods extends Node {
7118
7287
  }
7119
7288
  //#endregion
7120
7289
  //#region src/ts-dsl/expr/array.d.ts
7121
- declare const Mixed$26: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ArrayLiteralExpression>, LayoutMethods>, AsMethods>;
7122
- declare class ArrayTsDsl extends Mixed$26 {
7290
+ declare const Mixed$23: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ArrayLiteralExpression>, LayoutMethods>, AsMethods>;
7291
+ declare class ArrayTsDsl extends Mixed$23 {
7123
7292
  readonly '~dsl' = "ArrayTsDsl";
7124
7293
  protected _elements: Array<{
7125
7294
  expr: MaybeTsDsl<ts.Expression>;
@@ -7136,23 +7305,23 @@ declare class ArrayTsDsl extends Mixed$26 {
7136
7305
  elements(...exprs: ReadonlyArray<string | number | boolean | MaybeTsDsl<ts.Expression>>): this;
7137
7306
  /** Adds a spread element (`...expr`). */
7138
7307
  spread(expr: MaybeTsDsl<ts.Expression>): this;
7139
- toAst(): ts.ArrayLiteralExpression;
7308
+ toAst(ctx: AstContext): ts.ArrayLiteralExpression;
7140
7309
  }
7141
7310
  //#endregion
7142
7311
  //#region src/ts-dsl/expr/expr.d.ts
7143
7312
  type Id = Symbol | string | MaybeTsDsl<ts.Expression>;
7144
- declare const Mixed$25: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Expression>, TypeExprMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
7145
- declare class ExprTsDsl extends Mixed$25 {
7313
+ declare const Mixed$22: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Expression>, TypeExprMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
7314
+ declare class ExprTsDsl extends Mixed$22 {
7146
7315
  readonly '~dsl' = "ExprTsDsl";
7147
7316
  protected _exprInput: Ref<Id>;
7148
7317
  constructor(id: Id);
7149
7318
  analyze(ctx: AnalysisContext): void;
7150
- toAst(): any;
7319
+ toAst(ctx: AstContext): ts.Expression;
7151
7320
  }
7152
7321
  //#endregion
7153
7322
  //#region src/ts-dsl/expr/id.d.ts
7154
- declare const Mixed$24: abstract new () => TsDsl<ts.Identifier>;
7155
- declare class IdTsDsl extends Mixed$24 {
7323
+ declare const Mixed$21: abstract new () => TsDsl<ts.Identifier>;
7324
+ declare class IdTsDsl extends Mixed$21 {
7156
7325
  readonly '~dsl' = "IdTsDsl";
7157
7326
  protected name: string;
7158
7327
  constructor(name: string);
@@ -7161,41 +7330,13 @@ declare class IdTsDsl extends Mixed$24 {
7161
7330
  }
7162
7331
  //#endregion
7163
7332
  //#region src/ts-dsl/expr/literal.d.ts
7164
- declare const Mixed$23: MixinCtor<abstract new () => TsDsl<ts.LiteralExpression | ts.NullLiteral | ts.BooleanLiteral | ts.PrefixUnaryExpression>, AsMethods>;
7165
- declare class LiteralTsDsl extends Mixed$23 {
7333
+ declare const Mixed$20: MixinCtor<abstract new () => TsDsl<ts.LiteralExpression | ts.NullLiteral | ts.BooleanLiteral | ts.PrefixUnaryExpression>, AsMethods>;
7334
+ declare class LiteralTsDsl extends Mixed$20 {
7166
7335
  readonly '~dsl' = "LiteralTsDsl";
7167
7336
  protected value: string | number | boolean | null;
7168
7337
  constructor(value: string | number | boolean | null);
7169
7338
  analyze(ctx: AnalysisContext): void;
7170
- toAst(): any;
7171
- }
7172
- //#endregion
7173
- //#region src/ts-dsl/expr/new.d.ts
7174
- type NewExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
7175
- declare const Mixed$22: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.NewExpression>, TypeArgsMethods>, ExprMethods>, ArgsMethods>;
7176
- declare class NewTsDsl extends Mixed$22 {
7177
- readonly '~dsl' = "NewTsDsl";
7178
- protected classExpr: Ref<NewExpr>;
7179
- constructor(classExpr: NewExpr, ...args: ReadonlyArray<NewExpr>);
7180
- analyze(ctx: AnalysisContext): void;
7181
- toAst(): ts.NewExpression;
7182
- }
7183
- //#endregion
7184
- //#region src/ts-dsl/layout/hint.d.ts
7185
- declare class HintTsDsl extends TsDsl<ts.Node> {
7186
- readonly '~dsl' = "HintTsDsl";
7187
- protected _lines: Array<string>;
7188
- constructor(lines?: MaybeArray$1<string>, fn?: (d: HintTsDsl) => void);
7189
- analyze(ctx: AnalysisContext): void;
7190
- add(...lines: ReadonlyArray<string>): this;
7191
- apply<T extends ts.Node>(node: T): T;
7192
- toAst(): ts.Node;
7193
- }
7194
- //#endregion
7195
- //#region src/ts-dsl/mixins/hint.d.ts
7196
- interface HintMethods extends Node {
7197
- $hint<T extends ts.Node>(node: T): T;
7198
- hint(lines?: MaybeArray$1<string>, fn?: (h: HintTsDsl) => void): this;
7339
+ toAst(ctx: AstContext): ts.StringLiteral | ts.NumericLiteral | ts.NullLiteral | ts.TrueLiteral | ts.FalseLiteral | ts.PrefixUnaryExpression;
7199
7340
  }
7200
7341
  //#endregion
7201
7342
  //#region src/ts-dsl/expr/prop.d.ts
@@ -7218,8 +7359,8 @@ type Meta = {
7218
7359
  kind: 'spread';
7219
7360
  name?: undefined;
7220
7361
  };
7221
- declare const Mixed$21: MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralElementLike>, DocMethods>;
7222
- declare class ObjectPropTsDsl extends Mixed$21 {
7362
+ declare const Mixed$19: MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralElementLike>, DocMethods>;
7363
+ declare class ObjectPropTsDsl extends Mixed$19 {
7223
7364
  readonly '~dsl' = "ObjectPropTsDsl";
7224
7365
  protected _value?: Ref<Expr$1 | Stmt$1>;
7225
7366
  protected meta: Meta;
@@ -7228,7 +7369,7 @@ declare class ObjectPropTsDsl extends Mixed$21 {
7228
7369
  /** Returns true when all required builder calls are present. */
7229
7370
  get isValid(): boolean;
7230
7371
  value(value: Expr$1 | Stmt$1 | ((p: ObjectPropTsDsl) => void)): this;
7231
- toAst(): any;
7372
+ toAst(ctx: AstContext): ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.SpreadAssignment;
7232
7373
  $validate(): asserts this is this & {
7233
7374
  _value: Expr$1 | Stmt$1;
7234
7375
  kind: Kind;
@@ -7241,8 +7382,8 @@ type Expr = Symbol | string | MaybeTsDsl<ts.Expression>;
7241
7382
  type Stmt = Symbol | string | MaybeTsDsl<ts.Statement>;
7242
7383
  type ExprFn = Expr | ((p: ObjectPropTsDsl) => void);
7243
7384
  type StmtFn = Stmt | ((p: ObjectPropTsDsl) => void);
7244
- declare const Mixed$20: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralExpression>, LayoutMethods>, HintMethods>, ExprMethods>, AsMethods>;
7245
- declare class ObjectTsDsl extends Mixed$20 {
7385
+ declare const Mixed$18: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralExpression>, LayoutMethods>, HintMethods>, ExprMethods>, AsMethods>;
7386
+ declare class ObjectTsDsl extends Mixed$18 {
7246
7387
  readonly '~dsl' = "ObjectTsDsl";
7247
7388
  protected _props: Array<ObjectPropTsDsl>;
7248
7389
  constructor(...props: Array<ObjectPropTsDsl>);
@@ -7263,12 +7404,12 @@ declare class ObjectTsDsl extends Mixed$20 {
7263
7404
  setter(name: string, stmt: StmtFn): this;
7264
7405
  /** Adds a spread property (e.g. `{ ...options }`). */
7265
7406
  spread(expr: ExprFn): this;
7266
- toAst(): ts.ObjectLiteralExpression;
7407
+ toAst(ctx: AstContext): ts.ObjectLiteralExpression;
7267
7408
  }
7268
7409
  //#endregion
7269
7410
  //#region src/ts-dsl/expr/prefix.d.ts
7270
- declare const Mixed$19: abstract new () => TsDsl<ts.PrefixUnaryExpression>;
7271
- declare class PrefixTsDsl extends Mixed$19 {
7411
+ declare const Mixed$17: abstract new () => TsDsl<ts.PrefixUnaryExpression>;
7412
+ declare class PrefixTsDsl extends Mixed$17 {
7272
7413
  readonly '~dsl' = "PrefixTsDsl";
7273
7414
  protected _expr?: string | MaybeTsDsl<ts.Expression>;
7274
7415
  protected _op?: ts.PrefixUnaryOperator;
@@ -7282,14 +7423,14 @@ declare class PrefixTsDsl extends Mixed$19 {
7282
7423
  not(): this;
7283
7424
  /** Sets the operator (e.g. `ts.SyntaxKind.ExclamationToken` for `!`). */
7284
7425
  op(op: ts.PrefixUnaryOperator): this;
7285
- toAst(): ts.PrefixUnaryExpression;
7426
+ toAst(ctx: AstContext): ts.PrefixUnaryExpression;
7286
7427
  }
7287
7428
  //#endregion
7288
7429
  //#region src/ts-dsl/expr/regexp.d.ts
7289
7430
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u' | 'y';
7290
7431
  type RegexFlags<Avail extends string = RegexFlag> = '' | { [K in Avail]: `${K}${RegexFlags<Exclude<Avail, K>>}` }[Avail];
7291
- declare const Mixed$18: abstract new () => TsDsl<ts.RegularExpressionLiteral>;
7292
- declare class RegExpTsDsl extends Mixed$18 {
7432
+ declare const Mixed$16: abstract new () => TsDsl<ts.RegularExpressionLiteral>;
7433
+ declare class RegExpTsDsl extends Mixed$16 {
7293
7434
  readonly '~dsl' = "RegExpTsDsl";
7294
7435
  protected pattern: string;
7295
7436
  protected flags?: RegexFlags;
@@ -7298,21 +7439,9 @@ declare class RegExpTsDsl extends Mixed$18 {
7298
7439
  toAst(): ts.RegularExpressionLiteral;
7299
7440
  }
7300
7441
  //#endregion
7301
- //#region src/ts-dsl/expr/template.d.ts
7302
- type TemplatePart = Symbol | string | MaybeTsDsl<ts.Expression>;
7303
- declare const Mixed$17: abstract new () => TsDsl<ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression>;
7304
- declare class TemplateTsDsl extends Mixed$17 {
7305
- readonly '~dsl' = "TemplateTsDsl";
7306
- protected parts: Array<Ref<TemplatePart>>;
7307
- constructor(value?: TemplatePart);
7308
- analyze(ctx: AnalysisContext): void;
7309
- add(value: TemplatePart): this;
7310
- toAst(): ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression;
7311
- }
7312
- //#endregion
7313
7442
  //#region src/ts-dsl/expr/ternary.d.ts
7314
- declare const Mixed$16: abstract new () => TsDsl<ts.ConditionalExpression>;
7315
- declare class TernaryTsDsl extends Mixed$16 {
7443
+ declare const Mixed$15: abstract new () => TsDsl<ts.ConditionalExpression>;
7444
+ declare class TernaryTsDsl extends Mixed$15 {
7316
7445
  readonly '~dsl' = "TernaryTsDsl";
7317
7446
  protected _condition?: string | MaybeTsDsl<ts.Expression>;
7318
7447
  protected _then?: string | MaybeTsDsl<ts.Expression>;
@@ -7322,49 +7451,38 @@ declare class TernaryTsDsl extends Mixed$16 {
7322
7451
  condition(condition: string | MaybeTsDsl<ts.Expression>): this;
7323
7452
  do(expr: string | MaybeTsDsl<ts.Expression>): this;
7324
7453
  otherwise(expr: string | MaybeTsDsl<ts.Expression>): this;
7325
- toAst(): ts.ConditionalExpression;
7454
+ toAst(ctx: AstContext): ts.ConditionalExpression;
7326
7455
  }
7327
7456
  //#endregion
7328
7457
  //#region src/ts-dsl/layout/newline.d.ts
7329
7458
  declare class NewlineTsDsl extends TsDsl<ts.Identifier> {
7330
7459
  readonly '~dsl' = "NewlineTsDsl";
7331
7460
  analyze(ctx: AnalysisContext): void;
7332
- toAst(): ts.Identifier;
7333
- }
7334
- //#endregion
7335
- //#region src/ts-dsl/layout/note.d.ts
7336
- declare class NoteTsDsl extends TsDsl<ts.Node> {
7337
- readonly '~dsl' = "NoteTsDsl";
7338
- protected _lines: Array<string>;
7339
- constructor(lines?: MaybeArray$1<string>, fn?: (d: NoteTsDsl) => void);
7340
- analyze(ctx: AnalysisContext): void;
7341
- add(...lines: ReadonlyArray<string>): this;
7342
- apply<T extends ts.Node>(node: T): T;
7343
- toAst(): ts.Node;
7461
+ toAst(ctx: AstContext): ts.Identifier;
7344
7462
  }
7345
7463
  //#endregion
7346
7464
  //#region src/ts-dsl/stmt/block.d.ts
7347
- declare const Mixed$15: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Block>, LayoutMethods>, DoMethods>;
7348
- declare class BlockTsDsl extends Mixed$15 {
7465
+ declare const Mixed$14: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Block>, LayoutMethods>, DoMethods>;
7466
+ declare class BlockTsDsl extends Mixed$14 {
7349
7467
  readonly '~dsl' = "BlockTsDsl";
7350
7468
  constructor(...items: Array<DoExpr>);
7351
7469
  analyze(ctx: AnalysisContext): void;
7352
- toAst(): ts.Block;
7470
+ toAst(ctx: AstContext): ts.Block;
7353
7471
  }
7354
7472
  //#endregion
7355
7473
  //#region src/ts-dsl/stmt/stmt.d.ts
7356
- declare const Mixed$14: abstract new () => TsDsl<ts.Statement>;
7357
- declare class StmtTsDsl extends Mixed$14 {
7474
+ declare const Mixed$13: abstract new () => TsDsl<ts.Statement>;
7475
+ declare class StmtTsDsl extends Mixed$13 {
7358
7476
  readonly '~dsl' = "StmtTsDsl";
7359
7477
  protected _inner: ts.Expression | ts.Statement | TsDsl<any>;
7360
7478
  constructor(inner: ts.Expression | ts.Statement | TsDsl<any>);
7361
7479
  analyze(ctx: AnalysisContext): void;
7362
- toAst(): ts.Statement;
7480
+ toAst(ctx: AstContext): ts.Statement;
7363
7481
  }
7364
7482
  //#endregion
7365
7483
  //#region src/ts-dsl/stmt/throw.d.ts
7366
- declare const Mixed$13: abstract new () => TsDsl<ts.ThrowStatement>;
7367
- declare class ThrowTsDsl extends Mixed$13 {
7484
+ declare const Mixed$12: abstract new () => TsDsl<ts.ThrowStatement>;
7485
+ declare class ThrowTsDsl extends Mixed$12 {
7368
7486
  readonly '~dsl' = "ThrowTsDsl";
7369
7487
  protected error: string | MaybeTsDsl<ts.Expression>;
7370
7488
  protected msg?: string | MaybeTsDsl<ts.Expression>;
@@ -7372,13 +7490,13 @@ declare class ThrowTsDsl extends Mixed$13 {
7372
7490
  constructor(error: string | MaybeTsDsl<ts.Expression>, useNew?: boolean);
7373
7491
  analyze(ctx: AnalysisContext): void;
7374
7492
  message(value: string | MaybeTsDsl<ts.Expression>): this;
7375
- toAst(): ts.ThrowStatement;
7493
+ toAst(ctx: AstContext): ts.ThrowStatement;
7376
7494
  }
7377
7495
  //#endregion
7378
7496
  //#region src/ts-dsl/stmt/try.d.ts
7379
- declare const Mixed$12: abstract new () => TsDsl<ts.TryStatement>;
7497
+ declare const Mixed$11: abstract new () => TsDsl<ts.TryStatement>;
7380
7498
  type CatchParam = Symbol | string;
7381
- declare class TryTsDsl extends Mixed$12 {
7499
+ declare class TryTsDsl extends Mixed$11 {
7382
7500
  readonly '~dsl' = "TryTsDsl";
7383
7501
  protected _catch?: Array<DoExpr>;
7384
7502
  protected _catchArg?: CatchParam;
@@ -7390,25 +7508,7 @@ declare class TryTsDsl extends Mixed$12 {
7390
7508
  catchArg(arg: CatchParam): this;
7391
7509
  finally(...items: Array<DoExpr>): this;
7392
7510
  try(...items: Array<DoExpr>): this;
7393
- toAst(): ts.TryStatement;
7394
- }
7395
- //#endregion
7396
- //#region src/ts-dsl/stmt/var.d.ts
7397
- type VarName = Symbol | string;
7398
- declare const Mixed$11: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.VariableStatement>, ValueMethods>, PatternMethods>, HintMethods>, ExportMethods>, DocMethods>, DefaultMethods>;
7399
- declare class VarTsDsl extends Mixed$11 {
7400
- readonly '~dsl' = "VarTsDsl";
7401
- protected kind: ts.NodeFlags;
7402
- protected name?: Ref<VarName>;
7403
- protected _type?: TypeTsDsl;
7404
- constructor(name?: VarName);
7405
- analyze(ctx: AnalysisContext): void;
7406
- const(): this;
7407
- let(): this;
7408
- /** Sets the variable type. */
7409
- type(type: string | TypeTsDsl): this;
7410
- var(): this;
7411
- toAst(): ts.VariableStatement;
7511
+ toAst(ctx: AstContext): ts.TryStatement;
7412
7512
  }
7413
7513
  //#endregion
7414
7514
  //#region src/ts-dsl/token.d.ts
@@ -7444,44 +7544,41 @@ declare class TypeAliasTsDsl extends Mixed$10 {
7444
7544
  analyze(ctx: AnalysisContext): void;
7445
7545
  /** Sets the type expression on the right-hand side of `= ...`. */
7446
7546
  type(node: Value): this;
7447
- toAst(): ts.TypeAliasDeclaration;
7547
+ toAst(ctx: AstContext): ts.TypeAliasDeclaration;
7448
7548
  }
7449
7549
  //#endregion
7450
7550
  //#region src/ts-dsl/type/and.d.ts
7451
7551
  type Type$1 = Symbol | string | ts.TypeNode | TypeTsDsl;
7452
- declare const Mixed$9: abstract new () => TypeTsDsl<ts.IntersectionTypeNode>;
7552
+ declare const Mixed$9: abstract new () => TsDsl<ts.IntersectionTypeNode>;
7453
7553
  declare class TypeAndTsDsl extends Mixed$9 {
7454
7554
  readonly '~dsl' = "TypeAndTsDsl";
7455
7555
  protected _types: Array<Ref<Type$1>>;
7456
7556
  constructor(...nodes: Array<Type$1>);
7457
7557
  analyze(ctx: AnalysisContext): void;
7458
7558
  types(...nodes: Array<Type$1>): this;
7459
- toAst(): ts.IntersectionTypeNode;
7559
+ toAst(ctx: AstContext): ts.IntersectionTypeNode;
7460
7560
  }
7461
7561
  //#endregion
7462
7562
  //#region src/ts-dsl/type/func.d.ts
7463
- declare const Mixed$8: MixinCtor<MixinCtor<MixinCtor<abstract new () => TypeTsDsl<ts.FunctionTypeNode>, TypeParamsMethods>, ParamMethods>, DocMethods>;
7563
+ declare const Mixed$8: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.FunctionTypeNode>, TypeReturnsMethods>, TypeParamsMethods>, ParamMethods>, DocMethods>;
7464
7564
  declare class TypeFuncTsDsl extends Mixed$8 {
7465
7565
  readonly '~dsl' = "TypeFuncTsDsl";
7466
- protected _returns?: TypeTsDsl;
7467
7566
  analyze(ctx: AnalysisContext): void;
7468
- /** Sets the return type. */
7469
- returns(type: string | TypeTsDsl): this;
7470
- toAst(): ts.FunctionTypeNode;
7567
+ toAst(ctx: AstContext): ts.FunctionTypeNode;
7471
7568
  }
7472
7569
  //#endregion
7473
7570
  //#region src/ts-dsl/type/literal.d.ts
7474
- declare const Mixed$7: abstract new () => TypeTsDsl<ts.LiteralTypeNode>;
7571
+ declare const Mixed$7: abstract new () => TsDsl<ts.LiteralTypeNode>;
7475
7572
  declare class TypeLiteralTsDsl extends Mixed$7 {
7476
7573
  readonly '~dsl' = "TypeLiteralTsDsl";
7477
7574
  protected value: string | number | boolean | null;
7478
7575
  constructor(value: string | number | boolean | null);
7479
7576
  analyze(ctx: AnalysisContext): void;
7480
- toAst(): ts.LiteralTypeNode;
7577
+ toAst(ctx: AstContext): ts.LiteralTypeNode;
7481
7578
  }
7482
7579
  //#endregion
7483
7580
  //#region src/ts-dsl/type/mapped.d.ts
7484
- declare const Mixed$6: abstract new () => TypeTsDsl<ts.MappedTypeNode>;
7581
+ declare const Mixed$6: abstract new () => TsDsl<ts.MappedTypeNode>;
7485
7582
  declare class TypeMappedTsDsl extends Mixed$6 {
7486
7583
  readonly '~dsl' = "TypeMappedTsDsl";
7487
7584
  protected questionToken?: TokenTsDsl<ts.SyntaxKind.QuestionToken | ts.SyntaxKind.PlusToken | ts.SyntaxKind.MinusToken>;
@@ -7507,7 +7604,7 @@ declare class TypeMappedTsDsl extends Mixed$6 {
7507
7604
  required(): this;
7508
7605
  /** Sets the mapped value type: `[K in X]: ValueType` */
7509
7606
  type(type: string | MaybeTsDsl<ts.TypeNode>): this;
7510
- toAst(): ts.MappedTypeNode;
7607
+ toAst(ctx: AstContext): ts.MappedTypeNode;
7511
7608
  $validate(): asserts this is this & {
7512
7609
  _key: string | MaybeTsDsl<ts.TypeNode>;
7513
7610
  _name: string;
@@ -7519,7 +7616,7 @@ declare class TypeMappedTsDsl extends Mixed$6 {
7519
7616
  //#region src/ts-dsl/type/idx-sig.d.ts
7520
7617
  type TypeIdxSigName = string;
7521
7618
  type TypeIdxSigType = string | MaybeTsDsl<ts.TypeNode>;
7522
- declare const Mixed$5: MixinCtor<MixinCtor<abstract new () => TypeTsDsl<ts.IndexSignatureDeclaration>, ReadonlyMethods>, DocMethods>;
7619
+ declare const Mixed$5: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.IndexSignatureDeclaration>, ReadonlyMethods>, DocMethods>;
7523
7620
  declare class TypeIdxSigTsDsl extends Mixed$5 {
7524
7621
  readonly '~dsl' = "TypeIdxSigTsDsl";
7525
7622
  protected _key?: TypeIdxSigType;
@@ -7533,7 +7630,7 @@ declare class TypeIdxSigTsDsl extends Mixed$5 {
7533
7630
  key(type: TypeIdxSigType): this;
7534
7631
  /** Sets the property type. */
7535
7632
  type(type: TypeIdxSigType): this;
7536
- toAst(): ts.IndexSignatureDeclaration;
7633
+ toAst(ctx: AstContext): ts.IndexSignatureDeclaration;
7537
7634
  $validate(): asserts this is this & {
7538
7635
  _key: TypeIdxSigType;
7539
7636
  _name: TypeIdxSigName;
@@ -7545,7 +7642,7 @@ declare class TypeIdxSigTsDsl extends Mixed$5 {
7545
7642
  //#region src/ts-dsl/type/prop.d.ts
7546
7643
  type TypePropName = string;
7547
7644
  type TypePropType = Symbol | string | MaybeTsDsl<ts.TypeNode>;
7548
- declare const Mixed$4: MixinCtor<MixinCtor<MixinCtor<abstract new () => TypeTsDsl<ts.TypeElement>, ReadonlyMethods>, OptionalMethods>, DocMethods>;
7645
+ declare const Mixed$4: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.TypeElement>, ReadonlyMethods>, OptionalMethods>, DocMethods>;
7549
7646
  declare class TypePropTsDsl extends Mixed$4 {
7550
7647
  readonly '~dsl' = "TypePropTsDsl";
7551
7648
  protected name: TypePropName;
@@ -7554,11 +7651,11 @@ declare class TypePropTsDsl extends Mixed$4 {
7554
7651
  analyze(ctx: AnalysisContext): void;
7555
7652
  /** Sets the property type. */
7556
7653
  type(type: TypePropType): this;
7557
- toAst(): ts.PropertySignature;
7654
+ toAst(ctx: AstContext): ts.PropertySignature;
7558
7655
  }
7559
7656
  //#endregion
7560
7657
  //#region src/ts-dsl/type/object.d.ts
7561
- declare const Mixed$3: abstract new () => TypeTsDsl<ts.TypeNode>;
7658
+ declare const Mixed$3: abstract new () => TsDsl<ts.TypeNode>;
7562
7659
  declare class TypeObjectTsDsl extends Mixed$3 {
7563
7660
  readonly '~dsl' = "TypeObjectTsDsl";
7564
7661
  protected props: Array<TypePropTsDsl | TypeIdxSigTsDsl>;
@@ -7571,23 +7668,23 @@ declare class TypeObjectTsDsl extends Mixed$3 {
7571
7668
  get isEmpty(): boolean;
7572
7669
  /** Adds a property signature (returns property builder). */
7573
7670
  prop(name: string, fn: (p: TypePropTsDsl) => void): this;
7574
- toAst(): ts.TypeLiteralNode;
7671
+ toAst(ctx: AstContext): ts.TypeLiteralNode;
7575
7672
  }
7576
7673
  //#endregion
7577
7674
  //#region src/ts-dsl/type/or.d.ts
7578
7675
  type Type = Symbol | string | ts.TypeNode | TypeTsDsl;
7579
- declare const Mixed$2: abstract new () => TypeTsDsl<ts.UnionTypeNode>;
7676
+ declare const Mixed$2: abstract new () => TsDsl<ts.UnionTypeNode>;
7580
7677
  declare class TypeOrTsDsl extends Mixed$2 {
7581
7678
  readonly '~dsl' = "TypeOrTsDsl";
7582
7679
  protected _types: Array<Ref<Type>>;
7583
7680
  constructor(...nodes: Array<Type>);
7584
7681
  analyze(ctx: AnalysisContext): void;
7585
7682
  types(...nodes: Array<Type>): this;
7586
- toAst(): ts.UnionTypeNode;
7683
+ toAst(ctx: AstContext): ts.UnionTypeNode;
7587
7684
  }
7588
7685
  //#endregion
7589
7686
  //#region src/ts-dsl/type/template.d.ts
7590
- declare const Mixed$1: abstract new () => TypeTsDsl<ts.TemplateLiteralTypeNode>;
7687
+ declare const Mixed$1: abstract new () => TsDsl<ts.TemplateLiteralTypeNode>;
7591
7688
  declare class TypeTemplateTsDsl extends Mixed$1 {
7592
7689
  readonly '~dsl' = "TypeTemplateTsDsl";
7593
7690
  protected parts: Array<string | MaybeTsDsl<ts.TypeNode>>;
@@ -7595,18 +7692,18 @@ declare class TypeTemplateTsDsl extends Mixed$1 {
7595
7692
  analyze(ctx: AnalysisContext): void;
7596
7693
  /** Adds a raw string segment or embedded type expression. */
7597
7694
  add(part: string | MaybeTsDsl<ts.TypeNode>): this;
7598
- toAst(): ts.TemplateLiteralTypeNode;
7695
+ toAst(ctx: AstContext): ts.TemplateLiteralTypeNode;
7599
7696
  }
7600
7697
  //#endregion
7601
7698
  //#region src/ts-dsl/type/tuple.d.ts
7602
- declare const Mixed: abstract new () => TypeTsDsl<ts.TupleTypeNode>;
7699
+ declare const Mixed: abstract new () => TsDsl<ts.TupleTypeNode>;
7603
7700
  declare class TypeTupleTsDsl extends Mixed {
7604
7701
  readonly '~dsl' = "TypeTupleTsDsl";
7605
7702
  protected _elements: Array<string | ts.TypeNode | TypeTsDsl>;
7606
7703
  constructor(...nodes: Array<string | ts.TypeNode | TypeTsDsl>);
7607
7704
  analyze(ctx: AnalysisContext): void;
7608
7705
  elements(...types: Array<string | ts.TypeNode | TypeTsDsl>): this;
7609
- toAst(): ts.TupleTypeNode;
7706
+ toAst(ctx: AstContext): ts.TupleTypeNode;
7610
7707
  }
7611
7708
  //#endregion
7612
7709
  //#region src/ts-dsl/render/typescript.d.ts
@@ -7703,39 +7800,39 @@ declare const reserved: {
7703
7800
  };
7704
7801
  //#endregion
7705
7802
  //#region src/ts-dsl/index.d.ts
7706
- declare const $: ((id: any) => ExprTsDsl) & {
7803
+ declare const $: ((id: string | _hey_api_codegen_core0.Symbol | ts.Expression | TsDsl<ts.Expression>) => ExprTsDsl) & {
7707
7804
  /** Creates an array literal expression (e.g. `[1, 2, 3]`). */
7708
7805
  array: (...args: ConstructorParameters<typeof ArrayTsDsl>) => ArrayTsDsl;
7709
7806
  /** Creates an `as` type assertion expression (e.g. `value as Type`). */
7710
- as: (expr: any, type: any) => AsTsDsl;
7807
+ as: (expr: AsExpr, type: AsType) => AsTsDsl;
7711
7808
  /** Creates a property access expression (e.g. `obj.foo`). */
7712
- attr: (left: any, right: any) => AttrTsDsl;
7809
+ attr: (left: AttrLeft, right: AttrRight) => AttrTsDsl;
7713
7810
  /** Creates an await expression (e.g. `await promise`). */
7714
- await: (expr: any) => AwaitTsDsl;
7811
+ await: (expr: AwaitExpr) => AwaitTsDsl;
7715
7812
  /** Creates a binary expression (e.g. `a + b`). */
7716
- binary: (base: any, op?: (("!=" | "!==" | "&&" | "*" | "+" | "-" | "/" | "<" | "<=" | "=" | "==" | "===" | ">" | ">=" | "??" | "||") | typescript0.BinaryOperator) | undefined, expr?: any) => BinaryTsDsl;
7813
+ 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;
7717
7814
  /** Creates a statement block (`{ ... }`). */
7718
7815
  block: (...args: ConstructorParameters<typeof BlockTsDsl>) => BlockTsDsl;
7719
7816
  /** Creates a function or method call expression (e.g. `fn(arg)`). */
7720
- call: (callee: CallCallee, ...args: any[]) => CallTsDsl;
7817
+ call: (callee: CallCallee, ...args: (CallArg | undefined)[]) => CallTsDsl;
7721
7818
  /** Creates a class declaration or expression. */
7722
- class: (name: any) => ClassTsDsl;
7819
+ class: (name: string | _hey_api_codegen_core0.Symbol) => ClassTsDsl;
7723
7820
  /** Creates a constant variable declaration (`const`). */
7724
- const: (name?: any) => VarTsDsl;
7821
+ const: (name?: VarName | undefined) => VarTsDsl;
7725
7822
  /** Creates a decorator expression (e.g. `@decorator`). */
7726
- decorator: (name: any, ...args: (string | typescript0.Expression | TsDsl<typescript0.Expression>)[]) => DecoratorTsDsl;
7823
+ decorator: (name: DecoratorName, ...args: (string | ts.Expression | TsDsl<ts.Expression>)[]) => DecoratorTsDsl;
7727
7824
  /** Creates a JSDoc documentation block. */
7728
- doc: (lines?: MaybeArray$1<string> | undefined, fn?: ((d: DocTsDsl) => void) | undefined) => DocTsDsl;
7825
+ doc: (lines?: DocLines | undefined, fn?: DocFn | undefined) => DocTsDsl;
7729
7826
  /** Creates an enum declaration. */
7730
- enum: (name: any, fn?: ((e: EnumTsDsl) => void) | undefined) => EnumTsDsl;
7827
+ enum: (name: EnumName, fn?: ((e: EnumTsDsl) => void) | undefined) => EnumTsDsl;
7731
7828
  /** Creates a general expression node. */
7732
- expr: (id: any) => ExprTsDsl;
7829
+ expr: (id: string | _hey_api_codegen_core0.Symbol | ts.Expression | TsDsl<ts.Expression>) => ExprTsDsl;
7733
7830
  /** Creates a field declaration in a class or object. */
7734
- field: (name: string, fn?: ((f: FieldTsDsl) => void) | undefined) => FieldTsDsl;
7831
+ field: (name: FieldName, fn?: ((f: FieldTsDsl) => void) | undefined) => FieldTsDsl;
7735
7832
  /** Converts a runtime value into a corresponding expression node. */
7736
7833
  fromValue: (input: unknown, options?: {
7737
7834
  layout?: "pretty";
7738
- } | undefined) => TsDsl<typescript0.Expression>;
7835
+ } | undefined) => TsDsl<ts.Expression>;
7739
7836
  /** Creates a function expression or declaration. */
7740
7837
  func: {
7741
7838
  (): FuncTsDsl<"arrow">;
@@ -7747,39 +7844,41 @@ declare const $: ((id: any) => ExprTsDsl) & {
7747
7844
  /** Creates a getter method declaration. */
7748
7845
  getter: (name: GetterName, fn?: ((g: GetterTsDsl) => void) | undefined) => GetterTsDsl;
7749
7846
  /** Creates a single-line comment (//). */
7750
- hint: (lines?: MaybeArray$1<string> | undefined, fn?: ((d: HintTsDsl) => void) | undefined) => HintTsDsl;
7847
+ hint: (lines?: HintLines | undefined, fn?: HintFn | undefined) => HintTsDsl;
7751
7848
  /** Creates an identifier (e.g. `foo`). */
7752
7849
  id: (name: string) => IdTsDsl;
7753
7850
  /** Creates an if statement. */
7754
7851
  if: (condition?: IfCondition | undefined) => IfTsDsl;
7755
7852
  /** Creates an initialization block or statement. */
7756
7853
  init: (fn?: ((i: InitTsDsl) => void) | undefined) => InitTsDsl;
7854
+ /** Creates a lazy, context-aware node with deferred evaluation. */
7855
+ lazy: <T extends ts.Node>(thunk: LazyThunk<T>) => LazyTsDsl<T>;
7757
7856
  /** Creates a let variable declaration (`let`). */
7758
- let: (name?: any) => VarTsDsl;
7857
+ let: (name?: VarName | undefined) => VarTsDsl;
7759
7858
  /** Creates a literal value (e.g. string, number, boolean). */
7760
7859
  literal: (value: string | number | boolean | null) => LiteralTsDsl;
7761
7860
  /** Creates an enum member declaration. */
7762
- member: (name: string, value?: ((string | number | typescript0.Expression | TsDsl<typescript0.Expression>) | ((m: EnumMemberTsDsl) => void)) | undefined) => EnumMemberTsDsl;
7861
+ member: (name: string, value?: ((string | number | ts.Expression | TsDsl<ts.Expression>) | ((m: EnumMemberTsDsl) => void)) | undefined) => EnumMemberTsDsl;
7763
7862
  /** Creates a method declaration inside a class or object. */
7764
7863
  method: (name: string, fn?: ((m: MethodTsDsl) => void) | undefined) => MethodTsDsl;
7765
7864
  /** Creates a negation expression (`-x`). */
7766
- neg: (expr?: string | typescript0.Expression | TsDsl<typescript0.Expression> | undefined, op?: typescript0.PrefixUnaryOperator | undefined) => PrefixTsDsl;
7865
+ neg: (expr?: string | ts.Expression | TsDsl<ts.Expression> | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl;
7767
7866
  /** Creates a new expression (e.g. `new ClassName()`). */
7768
- new: (classExpr: any, ...args: any[]) => NewTsDsl;
7867
+ new: (classExpr: NewExpr, ...args: NewExpr[]) => NewTsDsl;
7769
7868
  /** Creates a newline (for formatting purposes). */
7770
7869
  newline: () => NewlineTsDsl;
7771
7870
  /** Creates a logical NOT expression (`!x`). */
7772
- not: (expr?: string | typescript0.Expression | TsDsl<typescript0.Expression> | undefined, op?: typescript0.PrefixUnaryOperator | undefined) => PrefixTsDsl;
7871
+ not: (expr?: string | ts.Expression | TsDsl<ts.Expression> | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl;
7773
7872
  /** Creates a block comment (/* ... *\/). */
7774
- note: (lines?: MaybeArray$1<string> | undefined, fn?: ((d: NoteTsDsl) => void) | undefined) => NoteTsDsl;
7873
+ note: (lines?: NoteLines | undefined, fn?: NoteFn | undefined) => NoteTsDsl;
7775
7874
  /** Creates an object literal expression. */
7776
7875
  object: (...args: ConstructorParameters<typeof ObjectTsDsl>) => ObjectTsDsl;
7777
7876
  /** Creates a parameter declaration for functions or methods. */
7778
- param: (name: any, fn?: ((p: ParamTsDsl) => void) | undefined) => ParamTsDsl;
7877
+ param: (name: ParamName | ((p: ParamTsDsl) => void), fn?: ((p: ParamTsDsl) => void) | undefined) => ParamTsDsl;
7779
7878
  /** Creates a pattern for destructuring or matching. */
7780
7879
  pattern: () => PatternTsDsl;
7781
7880
  /** Creates a prefix unary expression (e.g. `-x`, `!x`, `~x`). */
7782
- prefix: (expr?: string | typescript0.Expression | TsDsl<typescript0.Expression> | undefined, op?: typescript0.PrefixUnaryOperator | undefined) => PrefixTsDsl;
7881
+ prefix: (expr?: string | ts.Expression | TsDsl<ts.Expression> | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl;
7783
7882
  /** Creates an object literal property (e.g. `{ foo: bar }`). */
7784
7883
  prop: (meta: {
7785
7884
  kind: "computed";
@@ -7800,37 +7899,37 @@ declare const $: ((id: any) => ExprTsDsl) & {
7800
7899
  /** Creates a regular expression literal (e.g. `/foo/gi`). */
7801
7900
  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;
7802
7901
  /** Creates a return statement. */
7803
- return: (expr?: any) => ReturnTsDsl;
7902
+ return: (expr?: ReturnExpr | undefined) => ReturnTsDsl;
7804
7903
  /** Creates a setter method declaration. */
7805
7904
  setter: (name: SetterName, fn?: ((s: SetterTsDsl) => void) | undefined) => SetterTsDsl;
7806
7905
  /** Wraps an expression or statement-like value into a `StmtTsDsl`. */
7807
- stmt: (inner: typescript0.Expression | typescript0.Statement | TsDsl<any>) => StmtTsDsl;
7906
+ stmt: (inner: ts.Expression | ts.Statement | TsDsl<any>) => StmtTsDsl;
7808
7907
  /** Creates a template literal expression. */
7809
- template: (value?: any) => TemplateTsDsl;
7908
+ template: (value?: TemplatePart | undefined) => TemplateTsDsl;
7810
7909
  /** Creates a ternary conditional expression (if ? then : else). */
7811
- ternary: (condition?: string | typescript0.Expression | TsDsl<typescript0.Expression> | undefined) => TernaryTsDsl;
7910
+ ternary: (condition?: string | ts.Expression | TsDsl<ts.Expression> | undefined) => TernaryTsDsl;
7812
7911
  /** Creates a throw statement. */
7813
- throw: (error: string | typescript0.Expression | TsDsl<typescript0.Expression>, useNew?: boolean | undefined) => ThrowTsDsl;
7912
+ throw: (error: string | ts.Expression | TsDsl<ts.Expression>, useNew?: boolean | undefined) => ThrowTsDsl;
7814
7913
  /** Creates a syntax token (e.g. `?`, `readonly`, `+`, `-`). */
7815
7914
  token: () => TokenTsDsl<never>;
7816
7915
  /** Creates a try/catch/finally statement. */
7817
7916
  try: (...args: ConstructorParameters<typeof TryTsDsl>) => TryTsDsl;
7818
7917
  /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */
7819
- type: ((name: any, fn?: ((t: TypeExprTsDsl) => void) | undefined) => TypeExprTsDsl) & {
7918
+ type: ((name: TypeExprName, fn?: TypeExprFn | undefined) => TypeExprTsDsl) & {
7820
7919
  /** Creates a type alias declaration (e.g. `type Foo = Bar`). */
7821
- alias: (name: any, fn?: ((t: TypeAliasTsDsl) => void) | undefined) => TypeAliasTsDsl;
7920
+ alias: (name: string | _hey_api_codegen_core0.Symbol, fn?: ((t: TypeAliasTsDsl) => void) | undefined) => TypeAliasTsDsl;
7822
7921
  /** Creates an intersection type (e.g. `A & B`). */
7823
7922
  and: (...args: ConstructorParameters<typeof TypeAndTsDsl>) => TypeAndTsDsl;
7824
7923
  /** Creates a qualified type reference (e.g. Foo.Bar). */
7825
- attr: (right: any) => TypeAttrTsDsl;
7924
+ attr: (right: string | _hey_api_codegen_core0.Symbol | ts.Identifier) => TypeAttrTsDsl;
7826
7925
  /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */
7827
- expr: (name: any, fn?: ((t: TypeExprTsDsl) => void) | undefined) => TypeExprTsDsl;
7926
+ expr: (name: TypeExprName, fn?: TypeExprFn | undefined) => TypeExprTsDsl;
7828
7927
  /** Converts a runtime value into a corresponding type expression node. */
7829
- fromValue: (input: unknown) => TsDsl<typescript0.TypeNode>;
7928
+ fromValue: (input: unknown) => TsDsl<ts.TypeNode>;
7830
7929
  /** Creates a function type node (e.g. `(a: string) => number`). */
7831
7930
  func: (...args: ConstructorParameters<typeof TypeFuncTsDsl>) => TypeFuncTsDsl;
7832
7931
  /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
7833
- idx: (base: string | typescript0.TypeNode | TsDsl<typescript0.TypeNode>, index: string | number | typescript0.TypeNode | TsDsl<typescript0.TypeNode>) => TypeIdxTsDsl;
7932
+ idx: (base: string | ts.TypeNode | TsDsl<ts.TypeNode>, index: string | number | ts.TypeNode | TsDsl<ts.TypeNode>) => TypeIdxTsDsl;
7834
7933
  /** Creates a literal type node (e.g. 'foo', 42, or true). */
7835
7934
  literal: (value: string | number | boolean | null) => TypeLiteralTsDsl;
7836
7935
  /** Creates a mapped type (e.g. `{ [K in keyof T]: U }`). */
@@ -7842,18 +7941,18 @@ declare const $: ((id: any) => ExprTsDsl) & {
7842
7941
  /** Represents a union type (e.g. `A | B | C`). */
7843
7942
  or: (...args: ConstructorParameters<typeof TypeOrTsDsl>) => TypeOrTsDsl;
7844
7943
  /** Creates a type parameter (e.g. `<T>`). */
7845
- param: (name?: any, fn?: ((name: TypeParamTsDsl) => void) | undefined) => TypeParamTsDsl;
7944
+ param: (name?: TypeParamName | undefined, fn?: ((name: TypeParamTsDsl) => void) | undefined) => TypeParamTsDsl;
7846
7945
  /** Creates a type query node (e.g. `typeof Foo`). */
7847
- query: (expr: string | MaybeTsDsl<typescript0.Expression | TypeTsDsl<typescript0.TypeNode>>) => TypeQueryTsDsl;
7946
+ query: (expr: TypeQueryExpr) => TypeQueryTsDsl;
7848
7947
  /** Builds a TypeScript template literal *type* (e.g. `${Foo}-${Bar}` as a type). */
7849
- template: (value?: string | typescript0.TypeNode | TsDsl<typescript0.TypeNode> | undefined) => TypeTemplateTsDsl;
7948
+ template: (value?: string | ts.TypeNode | TsDsl<ts.TypeNode> | undefined) => TypeTemplateTsDsl;
7850
7949
  /** Creates a tuple type (e.g. [A, B, C]). */
7851
7950
  tuple: (...args: ConstructorParameters<typeof TypeTupleTsDsl>) => TypeTupleTsDsl;
7852
7951
  };
7853
- /** Creates a runtime `typeof` expression (e.g. typeof x). */
7854
- typeofExpr: (expr: string | typescript0.Expression | TsDsl<typescript0.Expression>) => TypeOfExprTsDsl;
7855
- /** Creates a variable declaration (var). */
7856
- var: (name?: any) => VarTsDsl;
7952
+ /** Creates a `typeof` expression (e.g. `typeof value`). */
7953
+ typeofExpr: (expr: TypeOfExpr) => TypeOfExprTsDsl;
7954
+ /** Creates a variable declaration (`var`). */
7955
+ var: (name?: VarName | undefined) => VarTsDsl;
7857
7956
  };
7858
7957
  type DollarTsDsl = {
7859
7958
  /**
@@ -7870,7 +7969,7 @@ type DollarTsDsl = {
7870
7969
  *
7871
7970
  * Returns:
7872
7971
  * - A new `ExprTsDsl` instance when called directly.
7873
- * - The `base` factory object for constructing more specific nodes.
7972
+ * - The `tsDsl` object for constructing more specific nodes.
7874
7973
  */
7875
7974
  $: typeof $;
7876
7975
  };
@@ -14136,8 +14235,6 @@ declare class PluginInstance<T extends Plugin.Types = Plugin.Types> {
14136
14235
  gen: IProject;
14137
14236
  name: string;
14138
14237
  });
14139
- addNode(node: Node | null): number;
14140
- updateNode(index: number, node: Node | null): void;
14141
14238
  /**
14142
14239
  * Iterates over various input elements as specified by the event types, in
14143
14240
  * a specific order: servers, schemas, parameters, request bodies, then
@@ -14188,6 +14285,14 @@ declare class PluginInstance<T extends Plugin.Types = Plugin.Types> {
14188
14285
  };
14189
14286
  };
14190
14287
  isSymbolRegistered(identifier: SymbolIdentifier): boolean;
14288
+ /**
14289
+ * Sets or adds a node to the project graph.
14290
+ *
14291
+ * @param node The node to be added or updated in the project graph.
14292
+ * @param index The index at which to update the node. If undefined, the node will be added.
14293
+ * @returns The index of the added node or void if updated.
14294
+ */
14295
+ node<T extends number | undefined = undefined>(node: Node | null, index?: T): T extends number ? void : number;
14191
14296
  querySymbol(filter: SymbolMeta): Symbol | undefined;
14192
14297
  referenceSymbol(meta: SymbolMeta): Symbol;
14193
14298
  /**
@@ -14766,8 +14871,8 @@ type UserOutput = {
14766
14871
  /**
14767
14872
  * If specified, this will be the file extension used when importing
14768
14873
  * other modules. By default, we don't add a file extension and let the
14769
- * runtime resolve it. If you're using moduleResolution `nodenext`, we
14770
- * default to `.js`.
14874
+ * runtime resolve it. If you're using moduleResolution `nodenext` or
14875
+ * `node16`, we default to `.js`.
14771
14876
  *
14772
14877
  * @default undefined
14773
14878
  */
@@ -14865,8 +14970,8 @@ type Output = {
14865
14970
  /**
14866
14971
  * If specified, this will be the file extension used when importing
14867
14972
  * other modules. By default, we don't add a file extension and let the
14868
- * runtime resolve it. If you're using moduleResolution `nodenext`, we
14869
- * default to `.js`.
14973
+ * runtime resolve it. If you're using moduleResolution `nodenext` or
14974
+ * `node16`, we default to `.js`.
14870
14975
  */
14871
14976
  importFileExtension: ImportFileExtensions | (string & {}) | null | undefined;
14872
14977
  /**
@@ -15553,4 +15658,4 @@ type Config = Omit<Required<UserConfig>, 'input' | 'logs' | 'output' | 'parser'
15553
15658
  };
15554
15659
  //#endregion
15555
15660
  export { LazyOrAsync as A, MaybeTsDsl as C, PluginHandler as D, Client as E, StringCase as O, 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, MaybeArray as j, IR$1 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 };
15556
- //# sourceMappingURL=config-CBa-XLy8.d.cts.map
15661
+ //# sourceMappingURL=config-CREHWzRd.d.cts.map