@hey-api/openapi-ts 0.94.4 → 0.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { n as UserConfig } from "./types-DAEl4_a4.mjs";
2
- import * as _hey_api_codegen_core0 from "@hey-api/codegen-core";
3
2
  import { AnalysisContext, BindingKind, ExportModule, File, FromRef, ImportModule, Language, Logger, Logger as Logger$1, Node, NodeName, NodeNameSanitizer, NodeRelationship, NodeScope, Ref, RenderContext, Renderer, Symbol } from "@hey-api/codegen-core";
4
- import { BaseOutput, Casing, Context, DefinePlugin, DefinePlugin as DefinePlugin$1, FeatureToggle, IR, IR as IR$1, LinguistLanguages, NameTransformer, NamingConfig, NamingOptions, NamingRule, OpenApi, OpenApiMetaObject, OpenApiOperationObject, OpenApiParameterObject, OpenApiRequestBodyObject, OpenApiResponseObject, OpenApiSchemaObject, OpenApiV2_0_XTypes, OpenApiV3_0_XTypes, OpenApiV3_1_XTypes, OperationPath, OperationPathStrategy, OperationStrategy, OperationsStrategy, Plugin, Plugin as Plugin$1, SchemaVisitorContext, SchemaWithType, Walker, defaultPaginationKeywords, definePluginConfig, utils } from "@hey-api/shared";
3
+ import { BaseOutput, Casing, Context, DefinePlugin, DefinePlugin as DefinePlugin$1, FeatureToggle, IR, IR as IR$1, NameTransformer, NamingConfig, NamingOptions, NamingRule, OpenApi, OpenApiMetaObject, OpenApiOperationObject, OpenApiParameterObject, OpenApiRequestBodyObject, OpenApiResponseObject, OpenApiSchemaObject, OperationPath, OperationPathStrategy, OperationStrategy, OperationsStrategy, Plugin, Plugin as Plugin$1, RequestSchemaContext, ResolvedRequestValidatorLayer, SchemaVisitorContext, SchemaWithType, Walker, defaultPaginationKeywords, definePluginConfig, utils } from "@hey-api/shared";
5
4
  import ts from "typescript";
6
5
  import { AnyString, LazyOrAsync, MaybeArray, MaybeFunc } from "@hey-api/types";
7
6
  import { HttpClient, HttpErrorResponse, HttpHeaders, HttpRequest, HttpResponse } from "@angular/common/http";
@@ -11,6 +10,7 @@ import { AsyncDataOptions, UseFetchOptions, useAsyncData, useFetch, useLazyAsync
11
10
  import { Ref as Ref$1 } from "vue";
12
11
  import { FetchOptions, ResponseType, ofetch } from "ofetch";
13
12
  import ky, { Options } from "ky";
13
+ import { LinguistLanguages, OpenAPIV2, OpenAPIV3, OpenAPIV3_1 } from "@hey-api/spec-types";
14
14
 
15
15
  //#region src/plugins/@angular/common/httpRequests/types.d.ts
16
16
  interface UserHttpRequestsConfig {
@@ -409,15 +409,271 @@ type Arg$1 = NodeName | MaybeTsDsl<TypeTsDsl>;
409
409
  interface TypeArgsMethods extends Node {
410
410
  /** Returns the type arguments as an array of ts.TypeNode nodes. */
411
411
  $generics(): ReadonlyArray<ts.TypeNode> | undefined;
412
- /** Adds a single type argument (e.g. `string` in `Foo<string>`). */
412
+ /** Adds a single type argument (e.g., `string` in `Foo<string>`). */
413
413
  generic(arg: Arg$1): this;
414
- /** Adds type arguments (e.g. `Map<string, number>`). */
414
+ /** Adds type arguments (e.g., `Map<string, number>`). */
415
415
  generics(...args: ReadonlyArray<Arg$1>): this;
416
416
  }
417
417
  //#endregion
418
+ //#region src/ts-dsl/mixins/type-returns.d.ts
419
+ interface TypeReturnsMethods extends Node {
420
+ /** Returns the return type node. */
421
+ $returns(): ts.TypeNode | undefined;
422
+ /** Sets the return type. */
423
+ returns(type: NodeName | TypeTsDsl): this;
424
+ }
425
+ //#endregion
426
+ //#region src/ts-dsl/type/param.d.ts
427
+ type TypeParamExpr = NodeName | boolean | MaybeTsDsl<TypeTsDsl>;
428
+ declare const Mixed$56: abstract new () => TsDsl<ts.TypeParameterDeclaration>;
429
+ declare class TypeParamTsDsl extends Mixed$56 {
430
+ readonly '~dsl' = "TypeParamTsDsl";
431
+ scope: NodeScope;
432
+ protected constraint?: Ref<TypeParamExpr>;
433
+ protected defaultValue?: Ref<TypeParamExpr>;
434
+ constructor(name?: NodeName, fn?: (name: TypeParamTsDsl) => void);
435
+ analyze(ctx: AnalysisContext): void;
436
+ /** Sets the parameter default value. */
437
+ default(value: TypeParamExpr): this;
438
+ extends(constraint: TypeParamExpr): this;
439
+ toAst(): ts.TypeParameterDeclaration;
440
+ }
441
+ //#endregion
442
+ //#region src/ts-dsl/mixins/type-params.d.ts
443
+ interface TypeParamsMethods extends Node {
444
+ /** Returns the type parameters as an array of ts.TypeParameterDeclaration nodes. */
445
+ $generics(): ReadonlyArray<ts.TypeParameterDeclaration> | undefined;
446
+ /** Adds a single type parameter (e.g., `T` in `Array<T>`). */
447
+ generic(...args: ConstructorParameters<typeof TypeParamTsDsl>): this;
448
+ /** Adds type parameters (e.g., `Map<string, T>`). */
449
+ generics(...args: ReadonlyArray<NodeName | MaybeTsDsl<TypeParamTsDsl>>): this;
450
+ }
451
+ //#endregion
452
+ //#region src/ts-dsl/mixins/modifiers.d.ts
453
+ type Modifiers = {
454
+ /**
455
+ * Checks if the specified modifier is present.
456
+ *
457
+ * @param modifier - The modifier to check.
458
+ * @returns True if the modifier is present, false otherwise.
459
+ */
460
+ hasModifier(modifier: Modifier): boolean;
461
+ modifiers: Array<ts.Modifier>;
462
+ };
463
+ type Modifier = 'abstract' | 'async' | 'const' | 'declare' | 'default' | 'export' | 'override' | 'private' | 'protected' | 'public' | 'readonly' | 'static';
464
+ interface AbstractMethods extends Modifiers {
465
+ /**
466
+ * Adds the `abstract` keyword modifier if the condition is true.
467
+ *
468
+ * @param condition - Whether to add the modifier (default: true).
469
+ * @returns The target object for chaining.
470
+ */
471
+ abstract(condition?: boolean): this;
472
+ }
473
+ interface AsyncMethods extends Modifiers {
474
+ /**
475
+ * Adds the `async` keyword modifier if the condition is true.
476
+ *
477
+ * @param condition - Whether to add the modifier (default: true).
478
+ * @returns The target object for chaining.
479
+ */
480
+ async(condition?: boolean): this;
481
+ }
482
+ interface ConstMethods extends Modifiers {
483
+ /**
484
+ * Adds the `const` keyword modifier if the condition is true.
485
+ *
486
+ * @param condition - Whether to add the modifier (default: true).
487
+ * @returns The target object for chaining.
488
+ */
489
+ const(condition?: boolean): this;
490
+ }
491
+ interface DefaultMethods extends Modifiers {
492
+ /**
493
+ * Adds the `default` keyword modifier if the condition is true.
494
+ *
495
+ * @param condition - Whether to add the modifier (default: true).
496
+ * @returns The target object for chaining.
497
+ */
498
+ default(condition?: boolean): this;
499
+ }
500
+ interface ExportMethods extends Modifiers {
501
+ /**
502
+ * Adds the `export` keyword modifier if the condition is true.
503
+ *
504
+ * @param condition - Whether to add the modifier (default: true).
505
+ * @returns The target object for chaining.
506
+ */
507
+ export(condition?: boolean): this;
508
+ }
509
+ interface PrivateMethods extends Modifiers {
510
+ /**
511
+ * Adds the `private` keyword modifier if the condition is true.
512
+ *
513
+ * @param condition - Whether to add the modifier (default: true).
514
+ * @returns The target object for chaining.
515
+ */
516
+ private(condition?: boolean): this;
517
+ }
518
+ interface ProtectedMethods extends Modifiers {
519
+ /**
520
+ * Adds the `protected` keyword modifier if the condition is true.
521
+ *
522
+ * @param condition - Whether to add the modifier (default: true).
523
+ * @returns The target object for chaining.
524
+ */
525
+ protected(condition?: boolean): this;
526
+ }
527
+ interface PublicMethods extends Modifiers {
528
+ /**
529
+ * Adds the `public` keyword modifier if the condition is true.
530
+ *
531
+ * @param condition - Whether to add the modifier (default: true).
532
+ * @returns The target object for chaining.
533
+ */
534
+ public(condition?: boolean): this;
535
+ }
536
+ interface ReadonlyMethods extends Modifiers {
537
+ /**
538
+ * Adds the `readonly` keyword modifier if the condition is true.
539
+ *
540
+ * @param condition - Whether to add the modifier (default: true).
541
+ * @returns The target object for chaining.
542
+ */
543
+ readonly(condition?: boolean): this;
544
+ }
545
+ interface StaticMethods extends Modifiers {
546
+ /**
547
+ * Adds the `static` keyword modifier if the condition is true.
548
+ *
549
+ * @param condition - Whether to add the modifier (default: true).
550
+ * @returns The target object for chaining.
551
+ */
552
+ static(condition?: boolean): this;
553
+ }
554
+ //#endregion
555
+ //#region src/ts-dsl/mixins/value.d.ts
556
+ type ValueExpr = string | MaybeTsDsl<ts.Expression>;
557
+ interface ValueMethods extends Node {
558
+ $value(): ts.Expression | undefined;
559
+ /** Sets the initializer expression (e.g., `= expr`). */
560
+ assign(expr: ValueExpr): this;
561
+ }
562
+ //#endregion
563
+ //#region src/ts-dsl/mixins/pattern.d.ts
564
+ interface PatternMethods extends Node {
565
+ /** Renders the pattern into a `BindingName`. */
566
+ $pattern(): ts.BindingName | undefined;
567
+ /** Defines an array binding pattern. */
568
+ array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
569
+ /** Defines an object binding pattern. */
570
+ object(...props: ReadonlyArray<MaybeArray<string> | Record<string, string>>): this;
571
+ /** Adds a spread element (e.g., `...args`, `...options`) to the pattern. */
572
+ spread(name: string): this;
573
+ }
574
+ //#endregion
575
+ //#region src/ts-dsl/mixins/optional.d.ts
576
+ interface OptionalMethods extends Node {
577
+ _optional?: boolean;
578
+ /** Marks the node as optional when the condition is true. */
579
+ optional(condition?: boolean): this;
580
+ /** Marks the node as required when the condition is true. */
581
+ required(condition?: boolean): this;
582
+ }
583
+ //#endregion
584
+ //#region src/ts-dsl/mixins/decorator.d.ts
585
+ interface DecoratorMethods extends Node {
586
+ /** Renders the decorators into an array of `ts.Decorator`s. */
587
+ $decorators(): ReadonlyArray<ts.Decorator>;
588
+ /** Adds a decorator (e.g., `@sealed({ in: 'root' })`). */
589
+ decorator(name: NodeName | MaybeTsDsl<ts.Expression>, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>): this;
590
+ }
591
+ //#endregion
592
+ //#region src/ts-dsl/decl/param.d.ts
593
+ type ParamName = NodeName | ParamFn;
594
+ type ParamFn = (p: ParamTsDsl) => void;
595
+ type ParamCtor = (name: ParamName, fn?: ParamFn) => ParamTsDsl;
596
+ declare const Mixed$55: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ParameterDeclaration>, ValueMethods>, PatternMethods>, OptionalMethods>, DecoratorMethods>;
597
+ declare class ParamTsDsl extends Mixed$55 {
598
+ readonly '~dsl' = "ParamTsDsl";
599
+ protected _type?: TypeTsDsl;
600
+ constructor(name: ParamName, fn?: ParamFn);
601
+ analyze(ctx: AnalysisContext): void;
602
+ /** Returns true when all required builder calls are present. */
603
+ get isValid(): boolean;
604
+ /** Sets the parameter type. */
605
+ type(node: NodeName | TypeTsDsl): this;
606
+ toAst(): ts.ParameterDeclaration;
607
+ $validate(): asserts this;
608
+ private missingRequiredCalls;
609
+ }
610
+ //#endregion
611
+ //#region src/ts-dsl/mixins/param.d.ts
612
+ interface ParamMethods extends Node {
613
+ /** Renders the parameters into an array of `ParameterDeclaration`s. */
614
+ $params(): ReadonlyArray<ts.ParameterDeclaration>;
615
+ /** Adds a parameter. */
616
+ param(...args: Parameters<ParamCtor>): this;
617
+ /** Adds multiple parameters. */
618
+ params(...params: ReadonlyArray<MaybeTsDsl<ts.ParameterDeclaration>>): this;
619
+ }
620
+ //#endregion
621
+ //#region src/ts-dsl/layout/doc.d.ts
622
+ type DocMaybeLazy<T> = ((ctx: TsDslContext) => T) | T;
623
+ type DocFn = (d: DocTsDsl) => void;
624
+ type DocLines = DocMaybeLazy<MaybeArray<string>>;
625
+ declare class DocTsDsl extends TsDsl<ts.Node> {
626
+ readonly '~dsl' = "DocTsDsl";
627
+ protected _lines: Array<DocLines>;
628
+ constructor(lines?: DocLines, fn?: DocFn);
629
+ analyze(ctx: AnalysisContext): void;
630
+ add(lines: DocLines): this;
631
+ apply<T extends ts.Node>(node: T): T;
632
+ toAst(): ts.Identifier;
633
+ }
634
+ //#endregion
635
+ //#region src/ts-dsl/mixins/doc.d.ts
636
+ interface DocMethods extends Node {
637
+ $docs<T extends ts.Node>(node: T): T;
638
+ doc(lines?: DocLines, fn?: DocFn): this;
639
+ }
640
+ //#endregion
641
+ //#region src/ts-dsl/mixins/do.d.ts
642
+ type DoExpr = MaybeTsDsl<ts.Expression | ts.Statement>;
643
+ interface DoMethods extends Node {
644
+ /** Renders the collected `.do()` calls into an array of `Statement` nodes. */
645
+ $do(): ReadonlyArray<ts.Statement>;
646
+ _do: Array<DoExpr>;
647
+ /** Adds one or more expressions/statements to the body. */
648
+ do(...items: ReadonlyArray<DoExpr>): this;
649
+ }
650
+ //#endregion
651
+ //#region src/ts-dsl/decl/method.d.ts
652
+ type MethodCtor = (name: NodeName, fn?: (m: MethodTsDsl) => void) => MethodTsDsl;
653
+ declare const Mixed$54: 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>;
654
+ declare class MethodTsDsl extends Mixed$54 {
655
+ readonly '~dsl' = "MethodTsDsl";
656
+ readonly nameSanitizer: (name: string) => string;
657
+ constructor(name: NodeName, fn?: (m: MethodTsDsl) => void);
658
+ analyze(ctx: AnalysisContext): void;
659
+ toAst(): ts.MethodDeclaration;
660
+ }
661
+ //#endregion
662
+ //#region src/ts-dsl/mixins/expr.d.ts
663
+ interface ExprMethods extends Node {
664
+ /** Accesses a property on the current expression (e.g., `this.foo`). */
665
+ attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr>;
666
+ /** Awaits the current expression (e.g., `await expr`). */
667
+ await(): ReturnType<typeof f.await>;
668
+ /** Calls the current expression (e.g., `fn(arg1, arg2)`). */
669
+ call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call>;
670
+ /** Produces a `return` statement returning the current expression. */
671
+ return(): ReturnType<typeof f.return>;
672
+ }
673
+ //#endregion
418
674
  //#region src/ts-dsl/mixins/as.d.ts
419
675
  interface AsMethods extends Node {
420
- /** Creates an `as` type assertion expression (e.g. `value as Type`). */
676
+ /** Creates an `as` type assertion expression (e.g., `value as Type`). */
421
677
  as(...args: DropFirst<Parameters<typeof f.as>>): ReturnType<typeof f.as>;
422
678
  }
423
679
  //#endregion
@@ -425,8 +681,8 @@ interface AsMethods extends Node {
425
681
  type AsExpr = NodeName | MaybeTsDsl<ts.Expression>;
426
682
  type AsType = NodeName | TypeTsDsl;
427
683
  type AsCtor = (expr: AsExpr, type: AsType) => AsTsDsl;
428
- declare const Mixed$52: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.AsExpression>, ExprMethods>, AsMethods>;
429
- declare class AsTsDsl extends Mixed$52 {
684
+ declare const Mixed$53: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.AsExpression>, ExprMethods>, AsMethods>;
685
+ declare class AsTsDsl extends Mixed$53 {
430
686
  readonly '~dsl' = "AsTsDsl";
431
687
  protected expr: Ref<AsExpr>;
432
688
  protected type: Ref<AsType>;
@@ -435,66 +691,57 @@ declare class AsTsDsl extends Mixed$52 {
435
691
  toAst(): ts.AsExpression;
436
692
  }
437
693
  //#endregion
438
- //#region src/ts-dsl/mixins/optional.d.ts
439
- interface OptionalMethods extends Node {
440
- _optional?: boolean;
441
- /** Marks the node as optional when the condition is true. */
442
- optional(condition?: boolean): this;
443
- /** Marks the node as required when the condition is true. */
444
- required(condition?: boolean): this;
445
- }
446
- //#endregion
447
694
  //#region src/ts-dsl/expr/binary.d.ts
448
- type Expr$3 = NodeName | MaybeTsDsl<ts.Expression>;
695
+ type Expr$2 = NodeName | MaybeTsDsl<ts.Expression>;
449
696
  type Op$1 = Operator | ts.BinaryOperator;
450
697
  type Operator = '!=' | '!==' | '&&' | '*' | '+' | '-' | '/' | '<' | '<=' | '=' | '==' | '===' | '>' | '>=' | '??' | '??=' | '||';
451
- declare const Mixed$51: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.BinaryExpression>, ExprMethods>, AsMethods>;
452
- declare class BinaryTsDsl extends Mixed$51 {
698
+ declare const Mixed$52: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.BinaryExpression>, ExprMethods>, AsMethods>;
699
+ declare class BinaryTsDsl extends Mixed$52 {
453
700
  readonly '~dsl' = "BinaryTsDsl";
454
- protected _base: Ref<Expr$3>;
455
- protected _expr?: Ref<Expr$3>;
701
+ protected _base: Ref<Expr$2>;
702
+ protected _expr?: Ref<Expr$2>;
456
703
  protected _op?: Op$1;
457
- constructor(base: Expr$3, op?: Op$1, expr?: Expr$3);
704
+ constructor(base: Expr$2, op?: Op$1, expr?: Expr$2);
458
705
  analyze(ctx: AnalysisContext): void;
459
706
  /** Returns true when all required builder calls are present. */
460
707
  get isValid(): boolean;
461
708
  /** Logical AND — `this && expr` */
462
- and(expr: Expr$3): this;
463
- /** Creates an assignment expression (e.g. `this = expr`). */
464
- assign(expr: Expr$3): this;
709
+ and(expr: Expr$2): this;
710
+ /** Creates an assignment expression (e.g., `this = expr`). */
711
+ assign(expr: Expr$2): this;
465
712
  /** Nullish coalescing — `this ?? expr` */
466
- coalesce(expr: Expr$3): this;
713
+ coalesce(expr: Expr$2): this;
467
714
  /** Division — `this / expr` */
468
- div(expr: Expr$3): this;
715
+ div(expr: Expr$2): this;
469
716
  /** Strict equality — `this === expr` */
470
- eq(expr: Expr$3): this;
717
+ eq(expr: Expr$2): this;
471
718
  /** Greater than — `this > expr` */
472
- gt(expr: Expr$3): this;
719
+ gt(expr: Expr$2): this;
473
720
  /** Greater than or equal — `this >= expr` */
474
- gte(expr: Expr$3): this;
721
+ gte(expr: Expr$2): this;
475
722
  /** Loose equality — `this == expr` */
476
- looseEq(expr: Expr$3): this;
723
+ looseEq(expr: Expr$2): this;
477
724
  /** Loose inequality — `this != expr` */
478
- looseNeq(expr: Expr$3): this;
725
+ looseNeq(expr: Expr$2): this;
479
726
  /** Less than — `this < expr` */
480
- lt(expr: Expr$3): this;
727
+ lt(expr: Expr$2): this;
481
728
  /** Less than or equal — `this <= expr` */
482
- lte(expr: Expr$3): this;
729
+ lte(expr: Expr$2): this;
483
730
  /** Subtraction — `this - expr` */
484
- minus(expr: Expr$3): this;
731
+ minus(expr: Expr$2): this;
485
732
  /** Strict inequality — `this !== expr` */
486
- neq(expr: Expr$3): this;
733
+ neq(expr: Expr$2): this;
487
734
  /** Nullish assignment — `this ??= expr` */
488
- nullishAssign(expr: Expr$3): this;
735
+ nullishAssign(expr: Expr$2): this;
489
736
  /** Logical OR — `this || expr` */
490
- or(expr: Expr$3): this;
737
+ or(expr: Expr$2): this;
491
738
  /** Addition — `this + expr` */
492
- plus(expr: Expr$3): this;
739
+ plus(expr: Expr$2): this;
493
740
  /** Multiplication — `this * expr` */
494
- times(expr: Expr$3): this;
741
+ times(expr: Expr$2): this;
495
742
  toAst(): ts.BinaryExpression;
496
743
  $validate(): asserts this is this & {
497
- _expr: Ref<Expr$3>;
744
+ _expr: Ref<Expr$2>;
498
745
  _op: Op$1;
499
746
  };
500
747
  private missingRequiredCalls;
@@ -504,61 +751,64 @@ declare class BinaryTsDsl extends Mixed$51 {
504
751
  }
505
752
  //#endregion
506
753
  //#region src/ts-dsl/mixins/operator.d.ts
507
- type Expr$2 = NodeName | MaybeTsDsl<ts.Expression>;
754
+ type Expr$1 = NodeName | MaybeTsDsl<ts.Expression>;
508
755
  interface OperatorMethods extends Node {
509
756
  /** Logical AND — `this && expr` */
510
- and(expr: Expr$2): BinaryTsDsl;
511
- /** Creates an assignment expression (e.g. `this = expr`). */
512
- assign(expr: Expr$2): BinaryTsDsl;
757
+ and(expr: Expr$1): BinaryTsDsl;
758
+ /** Creates an assignment expression (e.g., `this = expr`). */
759
+ assign(expr: Expr$1): BinaryTsDsl;
513
760
  /** Nullish coalescing — `this ?? expr` */
514
- coalesce(expr: Expr$2): BinaryTsDsl;
761
+ coalesce(expr: Expr$1): BinaryTsDsl;
515
762
  /** Division — `this / expr` */
516
- div(expr: Expr$2): BinaryTsDsl;
763
+ div(expr: Expr$1): BinaryTsDsl;
517
764
  /** Strict equality — `this === expr` */
518
- eq(expr: Expr$2): BinaryTsDsl;
765
+ eq(expr: Expr$1): BinaryTsDsl;
519
766
  /** Greater than — `this > expr` */
520
- gt(expr: Expr$2): BinaryTsDsl;
767
+ gt(expr: Expr$1): BinaryTsDsl;
521
768
  /** Greater than or equal — `this >= expr` */
522
- gte(expr: Expr$2): BinaryTsDsl;
769
+ gte(expr: Expr$1): BinaryTsDsl;
523
770
  /** Loose equality — `this == expr` */
524
- looseEq(expr: Expr$2): BinaryTsDsl;
771
+ looseEq(expr: Expr$1): BinaryTsDsl;
525
772
  /** Loose inequality — `this != expr` */
526
- looseNeq(expr: Expr$2): BinaryTsDsl;
773
+ looseNeq(expr: Expr$1): BinaryTsDsl;
527
774
  /** Less than — `this < expr` */
528
- lt(expr: Expr$2): BinaryTsDsl;
775
+ lt(expr: Expr$1): BinaryTsDsl;
529
776
  /** Less than or equal — `this <= expr` */
530
- lte(expr: Expr$2): BinaryTsDsl;
777
+ lte(expr: Expr$1): BinaryTsDsl;
531
778
  /** Subtraction — `this - expr` */
532
- minus(expr: Expr$2): BinaryTsDsl;
779
+ minus(expr: Expr$1): BinaryTsDsl;
533
780
  /** Strict inequality — `this !== expr` */
534
- neq(expr: Expr$2): BinaryTsDsl;
781
+ neq(expr: Expr$1): BinaryTsDsl;
535
782
  /** Nullish assignment — `this ??= expr` */
536
- nullishAssign(expr: Expr$2): BinaryTsDsl;
783
+ nullishAssign(expr: Expr$1): BinaryTsDsl;
537
784
  /** Logical OR — `this || expr` */
538
- or(expr: Expr$2): BinaryTsDsl;
785
+ or(expr: Expr$1): BinaryTsDsl;
539
786
  /** Addition — `this + expr` */
540
- plus(expr: Expr$2): BinaryTsDsl;
787
+ plus(expr: Expr$1): BinaryTsDsl;
541
788
  /** Multiplication — `this * expr` */
542
- times(expr: Expr$2): BinaryTsDsl;
789
+ times(expr: Expr$1): BinaryTsDsl;
543
790
  }
544
791
  //#endregion
545
792
  //#region src/ts-dsl/expr/attr.d.ts
546
793
  type AttrLeft = NodeName | MaybeTsDsl<ts.Expression>;
547
794
  type AttrCtor = (left: AttrLeft, right: NodeName) => AttrTsDsl;
548
- declare const Mixed$50: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyAccessExpression | ts.ElementAccessExpression>, OptionalMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
549
- declare class AttrTsDsl extends Mixed$50 {
795
+ declare const Mixed$51: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyAccessExpression | ts.ElementAccessExpression>, SpreadMethods>, OptionalMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
796
+ declare class AttrTsDsl extends Mixed$51 {
550
797
  readonly '~dsl' = "AttrTsDsl";
551
- protected left: Ref<AttrLeft>;
798
+ protected _computed: boolean;
799
+ protected _left: Ref<AttrLeft>;
552
800
  constructor(left: AttrLeft, right: NodeName);
553
801
  analyze(ctx: AnalysisContext): void;
802
+ /** Use computed property access (e.g., `obj[expr]`)? */
803
+ computed(condition?: boolean): this;
554
804
  toAst(): ts.PropertyAccessExpression | ts.ElementAccessExpression;
555
805
  }
556
806
  //#endregion
557
807
  //#region src/ts-dsl/expr/await.d.ts
558
808
  type AwaitExpr = NodeName | MaybeTsDsl<ts.Expression>;
559
809
  type AwaitCtor = (expr: AwaitExpr) => AwaitTsDsl;
560
- declare const Mixed$49: MixinCtor<abstract new () => TsDsl<ts.AwaitExpression>, ExprMethods>;
561
- declare class AwaitTsDsl extends Mixed$49 {
810
+ declare const Mixed$50: MixinCtor<abstract new () => TsDsl<ts.AwaitExpression>, ExprMethods>;
811
+ declare class AwaitTsDsl extends Mixed$50 {
562
812
  readonly '~dsl' = "AwaitTsDsl";
563
813
  protected _awaitExpr: Ref<AwaitExpr>;
564
814
  constructor(expr: AwaitExpr);
@@ -567,10 +817,10 @@ declare class AwaitTsDsl extends Mixed$49 {
567
817
  }
568
818
  //#endregion
569
819
  //#region src/ts-dsl/mixins/args.d.ts
570
- type Arg = NodeName | MaybeTsDsl<ts.Expression>;
820
+ type Arg = NodeName | MaybeTsDsl<ts.Expression | ts.SpreadElement>;
571
821
  interface ArgsMethods extends Node {
572
- /** Renders the arguments into an array of `Expression`s. */
573
- $args(): ReadonlyArray<ts.Expression>;
822
+ /** Renders the arguments into an array of `Expression`s or `SpreadElement`s. */
823
+ $args(): ReadonlyArray<ts.Expression | ts.SpreadElement>;
574
824
  /** Adds a single expression argument. */
575
825
  arg(arg: Arg | undefined): this;
576
826
  /** Adds one or more expression arguments. */
@@ -581,8 +831,8 @@ interface ArgsMethods extends Node {
581
831
  type NewArgs = ReadonlyArray<NewExpr | undefined>;
582
832
  type NewExpr = NodeName | MaybeTsDsl<ts.Expression>;
583
833
  type NewCtor = (expr: NewExpr, ...args: NewArgs) => NewTsDsl;
584
- declare const Mixed$48: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.NewExpression>, TypeArgsMethods>, ExprMethods>, AsMethods>, ArgsMethods>;
585
- declare class NewTsDsl extends Mixed$48 {
834
+ declare const Mixed$49: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.NewExpression>, TypeArgsMethods>, SpreadMethods>, ExprMethods>, AsMethods>, ArgsMethods>;
835
+ declare class NewTsDsl extends Mixed$49 {
586
836
  readonly '~dsl' = "NewTsDsl";
587
837
  protected _newExpr: Ref<NewExpr>;
588
838
  constructor(expr: NewExpr, ...args: NewArgs);
@@ -590,8 +840,20 @@ declare class NewTsDsl extends Mixed$48 {
590
840
  toAst(): ts.NewExpression;
591
841
  }
592
842
  //#endregion
843
+ //#region src/ts-dsl/expr/spread.d.ts
844
+ type SpreadExpr = NodeName | MaybeTsDsl<ts.Expression>;
845
+ type SpreadCtor = (expr: SpreadExpr) => SpreadTsDsl;
846
+ declare const Mixed$48: abstract new () => TsDsl<ts.SpreadElement>;
847
+ declare class SpreadTsDsl extends Mixed$48 {
848
+ readonly '~dsl' = "SpreadTsDsl";
849
+ protected _expr: Ref<SpreadExpr>;
850
+ constructor(expr: SpreadExpr);
851
+ analyze(ctx: AnalysisContext): void;
852
+ toAst(): ts.SpreadElement;
853
+ }
854
+ //#endregion
593
855
  //#region src/ts-dsl/expr/typeof.d.ts
594
- type TypeOfExpr = string | MaybeTsDsl<ts.Expression>;
856
+ type TypeOfExpr = NodeName | MaybeTsDsl<ts.Expression>;
595
857
  type TypeOfExprCtor = (expr: TypeOfExpr) => TypeOfExprTsDsl;
596
858
  declare const Mixed$47: MixinCtor<abstract new () => TsDsl<ts.TypeOfExpression>, OperatorMethods>;
597
859
  declare class TypeOfExprTsDsl extends Mixed$47 {
@@ -616,7 +878,7 @@ declare class ReturnTsDsl extends Mixed$46 {
616
878
  //#endregion
617
879
  //#region src/ts-dsl/mixins/type-expr.d.ts
618
880
  interface TypeExprMethods extends Node {
619
- /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
881
+ /** Creates an indexed-access type (e.g., `Foo<T>[K]`). */
620
882
  idx(this: Parameters<typeof f.type.idx>[0], ...args: DropFirst<Parameters<typeof f.type.idx>>): ReturnType<typeof f.type.idx>;
621
883
  /** Shorthand: builds `keyof T`. */
622
884
  keyof(this: MaybeTsDsl<TypeTsDsl>): ReturnType<typeof f.type.operator>;
@@ -672,7 +934,7 @@ declare class TypeExprTsDsl extends Mixed$44 {
672
934
  analyze(ctx: AnalysisContext): void;
673
935
  /** Returns true when all required builder calls are present. */
674
936
  get isValid(): boolean;
675
- /** Accesses a nested type (e.g. `Foo.Bar`). */
937
+ /** Accesses a nested type (e.g., `Foo.Bar`). */
676
938
  attr(right: string | ts.Identifier | TypeAttrTsDsl): this;
677
939
  toAst(): ts.TypeReferenceNode;
678
940
  $validate(): asserts this is this & {
@@ -760,6 +1022,23 @@ declare class TypeQueryTsDsl extends Mixed$41 {
760
1022
  toAst(): ts.TypeQueryNode;
761
1023
  }
762
1024
  //#endregion
1025
+ //#region src/ts-dsl/type/tuple-member.d.ts
1026
+ type TypeTupleMemberCtor = (name: NodeName) => TypeTupleMemberTsDsl;
1027
+ declare const Mixed$40: MixinCtor<abstract new () => TsDsl<ts.NamedTupleMember>, OptionalMethods>;
1028
+ declare class TypeTupleMemberTsDsl extends Mixed$40 {
1029
+ readonly '~dsl' = "TypeTupleMemberTsDsl";
1030
+ scope: NodeScope;
1031
+ protected _type?: Ref<NodeName | TypeTsDsl>;
1032
+ constructor(name: NodeName);
1033
+ analyze(ctx: AnalysisContext): void;
1034
+ /** Returns true when all required builder calls are present. */
1035
+ get isValid(): boolean;
1036
+ type(node: NodeName | TypeTsDsl): this;
1037
+ toAst(): ts.NamedTupleMember;
1038
+ $validate(): asserts this;
1039
+ private missingRequiredCalls;
1040
+ }
1041
+ //#endregion
763
1042
  //#region src/ts-dsl/utils/factories.d.ts
764
1043
  type Ctor = (...args: Array<any>) => any;
765
1044
  type Factory<T extends Ctor> = {
@@ -767,39 +1046,36 @@ type Factory<T extends Ctor> = {
767
1046
  set(fn: T): void;
768
1047
  };
769
1048
  declare const f: {
770
- /** Factory for creating `as` type assertion expressions (e.g. `value as Type`). */as: Factory<AsCtor>; /** Factory for creating property access expressions (e.g. `obj.foo`). */
771
- attr: Factory<AttrCtor>; /** Factory for creating await expressions (e.g. `await promise`). */
772
- await: Factory<AwaitCtor>; /** Factory for creating function or method call expressions (e.g. `fn(arg)`). */
773
- call: Factory<CallCtor>; /** Factory for creating new expressions (e.g. `new ClassName()`). */
1049
+ /** Factory for creating `as` type assertion expressions (e.g., `value as Type`). */as: Factory<AsCtor>; /** Factory for creating property access expressions (e.g., `obj.foo`). */
1050
+ attr: Factory<AttrCtor>; /** Factory for creating await expressions (e.g., `await promise`). */
1051
+ await: Factory<AwaitCtor>; /** Factory for creating function or method call expressions (e.g., `fn(arg)`). */
1052
+ call: Factory<CallCtor>; /** Factory for creating method declarations (e.g., `{ foo() { ... } }`). */
1053
+ method: Factory<MethodCtor>; /** Factory for creating new expressions (e.g., `new ClassName()`). */
774
1054
  new: Factory<NewCtor>; /** Factory for creating return statements. */
775
- return: Factory<ReturnCtor>; /** Factories for creating type nodes. */
1055
+ return: Factory<ReturnCtor>; /** Factory for creating spread expressions (e.g., `...expr`). */
1056
+ spread: Factory<SpreadCtor>; /** Factories for creating type nodes. */
776
1057
  type: {
777
- /** Factory for creating basic type references or type expressions (e.g. Foo or Foo<T>). */expr: Factory<TypeExprCtor>; /** Factory for creating indexed-access types (e.g. `Foo<T>[K]`). */
778
- idx: Factory<TypeIdxCtor>; /** Factory for creating type operator nodes (e.g. `readonly T`, `keyof T`, `unique T`). */
779
- operator: Factory<TypeOperatorCtor>; /** Factory for creating type query nodes (e.g. `typeof Foo`). */
780
- query: Factory<TypeQueryCtor>;
781
- }; /** Factory for creating `typeof` expressions (e.g. `typeof value`). */
1058
+ /** Factory for creating basic type references or type expressions (e.g., Foo or Foo<T>). */expr: Factory<TypeExprCtor>; /** Factory for creating indexed-access types (e.g., `Foo<T>[K]`). */
1059
+ idx: Factory<TypeIdxCtor>; /** Factory for creating type operator nodes (e.g., `readonly T`, `keyof T`, `unique T`). */
1060
+ operator: Factory<TypeOperatorCtor>; /** Factory for creating type query nodes (e.g., `typeof Foo`). */
1061
+ query: Factory<TypeQueryCtor>; /** Factory for creating named tuple elements (e.g., `[resolver?: R]`). */
1062
+ tupleMember: Factory<TypeTupleMemberCtor>;
1063
+ }; /** Factory for creating `typeof` expressions (e.g., `typeof value`). */
782
1064
  typeofExpr: Factory<TypeOfExprCtor>;
783
1065
  };
784
1066
  //#endregion
785
- //#region src/ts-dsl/mixins/expr.d.ts
786
- interface ExprMethods extends Node {
787
- /** Accesses a property on the current expression (e.g. `this.foo`). */
788
- attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr>;
789
- /** Awaits the current expression (e.g. `await expr`). */
790
- await(): ReturnType<typeof f.await>;
791
- /** Calls the current expression (e.g. `fn(arg1, arg2)`). */
792
- call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call>;
793
- /** Produces a `return` statement returning the current expression. */
794
- return(): ReturnType<typeof f.return>;
1067
+ //#region src/ts-dsl/mixins/spread.d.ts
1068
+ interface SpreadMethods extends Node {
1069
+ /** Produces a spread element from the current expression (e.g., `...expr`). */
1070
+ spread(): ReturnType<typeof f.spread>;
795
1071
  }
796
1072
  //#endregion
797
1073
  //#region src/ts-dsl/expr/call.d.ts
798
1074
  type CallArgs = ReadonlyArray<CallCallee | undefined>;
799
1075
  type CallCallee = NodeName | MaybeTsDsl<ts.Expression>;
800
1076
  type CallCtor = (callee: CallCallee, ...args: CallArgs) => CallTsDsl;
801
- declare const Mixed$40: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.CallExpression>, TypeArgsMethods>, ExprMethods>, AsMethods>, ArgsMethods>;
802
- declare class CallTsDsl extends Mixed$40 {
1077
+ declare const Mixed$39: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.CallExpression>, TypeArgsMethods>, SpreadMethods>, ExprMethods>, AsMethods>, ArgsMethods>;
1078
+ declare class CallTsDsl extends Mixed$39 {
803
1079
  readonly '~dsl' = "CallTsDsl";
804
1080
  protected _callee: Ref<CallCallee>;
805
1081
  constructor(callee: CallCallee, ...args: CallArgs);
@@ -910,18 +1186,32 @@ declare abstract class TypeTsDsl<T extends ts.LiteralTypeNode | ts.QualifiedName
910
1186
  type TypeOfMaybe<I> = undefined extends I ? TypeOf<NonNullable<FromRef<I>>> | undefined : TypeOf<FromRef<I>>;
911
1187
  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;
912
1188
  //#endregion
913
- //#region src/ts-dsl/layout/doc.d.ts
914
- type DocMaybeLazy<T> = ((ctx: TsDslContext) => T) | T;
915
- type DocFn = (d: DocTsDsl) => void;
916
- type DocLines = DocMaybeLazy<MaybeArray<string>>;
917
- declare class DocTsDsl extends TsDsl<ts.Node> {
918
- readonly '~dsl' = "DocTsDsl";
919
- protected _lines: Array<DocLines>;
920
- constructor(lines?: DocLines, fn?: DocFn);
1189
+ //#region src/ts-dsl/expr/postfix.d.ts
1190
+ type PostfixExpr = string | MaybeTsDsl<ts.Expression>;
1191
+ type PostfixOp = ts.PostfixUnaryOperator;
1192
+ declare const Mixed$38: abstract new () => TsDsl<ts.PostfixUnaryExpression>;
1193
+ declare class PostfixTsDsl extends Mixed$38 {
1194
+ readonly '~dsl' = "PostfixTsDsl";
1195
+ protected _expr?: PostfixExpr;
1196
+ protected _op?: PostfixOp;
1197
+ constructor(expr?: PostfixExpr, op?: PostfixOp);
921
1198
  analyze(ctx: AnalysisContext): void;
922
- add(lines: DocLines): this;
923
- apply<T extends ts.Node>(node: T): T;
924
- toAst(): ts.Identifier;
1199
+ /** Returns true when all required builder calls are present. */
1200
+ get isValid(): boolean;
1201
+ /** Sets the operator to MinusMinusToken for decrement (`--`). */
1202
+ dec(): this;
1203
+ /** Sets the operand (the expression being postfixed). */
1204
+ expr(expr: PostfixExpr): this;
1205
+ /** Sets the operator to PlusPlusToken for increment (`++`). */
1206
+ inc(): this;
1207
+ /** Sets the operator (e.g., `ts.SyntaxKind.PlusPlusToken` for `++`). */
1208
+ op(op: PostfixOp): this;
1209
+ toAst(): ts.PostfixUnaryExpression;
1210
+ $validate(): asserts this is this & {
1211
+ _expr: PostfixExpr;
1212
+ _op: PostfixOp;
1213
+ };
1214
+ private missingRequiredCalls;
925
1215
  }
926
1216
  //#endregion
927
1217
  //#region src/ts-dsl/layout/hint.d.ts
@@ -938,20 +1228,10 @@ declare class HintTsDsl extends TsDsl<ts.Node> {
938
1228
  toAst(): ts.Identifier;
939
1229
  }
940
1230
  //#endregion
941
- //#region src/ts-dsl/mixins/do.d.ts
942
- type DoExpr = MaybeTsDsl<ts.Expression | ts.Statement>;
943
- interface DoMethods extends Node {
944
- /** Renders the collected `.do()` calls into an array of `Statement` nodes. */
945
- $do(): ReadonlyArray<ts.Statement>;
946
- _do: Array<DoExpr>;
947
- /** Adds one or more expressions/statements to the body. */
948
- do(...items: ReadonlyArray<DoExpr>): this;
949
- }
950
- //#endregion
951
1231
  //#region src/ts-dsl/stmt/if.d.ts
952
- type IfCondition = string | MaybeTsDsl<ts.Expression>;
953
- declare const Mixed$39: MixinCtor<abstract new () => TsDsl<ts.IfStatement>, DoMethods>;
954
- declare class IfTsDsl extends Mixed$39 {
1232
+ type IfCondition = NodeName | MaybeTsDsl<ts.Expression>;
1233
+ declare const Mixed$37: MixinCtor<abstract new () => TsDsl<ts.IfStatement>, DoMethods>;
1234
+ declare class IfTsDsl extends Mixed$37 {
955
1235
  readonly '~dsl' = "IfTsDsl";
956
1236
  protected _condition?: IfCondition;
957
1237
  protected _else?: Array<DoExpr>;
@@ -1029,236 +1309,82 @@ interface TsSourceFile extends TsNodeBase {
1029
1309
  kind: TsNodeKind.SourceFile;
1030
1310
  statements: ReadonlyArray<TsNode>;
1031
1311
  }
1032
- declare function createSourceFile(statements: ReadonlyArray<TsNode>, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): TsSourceFile;
1033
- //#endregion
1034
- //#region src/ts-compiler/nodes/base.d.ts
1035
- interface TsNodeBase {
1036
- kind: TsNodeKind;
1037
- leadingComments?: ReadonlyArray<string>;
1038
- trailingComments?: ReadonlyArray<string>;
1039
- }
1040
- type TsNode = TsExpression | TsSourceFile | TsStatement;
1041
- //#endregion
1042
- //#region src/ts-compiler/nodes/expressions/literal.d.ts
1043
- type TsLiteralValue = string | number | boolean | bigint | null;
1044
- interface TsLiteral extends TsNodeBase {
1045
- kind: TsNodeKind.Literal;
1046
- value: TsLiteralValue;
1047
- }
1048
- declare function createLiteral(value: TsLiteralValue, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): TsLiteral;
1049
- //#endregion
1050
- //#region src/ts-dsl/layout/note.d.ts
1051
- type NoteMaybeLazy<T> = ((ctx: TsDslContext) => T) | T;
1052
- type NoteFn = (d: NoteTsDsl) => void;
1053
- type NoteLines = NoteMaybeLazy<MaybeArray<string>>;
1054
- declare class NoteTsDsl extends TsDsl<ts.Node> {
1055
- readonly '~dsl' = "NoteTsDsl";
1056
- protected _lines: Array<NoteLines>;
1057
- constructor(lines?: NoteLines, fn?: NoteFn);
1058
- analyze(ctx: AnalysisContext): void;
1059
- add(lines: NoteLines): this;
1060
- apply<T extends ts.Node>(node: T): T;
1061
- toAst(): ts.Identifier;
1062
- }
1063
- //#endregion
1064
- //#region src/ts-dsl/mixins/value.d.ts
1065
- type ValueExpr = string | MaybeTsDsl<ts.Expression>;
1066
- interface ValueMethods extends Node {
1067
- $value(): ts.Expression | undefined;
1068
- /** Sets the initializer expression (e.g. `= expr`). */
1069
- assign(expr: ValueExpr): this;
1070
- }
1071
- //#endregion
1072
- //#region src/ts-dsl/mixins/pattern.d.ts
1073
- interface PatternMethods extends Node {
1074
- /** Renders the pattern into a `BindingName`. */
1075
- $pattern(): ts.BindingName | undefined;
1076
- /** Defines an array binding pattern. */
1077
- array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
1078
- /** Defines an object binding pattern. */
1079
- object(...props: ReadonlyArray<MaybeArray<string> | Record<string, string>>): this;
1080
- /** Adds a spread element (e.g. `...args`, `...options`) to the pattern. */
1081
- spread(name: string): this;
1082
- }
1083
- //#endregion
1084
- //#region src/ts-dsl/mixins/decorator.d.ts
1085
- interface DecoratorMethods extends Node {
1086
- /** Renders the decorators into an array of `ts.Decorator`s. */
1087
- $decorators(): ReadonlyArray<ts.Decorator>;
1088
- /** Adds a decorator (e.g. `@sealed({ in: 'root' })`). */
1089
- decorator(name: NodeName | MaybeTsDsl<ts.Expression>, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>): this;
1090
- }
1091
- //#endregion
1092
- //#region src/ts-dsl/decl/param.d.ts
1093
- type ParamName = NodeName | ParamFn;
1094
- type ParamFn = (p: ParamTsDsl) => void;
1095
- type ParamCtor = (name: ParamName, fn?: ParamFn) => ParamTsDsl;
1096
- declare const Mixed$38: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ParameterDeclaration>, ValueMethods>, PatternMethods>, OptionalMethods>, DecoratorMethods>;
1097
- declare class ParamTsDsl extends Mixed$38 {
1098
- readonly '~dsl' = "ParamTsDsl";
1099
- protected _type?: TypeTsDsl;
1100
- constructor(name: ParamName, fn?: ParamFn);
1101
- analyze(ctx: AnalysisContext): void;
1102
- /** Returns true when all required builder calls are present. */
1103
- get isValid(): boolean;
1104
- /** Sets the parameter type. */
1105
- type(type: string | TypeTsDsl): this;
1106
- toAst(): ts.ParameterDeclaration;
1107
- $validate(): asserts this;
1108
- private missingRequiredCalls;
1109
- }
1110
- //#endregion
1111
- //#region src/ts-dsl/expr/template.d.ts
1112
- type TemplatePart = NodeName | MaybeTsDsl<ts.Expression>;
1113
- declare const Mixed$37: abstract new () => TsDsl<ts.TemplateExpression | ts.NoSubstitutionTemplateLiteral>;
1114
- declare class TemplateTsDsl extends Mixed$37 {
1115
- readonly '~dsl' = "TemplateTsDsl";
1116
- protected parts: Array<Ref<TemplatePart>>;
1117
- constructor(value?: TemplatePart);
1118
- analyze(ctx: AnalysisContext): void;
1119
- add(value: TemplatePart): this;
1120
- toAst(): ts.TemplateExpression | ts.NoSubstitutionTemplateLiteral;
1121
- }
1122
- //#endregion
1123
- //#region src/ts-dsl/type/param.d.ts
1124
- type TypeParamExpr = NodeName | boolean | MaybeTsDsl<TypeTsDsl>;
1125
- declare const Mixed$36: abstract new () => TsDsl<ts.TypeParameterDeclaration>;
1126
- declare class TypeParamTsDsl extends Mixed$36 {
1127
- readonly '~dsl' = "TypeParamTsDsl";
1128
- scope: NodeScope;
1129
- protected constraint?: Ref<TypeParamExpr>;
1130
- protected defaultValue?: Ref<TypeParamExpr>;
1131
- constructor(name?: NodeName, fn?: (name: TypeParamTsDsl) => void);
1132
- analyze(ctx: AnalysisContext): void;
1133
- /** Sets the parameter default value. */
1134
- default(value: TypeParamExpr): this;
1135
- extends(constraint: TypeParamExpr): this;
1136
- toAst(): ts.TypeParameterDeclaration;
1137
- }
1138
- //#endregion
1139
- //#region src/ts-dsl/mixins/type-params.d.ts
1140
- interface TypeParamsMethods extends Node {
1141
- /** Returns the type parameters as an array of ts.TypeParameterDeclaration nodes. */
1142
- $generics(): ReadonlyArray<ts.TypeParameterDeclaration> | undefined;
1143
- /** Adds a single type parameter (e.g. `T` in `Array<T>`). */
1144
- generic(...args: ConstructorParameters<typeof TypeParamTsDsl>): this;
1145
- /** Adds type parameters (e.g. `Map<string, T>`). */
1146
- generics(...args: ReadonlyArray<NodeName | MaybeTsDsl<TypeParamTsDsl>>): this;
1147
- }
1148
- //#endregion
1149
- //#region src/ts-dsl/mixins/modifiers.d.ts
1150
- type Modifiers = {
1151
- /**
1152
- * Checks if the specified modifier is present.
1153
- *
1154
- * @param modifier - The modifier to check.
1155
- * @returns True if the modifier is present, false otherwise.
1156
- */
1157
- hasModifier(modifier: Modifier): boolean;
1158
- modifiers: Array<ts.Modifier>;
1159
- };
1160
- type Modifier = 'abstract' | 'async' | 'const' | 'declare' | 'default' | 'export' | 'override' | 'private' | 'protected' | 'public' | 'readonly' | 'static';
1161
- interface AbstractMethods extends Modifiers {
1162
- /**
1163
- * Adds the `abstract` keyword modifier if the condition is true.
1164
- *
1165
- * @param condition - Whether to add the modifier (default: true).
1166
- * @returns The target object for chaining.
1167
- */
1168
- abstract(condition?: boolean): this;
1169
- }
1170
- interface AsyncMethods extends Modifiers {
1171
- /**
1172
- * Adds the `async` keyword modifier if the condition is true.
1173
- *
1174
- * @param condition - Whether to add the modifier (default: true).
1175
- * @returns The target object for chaining.
1176
- */
1177
- async(condition?: boolean): this;
1178
- }
1179
- interface ConstMethods extends Modifiers {
1180
- /**
1181
- * Adds the `const` keyword modifier if the condition is true.
1182
- *
1183
- * @param condition - Whether to add the modifier (default: true).
1184
- * @returns The target object for chaining.
1185
- */
1186
- const(condition?: boolean): this;
1187
- }
1188
- interface DefaultMethods extends Modifiers {
1189
- /**
1190
- * Adds the `default` keyword modifier if the condition is true.
1191
- *
1192
- * @param condition - Whether to add the modifier (default: true).
1193
- * @returns The target object for chaining.
1194
- */
1195
- default(condition?: boolean): this;
1196
- }
1197
- interface ExportMethods extends Modifiers {
1198
- /**
1199
- * Adds the `export` keyword modifier if the condition is true.
1200
- *
1201
- * @param condition - Whether to add the modifier (default: true).
1202
- * @returns The target object for chaining.
1203
- */
1204
- export(condition?: boolean): this;
1205
- }
1206
- interface PrivateMethods extends Modifiers {
1207
- /**
1208
- * Adds the `private` keyword modifier if the condition is true.
1209
- *
1210
- * @param condition - Whether to add the modifier (default: true).
1211
- * @returns The target object for chaining.
1212
- */
1213
- private(condition?: boolean): this;
1214
- }
1215
- interface ProtectedMethods extends Modifiers {
1216
- /**
1217
- * Adds the `protected` keyword modifier if the condition is true.
1218
- *
1219
- * @param condition - Whether to add the modifier (default: true).
1220
- * @returns The target object for chaining.
1221
- */
1222
- protected(condition?: boolean): this;
1312
+ declare function createSourceFile(statements: ReadonlyArray<TsNode>, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): TsSourceFile;
1313
+ //#endregion
1314
+ //#region src/ts-compiler/nodes/base.d.ts
1315
+ interface TsNodeBase {
1316
+ kind: TsNodeKind;
1317
+ leadingComments?: ReadonlyArray<string>;
1318
+ trailingComments?: ReadonlyArray<string>;
1223
1319
  }
1224
- interface PublicMethods extends Modifiers {
1225
- /**
1226
- * Adds the `public` keyword modifier if the condition is true.
1227
- *
1228
- * @param condition - Whether to add the modifier (default: true).
1229
- * @returns The target object for chaining.
1230
- */
1231
- public(condition?: boolean): this;
1320
+ type TsNode = TsExpression | TsSourceFile | TsStatement;
1321
+ //#endregion
1322
+ //#region src/ts-compiler/nodes/expressions/literal.d.ts
1323
+ type TsLiteralValue = string | number | boolean | bigint | null;
1324
+ interface TsLiteral extends TsNodeBase {
1325
+ kind: TsNodeKind.Literal;
1326
+ value: TsLiteralValue;
1232
1327
  }
1233
- interface ReadonlyMethods extends Modifiers {
1234
- /**
1235
- * Adds the `readonly` keyword modifier if the condition is true.
1236
- *
1237
- * @param condition - Whether to add the modifier (default: true).
1238
- * @returns The target object for chaining.
1239
- */
1240
- readonly(condition?: boolean): this;
1328
+ declare function createLiteral(value: TsLiteralValue, leadingComments?: ReadonlyArray<string>, trailingComments?: ReadonlyArray<string>): TsLiteral;
1329
+ //#endregion
1330
+ //#region src/ts-dsl/expr/prefix.d.ts
1331
+ type PrefixExpr = string | MaybeTsDsl<ts.Expression>;
1332
+ type PrefixOp = ts.PrefixUnaryOperator;
1333
+ declare const Mixed$36: abstract new () => TsDsl<ts.PrefixUnaryExpression>;
1334
+ declare class PrefixTsDsl extends Mixed$36 {
1335
+ readonly '~dsl' = "PrefixTsDsl";
1336
+ protected _expr?: PrefixExpr;
1337
+ protected _op?: PrefixOp;
1338
+ constructor(expr?: PrefixExpr, op?: PrefixOp);
1339
+ analyze(ctx: AnalysisContext): void;
1340
+ /** Returns true when all required builder calls are present. */
1341
+ get isValid(): boolean;
1342
+ /** Sets the operand (the expression being prefixed). */
1343
+ expr(expr: PrefixExpr): this;
1344
+ /** Sets the operator to MinusToken for negation (`-`). */
1345
+ neg(): this;
1346
+ /** Sets the operator to ExclamationToken for logical NOT (`!`). */
1347
+ not(): this;
1348
+ /** Sets the operator (e.g., `ts.SyntaxKind.ExclamationToken` for `!`). */
1349
+ op(op: PrefixOp): this;
1350
+ toAst(): ts.PrefixUnaryExpression;
1351
+ $validate(): asserts this is this & {
1352
+ _expr: PrefixExpr;
1353
+ _op: PrefixOp;
1354
+ };
1355
+ private missingRequiredCalls;
1241
1356
  }
1242
- interface StaticMethods extends Modifiers {
1243
- /**
1244
- * Adds the `static` keyword modifier if the condition is true.
1245
- *
1246
- * @param condition - Whether to add the modifier (default: true).
1247
- * @returns The target object for chaining.
1248
- */
1249
- static(condition?: boolean): this;
1357
+ //#endregion
1358
+ //#region src/ts-dsl/layout/note.d.ts
1359
+ type NoteMaybeLazy<T> = ((ctx: TsDslContext) => T) | T;
1360
+ type NoteFn = (d: NoteTsDsl) => void;
1361
+ type NoteLines = NoteMaybeLazy<MaybeArray<string>>;
1362
+ declare class NoteTsDsl extends TsDsl<ts.Node> {
1363
+ readonly '~dsl' = "NoteTsDsl";
1364
+ protected _lines: Array<NoteLines>;
1365
+ constructor(lines?: NoteLines, fn?: NoteFn);
1366
+ analyze(ctx: AnalysisContext): void;
1367
+ add(lines: NoteLines): this;
1368
+ apply<T extends ts.Node>(node: T): T;
1369
+ toAst(): ts.Identifier;
1250
1370
  }
1251
1371
  //#endregion
1252
- //#region src/ts-dsl/mixins/doc.d.ts
1253
- interface DocMethods extends Node {
1254
- $docs<T extends ts.Node>(node: T): T;
1255
- doc(lines?: DocLines, fn?: DocFn): this;
1372
+ //#region src/ts-dsl/expr/template.d.ts
1373
+ type TemplatePart = NodeName | MaybeTsDsl<ts.Expression>;
1374
+ declare const Mixed$35: abstract new () => TsDsl<ts.TemplateExpression | ts.NoSubstitutionTemplateLiteral>;
1375
+ declare class TemplateTsDsl extends Mixed$35 {
1376
+ readonly '~dsl' = "TemplateTsDsl";
1377
+ protected parts: Array<Ref<TemplatePart>>;
1378
+ constructor(value?: TemplatePart);
1379
+ analyze(ctx: AnalysisContext): void;
1380
+ add(value: TemplatePart): this;
1381
+ toAst(): ts.TemplateExpression | ts.NoSubstitutionTemplateLiteral;
1256
1382
  }
1257
1383
  //#endregion
1258
1384
  //#region src/ts-dsl/decl/field.d.ts
1259
1385
  type FieldType = NodeName | TypeTsDsl;
1260
- declare const Mixed$35: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyDeclaration>, ValueMethods>, StaticMethods>, ReadonlyMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, OptionalMethods>, DocMethods>, DecoratorMethods>;
1261
- declare class FieldTsDsl extends Mixed$35 {
1386
+ declare const Mixed$34: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyDeclaration>, ValueMethods>, StaticMethods>, ReadonlyMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, OptionalMethods>, DocMethods>, DecoratorMethods>;
1387
+ declare class FieldTsDsl extends Mixed$34 {
1262
1388
  readonly '~dsl' = "FieldTsDsl";
1263
1389
  readonly nameSanitizer: (name: string) => string;
1264
1390
  protected _type?: TypeTsDsl;
@@ -1269,43 +1395,15 @@ declare class FieldTsDsl extends Mixed$35 {
1269
1395
  toAst(): ts.PropertyDeclaration;
1270
1396
  }
1271
1397
  //#endregion
1272
- //#region src/ts-dsl/mixins/param.d.ts
1273
- interface ParamMethods extends Node {
1274
- /** Renders the parameters into an array of `ParameterDeclaration`s. */
1275
- $params(): ReadonlyArray<ts.ParameterDeclaration>;
1276
- /** Adds a parameter. */
1277
- param(...args: Parameters<ParamCtor>): this;
1278
- /** Adds multiple parameters. */
1279
- params(...params: ReadonlyArray<MaybeTsDsl<ts.ParameterDeclaration>>): this;
1280
- }
1281
- //#endregion
1282
1398
  //#region src/ts-dsl/decl/init.d.ts
1283
- declare const Mixed$34: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ConstructorDeclaration>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>;
1284
- declare class InitTsDsl extends Mixed$34 {
1399
+ declare const Mixed$33: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ConstructorDeclaration>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>;
1400
+ declare class InitTsDsl extends Mixed$33 {
1285
1401
  readonly '~dsl' = "InitTsDsl";
1286
1402
  constructor(fn?: (i: InitTsDsl) => void);
1287
1403
  analyze(ctx: AnalysisContext): void;
1288
1404
  toAst(): ts.ConstructorDeclaration;
1289
1405
  }
1290
1406
  //#endregion
1291
- //#region src/ts-dsl/mixins/type-returns.d.ts
1292
- interface TypeReturnsMethods extends Node {
1293
- /** Returns the return type node. */
1294
- $returns(): ts.TypeNode | undefined;
1295
- /** Sets the return type. */
1296
- returns(type: NodeName | TypeTsDsl): this;
1297
- }
1298
- //#endregion
1299
- //#region src/ts-dsl/decl/method.d.ts
1300
- declare const Mixed$33: 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>;
1301
- declare class MethodTsDsl extends Mixed$33 {
1302
- readonly '~dsl' = "MethodTsDsl";
1303
- readonly nameSanitizer: (name: string) => string;
1304
- constructor(name: NodeName, fn?: (m: MethodTsDsl) => void);
1305
- analyze(ctx: AnalysisContext): void;
1306
- toAst(): ts.MethodDeclaration;
1307
- }
1308
- //#endregion
1309
1407
  //#region src/ts-dsl/decl/class.d.ts
1310
1408
  type Body = Array<MaybeTsDsl<ts.ClassElement | ts.Node>>;
1311
1409
  declare const Mixed$32: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ClassDeclaration>, TypeParamsMethods>, ExportMethods>, DocMethods>, DefaultMethods>, DecoratorMethods>, AbstractMethods>;
@@ -1378,7 +1476,7 @@ declare class EnumTsDsl extends Mixed$29 {
1378
1476
  //#endregion
1379
1477
  //#region src/ts-dsl/decl/func.d.ts
1380
1478
  type FuncMode = 'arrow' | 'decl' | 'expr';
1381
- declare const Mixed$28: 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>;
1479
+ declare const Mixed$28: MixinCtor<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>, ExportMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AsMethods>, AbstractMethods>;
1382
1480
  declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$28 {
1383
1481
  readonly '~dsl' = "FuncTsDsl";
1384
1482
  readonly nameSanitizer: (name: string) => string;
@@ -1421,7 +1519,7 @@ declare class GetterTsDsl extends Mixed$27 {
1421
1519
  //#region src/ts-dsl/decl/pattern.d.ts
1422
1520
  declare const Mixed$26: abstract new () => TsDsl<ts.BindingName>;
1423
1521
  /**
1424
- * Builds binding patterns (e.g. `{ foo, bar }`, `[a, b, ...rest]`).
1522
+ * Builds binding patterns (e.g., `{ foo, bar }`, `[a, b, ...rest]`).
1425
1523
  */
1426
1524
  declare class PatternTsDsl extends Mixed$26 {
1427
1525
  readonly '~dsl' = "PatternTsDsl";
@@ -1436,11 +1534,11 @@ declare class PatternTsDsl extends Mixed$26 {
1436
1534
  analyze(ctx: AnalysisContext): void;
1437
1535
  /** Returns true when all required builder calls are present. */
1438
1536
  get isValid(): boolean;
1439
- /** Defines an array pattern (e.g. `[a, b, c]`). */
1537
+ /** Defines an array pattern (e.g., `[a, b, c]`). */
1440
1538
  array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
1441
- /** Defines an object pattern (e.g. `{ a, b: alias }`). */
1539
+ /** Defines an object pattern (e.g., `{ a, b: alias }`). */
1442
1540
  object(...props: ReadonlyArray<MaybeArray<string> | Record<string, string>>): this;
1443
- /** Adds a spread element (e.g. `...rest`, `...options`, `...args`). */
1541
+ /** Adds a spread element (e.g., `...rest`, `...options`, `...args`). */
1444
1542
  spread(name: string): this;
1445
1543
  toAst(): ts.ObjectBindingPattern | ts.ArrayBindingPattern;
1446
1544
  $validate(): asserts this is this & {
@@ -1479,30 +1577,23 @@ interface LayoutMethods extends Node {
1479
1577
  }
1480
1578
  //#endregion
1481
1579
  //#region src/ts-dsl/expr/array.d.ts
1482
- declare const Mixed$24: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ArrayLiteralExpression>, LayoutMethods>, AsMethods>;
1580
+ type ArrayExpr = string | number | boolean | MaybeTsDsl<ts.Expression>;
1581
+ declare const Mixed$24: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ArrayLiteralExpression>, SpreadMethods>, LayoutMethods>, ExprMethods>, AsMethods>;
1483
1582
  declare class ArrayTsDsl extends Mixed$24 {
1484
1583
  readonly '~dsl' = "ArrayTsDsl";
1485
- protected _elements: Array<{
1486
- expr: MaybeTsDsl<ts.Expression>;
1487
- kind: 'element';
1488
- } | {
1489
- expr: MaybeTsDsl<ts.Expression>;
1490
- kind: 'spread';
1491
- }>;
1492
- constructor(...exprs: Array<string | number | boolean | MaybeTsDsl<ts.Expression>>);
1584
+ protected _elements: Array<MaybeTsDsl<ts.Expression>>;
1585
+ constructor(...exprs: Array<ArrayExpr>);
1493
1586
  analyze(ctx: AnalysisContext): void;
1494
1587
  /** Adds a single array element. */
1495
- element(expr: string | number | boolean | MaybeTsDsl<ts.Expression>): this;
1588
+ element(expr: ArrayExpr): this;
1496
1589
  /** Adds multiple array elements. */
1497
- elements(...exprs: ReadonlyArray<string | number | boolean | MaybeTsDsl<ts.Expression>>): this;
1498
- /** Adds a spread element (`...expr`). */
1499
- spread(expr: MaybeTsDsl<ts.Expression>): this;
1590
+ elements(...exprs: ReadonlyArray<ArrayExpr>): this;
1500
1591
  toAst(): ts.ArrayLiteralExpression;
1501
1592
  }
1502
1593
  //#endregion
1503
1594
  //#region src/ts-dsl/expr/expr.d.ts
1504
1595
  type Id = NodeName | MaybeTsDsl<ts.Expression>;
1505
- declare const Mixed$23: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Expression>, TypeExprMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
1596
+ declare const Mixed$23: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Expression>, TypeExprMethods>, SpreadMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
1506
1597
  declare class ExprTsDsl extends Mixed$23 {
1507
1598
  readonly '~dsl' = "ExprTsDsl";
1508
1599
  protected _exprInput: Ref<Id>;
@@ -1586,15 +1677,17 @@ interface HintMethods extends Node {
1586
1677
  }
1587
1678
  //#endregion
1588
1679
  //#region src/ts-dsl/expr/prop.d.ts
1589
- type Expr$1 = NodeName | MaybeTsDsl<ts.Expression>;
1590
- type Stmt$1 = NodeName | MaybeTsDsl<ts.Statement>;
1591
- type ObjectPropKind = 'computed' | 'getter' | 'prop' | 'setter' | 'spread';
1680
+ type ObjectPropKind = 'computed' | 'getter' | 'method' | 'prop' | 'setter' | 'spread';
1681
+ type ObjectPropValue = NodeName | MaybeTsDsl<ts.Expression | ts.Statement> | ReturnType<typeof f.method>;
1592
1682
  type Meta = {
1593
1683
  kind: 'computed';
1594
1684
  name: string;
1595
1685
  } | {
1596
1686
  kind: 'getter';
1597
1687
  name: string;
1688
+ } | {
1689
+ kind: 'method';
1690
+ name: string;
1598
1691
  } | {
1599
1692
  kind: 'prop';
1600
1693
  name: string;
@@ -1608,17 +1701,17 @@ type Meta = {
1608
1701
  declare const Mixed$20: MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralElementLike>, DocMethods>;
1609
1702
  declare class ObjectPropTsDsl extends Mixed$20 {
1610
1703
  readonly '~dsl' = "ObjectPropTsDsl";
1611
- protected _value?: Ref<Expr$1 | Stmt$1>;
1704
+ protected _value?: Ref<ObjectPropValue>;
1612
1705
  protected _meta: Meta;
1613
1706
  constructor(meta: Meta);
1614
- get kind(): ObjectPropKind;
1615
- get propName(): string | undefined;
1616
1707
  analyze(ctx: AnalysisContext): void;
1617
1708
  get isValid(): boolean;
1618
- value(value: Expr$1 | Stmt$1 | ((p: ObjectPropTsDsl) => void)): this;
1619
- toAst(): ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.SpreadAssignment;
1709
+ get kind(): ObjectPropKind;
1710
+ get propName(): string | undefined;
1711
+ value(value: ObjectPropValue): this;
1712
+ toAst(): ts.MethodDeclaration | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.SpreadAssignment;
1620
1713
  $validate(): asserts this is this & {
1621
- _value: Expr$1 | Stmt$1;
1714
+ _value: ObjectPropValue;
1622
1715
  kind: ObjectPropKind;
1623
1716
  };
1624
1717
  private missingRequiredCalls;
@@ -1627,67 +1720,41 @@ declare class ObjectPropTsDsl extends Mixed$20 {
1627
1720
  //#region src/ts-dsl/expr/object.d.ts
1628
1721
  type Expr = NodeName | MaybeTsDsl<ts.Expression>;
1629
1722
  type Stmt = NodeName | MaybeTsDsl<ts.Statement>;
1630
- type ExprFn = Expr | ((p: ObjectPropTsDsl) => void);
1631
- type StmtFn = Stmt | ((p: ObjectPropTsDsl) => void);
1632
1723
  declare const Mixed$19: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralExpression>, LayoutMethods>, HintMethods>, ExprMethods>, AsMethods>;
1633
1724
  declare class ObjectTsDsl extends Mixed$19 {
1634
1725
  readonly '~dsl' = "ObjectTsDsl";
1635
1726
  protected _props: Map<string, ObjectPropTsDsl>;
1636
1727
  protected _spreadCounter: number;
1637
- constructor(...props: Array<ObjectPropTsDsl>);
1728
+ constructor(...props: Array<ObjectPropTsDsl> | [(o: ObjectTsDsl) => void]);
1638
1729
  analyze(ctx: AnalysisContext): void;
1639
1730
  /** Returns composite key for the property. */
1640
1731
  private _propKey;
1641
- /** Adds a computed property (e.g. `{ [expr]: value }`), or removes if null. */
1642
- computed(name: string, expr: ExprFn | null): this;
1643
- /** Adds a getter property (e.g. `{ get foo() { ... } }`), or removes if null. */
1644
- getter(name: string, stmt: StmtFn | null): this;
1732
+ /** Adds a computed property (e.g., `{ [expr]: value }`), or removes if null. */
1733
+ computed(name: string, expr: Expr | null): this;
1734
+ /** Adds a getter property (e.g., `{ get foo() { ... } }`), or removes if null. */
1735
+ getter(name: string, stmt: Stmt | null): this;
1645
1736
  /** Returns true if object has at least one property or spread. */
1646
1737
  hasProps(): boolean;
1647
1738
  /** Returns true if object has no properties or spreads. */
1648
1739
  get isEmpty(): boolean;
1740
+ /** Adds a method property (e.g., `{ foo() { ... } }`), or removes if null. */
1741
+ method(name: string, fn: ((m: MethodTsDsl) => void) | null): this;
1649
1742
  /** Adds a property assignment, or removes if null. */
1650
- prop(name: string, expr: ExprFn | null): this;
1743
+ prop(name: string, expr: Expr | null): this;
1651
1744
  /** Adds multiple properties. */
1652
1745
  props(...props: ReadonlyArray<ObjectPropTsDsl>): this;
1653
- /** Adds a setter property (e.g. `{ set foo(v) { ... } }`), or removes if null. */
1654
- setter(name: string, stmt: StmtFn | null): this;
1655
- /** Adds a spread property (e.g. `{ ...options }`). */
1656
- spread(expr: ExprFn): this;
1746
+ /** Adds a setter property (e.g., `{ set foo(v) { ... } }`), or removes if null. */
1747
+ setter(name: string, stmt: Stmt | null): this;
1748
+ /** Adds a spread property (e.g., `{ ...options }`). */
1749
+ spread(expr: Expr): this;
1657
1750
  toAst(): ts.ObjectLiteralExpression;
1658
1751
  }
1659
1752
  //#endregion
1660
- //#region src/ts-dsl/expr/prefix.d.ts
1661
- declare const Mixed$18: abstract new () => TsDsl<ts.PrefixUnaryExpression>;
1662
- declare class PrefixTsDsl extends Mixed$18 {
1663
- readonly '~dsl' = "PrefixTsDsl";
1664
- protected _expr?: string | MaybeTsDsl<ts.Expression>;
1665
- protected _op?: ts.PrefixUnaryOperator;
1666
- constructor(expr?: string | MaybeTsDsl<ts.Expression>, op?: ts.PrefixUnaryOperator);
1667
- analyze(ctx: AnalysisContext): void;
1668
- /** Returns true when all required builder calls are present. */
1669
- get isValid(): boolean;
1670
- /** Sets the operand (the expression being prefixed). */
1671
- expr(expr: string | MaybeTsDsl<ts.Expression>): this;
1672
- /** Sets the operator to MinusToken for negation (`-`). */
1673
- neg(): this;
1674
- /** Sets the operator to ExclamationToken for logical NOT (`!`). */
1675
- not(): this;
1676
- /** Sets the operator (e.g. `ts.SyntaxKind.ExclamationToken` for `!`). */
1677
- op(op: ts.PrefixUnaryOperator): this;
1678
- toAst(): ts.PrefixUnaryExpression;
1679
- $validate(): asserts this is this & {
1680
- _expr: string | MaybeTsDsl<ts.Expression>;
1681
- _op: ts.PrefixUnaryOperator;
1682
- };
1683
- private missingRequiredCalls;
1684
- }
1685
- //#endregion
1686
1753
  //#region src/ts-dsl/expr/regexp.d.ts
1687
1754
  type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u' | 'y';
1688
1755
  type RegexFlags<Avail extends string = RegexFlag> = '' | { [K in Avail]: `${K}${RegexFlags<Exclude<Avail, K>>}` }[Avail];
1689
- declare const Mixed$17: abstract new () => TsDsl<ts.RegularExpressionLiteral>;
1690
- declare class RegExpTsDsl extends Mixed$17 {
1756
+ declare const Mixed$18: abstract new () => TsDsl<ts.RegularExpressionLiteral>;
1757
+ declare class RegExpTsDsl extends Mixed$18 {
1691
1758
  readonly '~dsl' = "RegExpTsDsl";
1692
1759
  protected pattern: string;
1693
1760
  protected flags?: RegexFlags;
@@ -1697,8 +1764,8 @@ declare class RegExpTsDsl extends Mixed$17 {
1697
1764
  }
1698
1765
  //#endregion
1699
1766
  //#region src/ts-dsl/expr/ternary.d.ts
1700
- declare const Mixed$16: abstract new () => TsDsl<ts.ConditionalExpression>;
1701
- declare class TernaryTsDsl extends Mixed$16 {
1767
+ declare const Mixed$17: abstract new () => TsDsl<ts.ConditionalExpression>;
1768
+ declare class TernaryTsDsl extends Mixed$17 {
1702
1769
  readonly '~dsl' = "TernaryTsDsl";
1703
1770
  protected _condition?: string | MaybeTsDsl<ts.Expression>;
1704
1771
  protected _then?: string | MaybeTsDsl<ts.Expression>;
@@ -1727,17 +1794,84 @@ declare class NewlineTsDsl extends TsDsl<ts.Identifier> {
1727
1794
  }
1728
1795
  //#endregion
1729
1796
  //#region src/ts-dsl/stmt/block.d.ts
1730
- declare const Mixed$15: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Block>, LayoutMethods>, DoMethods>;
1731
- declare class BlockTsDsl extends Mixed$15 {
1797
+ declare const Mixed$16: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Block>, LayoutMethods>, DoMethods>;
1798
+ declare class BlockTsDsl extends Mixed$16 {
1732
1799
  readonly '~dsl' = "BlockTsDsl";
1733
1800
  constructor(...items: Array<DoExpr>);
1734
1801
  analyze(ctx: AnalysisContext): void;
1735
1802
  toAst(): ts.Block;
1736
1803
  }
1737
1804
  //#endregion
1805
+ //#region src/ts-dsl/stmt/var.d.ts
1806
+ declare const Mixed$15: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.VariableStatement>, ValueMethods>, PatternMethods>, HintMethods>, ExportMethods>, DocMethods>, DefaultMethods>;
1807
+ declare class VarTsDsl extends Mixed$15 {
1808
+ readonly '~dsl' = "VarTsDsl";
1809
+ readonly nameSanitizer: (name: string) => string;
1810
+ protected kind: ts.NodeFlags;
1811
+ protected _type?: TypeTsDsl;
1812
+ constructor(name?: NodeName);
1813
+ analyze(ctx: AnalysisContext): void;
1814
+ /** Returns true when all required builder calls are present. */
1815
+ get isValid(): boolean;
1816
+ const(): this;
1817
+ let(): this;
1818
+ /** Sets the variable type. */
1819
+ type(node: NodeName | TypeTsDsl): this;
1820
+ var(): this;
1821
+ toAst(): ts.VariableStatement;
1822
+ $validate(): asserts this;
1823
+ private missingRequiredCalls;
1824
+ }
1825
+ //#endregion
1826
+ //#region src/ts-dsl/stmt/for.d.ts
1827
+ type ForMode = 'for' | 'in' | 'of';
1828
+ type ForCondition = MaybeTsDsl<ts.Expression>;
1829
+ type ForIterable = MaybeTsDsl<ts.Expression>;
1830
+ declare const Mixed$14: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ForStatement>, LayoutMethods>, DoMethods>;
1831
+ declare class ImplForTsDsl<M extends ForMode = 'for'> extends Mixed$14 {
1832
+ readonly '~dsl' = "ForTsDsl";
1833
+ protected _await?: boolean;
1834
+ protected _condition?: ForCondition;
1835
+ protected _iterableOrUpdate?: ForIterable;
1836
+ protected _mode: ForMode;
1837
+ protected _variableOrInit?: VarTsDsl;
1838
+ constructor();
1839
+ analyze(ctx: AnalysisContext): void;
1840
+ /** Returns true when all required builder calls are present. */
1841
+ get isValid(): boolean;
1842
+ /** Enables async iteration (`for await...of`). Can only be called on for...of. */
1843
+ await(): ForTsDsl<'of'>;
1844
+ /** Sets the condition (e.g., `i < n`). */
1845
+ condition(condition: ForCondition): this;
1846
+ /** Sets the iteration variable (e.g., `$.const('item')`). */
1847
+ each(variable: VarTsDsl): this;
1848
+ /** Sets the object to iterate over and switches to for...in. */
1849
+ in(iterable?: ForIterable): ForTsDsl<'in'>;
1850
+ /** Sets the initialization (e.g., `let i = 0`). */
1851
+ init(init: VarTsDsl): this;
1852
+ /** Sets the iterable to iterate over. */
1853
+ iterable(iterable: ForIterable): this;
1854
+ /** Sets the iterable to iterate over and switches to for...of. */
1855
+ of(iterable?: ForIterable): ForTsDsl<'of'>;
1856
+ /** Sets the update expression (e.g., `i++`). */
1857
+ update(update: ForIterable): this;
1858
+ toAst(): M extends 'for' ? ts.ForStatement : M extends 'of' ? ts.ForOfStatement : ts.ForInStatement;
1859
+ $validate(): asserts this is this & {
1860
+ _iterableOrUpdate: ForIterable;
1861
+ _variableOrInit: VarTsDsl;
1862
+ };
1863
+ private missingRequiredCalls;
1864
+ }
1865
+ declare const ForTsDsl: {
1866
+ new (variableOrInit?: VarTsDsl): ForTsDsl<ForMode>;
1867
+ new (variableOrInit: VarTsDsl, condition: ForCondition, iterableOrUpdate?: ForIterable): ForTsDsl<"for">;
1868
+ new <T extends ForMode>(variableOrInit: VarTsDsl, mode: T, iterableOrUpdate?: ForIterable): ForTsDsl<T>;
1869
+ } & typeof ImplForTsDsl;
1870
+ type ForTsDsl<M extends ForMode = 'for'> = ImplForTsDsl<M>;
1871
+ //#endregion
1738
1872
  //#region src/ts-dsl/stmt/stmt.d.ts
1739
- declare const Mixed$14: abstract new () => TsDsl<ts.Statement>;
1740
- declare class StmtTsDsl extends Mixed$14 {
1873
+ declare const Mixed$13: abstract new () => TsDsl<ts.Statement>;
1874
+ declare class StmtTsDsl extends Mixed$13 {
1741
1875
  readonly '~dsl' = "StmtTsDsl";
1742
1876
  protected _inner: ts.Expression | ts.Statement | TsDsl<any>;
1743
1877
  constructor(inner: ts.Expression | ts.Statement | TsDsl<any>);
@@ -1746,8 +1880,8 @@ declare class StmtTsDsl extends Mixed$14 {
1746
1880
  }
1747
1881
  //#endregion
1748
1882
  //#region src/ts-dsl/stmt/throw.d.ts
1749
- declare const Mixed$13: abstract new () => TsDsl<ts.ThrowStatement>;
1750
- declare class ThrowTsDsl extends Mixed$13 {
1883
+ declare const Mixed$12: abstract new () => TsDsl<ts.ThrowStatement>;
1884
+ declare class ThrowTsDsl extends Mixed$12 {
1751
1885
  readonly '~dsl' = "ThrowTsDsl";
1752
1886
  protected error: string | MaybeTsDsl<ts.Expression>;
1753
1887
  protected msg?: string | MaybeTsDsl<ts.Expression>;
@@ -1759,8 +1893,8 @@ declare class ThrowTsDsl extends Mixed$13 {
1759
1893
  }
1760
1894
  //#endregion
1761
1895
  //#region src/ts-dsl/stmt/try.d.ts
1762
- declare const Mixed$12: abstract new () => TsDsl<ts.TryStatement>;
1763
- declare class TryTsDsl extends Mixed$12 {
1896
+ declare const Mixed$11: abstract new () => TsDsl<ts.TryStatement>;
1897
+ declare class TryTsDsl extends Mixed$11 {
1764
1898
  readonly '~dsl' = "TryTsDsl";
1765
1899
  protected _catch?: Array<DoExpr>;
1766
1900
  protected _catchArg?: NodeName;
@@ -1781,27 +1915,6 @@ declare class TryTsDsl extends Mixed$12 {
1781
1915
  private missingRequiredCalls;
1782
1916
  }
1783
1917
  //#endregion
1784
- //#region src/ts-dsl/stmt/var.d.ts
1785
- declare const Mixed$11: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.VariableStatement>, ValueMethods>, PatternMethods>, HintMethods>, ExportMethods>, DocMethods>, DefaultMethods>;
1786
- declare class VarTsDsl extends Mixed$11 {
1787
- readonly '~dsl' = "VarTsDsl";
1788
- readonly nameSanitizer: (name: string) => string;
1789
- protected kind: ts.NodeFlags;
1790
- protected _type?: TypeTsDsl;
1791
- constructor(name?: NodeName);
1792
- analyze(ctx: AnalysisContext): void;
1793
- /** Returns true when all required builder calls are present. */
1794
- get isValid(): boolean;
1795
- const(): this;
1796
- let(): this;
1797
- /** Sets the variable type. */
1798
- type(type: string | TypeTsDsl): this;
1799
- var(): this;
1800
- toAst(): ts.VariableStatement;
1801
- $validate(): asserts this;
1802
- private missingRequiredCalls;
1803
- }
1804
- //#endregion
1805
1918
  //#region src/ts-dsl/token.d.ts
1806
1919
  declare class TokenTsDsl<K extends ts.SyntaxKind = never> extends TsDsl<ts.Token<K>> {
1807
1920
  readonly '~dsl' = "TokenTsDsl";
@@ -2021,14 +2134,15 @@ declare class TypeTemplateTsDsl extends Mixed$1 {
2021
2134
  }
2022
2135
  //#endregion
2023
2136
  //#region src/ts-dsl/type/tuple.d.ts
2137
+ type TupleElement = string | ts.TypeNode | TypeTsDsl;
2024
2138
  declare const Mixed: abstract new () => TsDsl<ts.TupleTypeNode>;
2025
2139
  declare class TypeTupleTsDsl extends Mixed {
2026
2140
  readonly '~dsl' = "TypeTupleTsDsl";
2027
2141
  scope: NodeScope;
2028
- protected _elements: Array<string | ts.TypeNode | TypeTsDsl>;
2029
- constructor(...nodes: Array<string | ts.TypeNode | TypeTsDsl>);
2142
+ protected _elements: Array<TupleElement>;
2143
+ constructor(...nodes: Array<TupleElement>);
2030
2144
  analyze(ctx: AnalysisContext): void;
2031
- elements(...types: Array<string | ts.TypeNode | TypeTsDsl>): this;
2145
+ elements(...types: Array<TupleElement>): this;
2032
2146
  toAst(): ts.TupleTypeNode;
2033
2147
  }
2034
2148
  //#endregion
@@ -2061,10 +2175,10 @@ declare const regexp: {
2061
2175
  //#endregion
2062
2176
  //#region src/ts-dsl/utils/render-utils.d.ts
2063
2177
  type ModuleExport = Omit<ExportModule, 'from'> & {
2064
- /** Module specifier for re-exports, e.g. `./foo`. */modulePath: string;
2178
+ /** Module specifier for re-exports, e.g., `./foo`. */modulePath: string;
2065
2179
  };
2066
2180
  type ModuleImport = Omit<ImportModule, 'from'> & {
2067
- /** Module specifier for imports, e.g. `./foo`. */modulePath: string;
2181
+ /** Module specifier for imports, e.g., `./foo`. */modulePath: string;
2068
2182
  };
2069
2183
  //#endregion
2070
2184
  //#region src/ts-dsl/utils/render.d.ts
@@ -2153,56 +2267,66 @@ declare const reserved: {
2153
2267
  };
2154
2268
  //#endregion
2155
2269
  //#region src/ts-dsl/index.d.ts
2156
- declare const $: ((id: ts.Expression | TsDsl<ts.Expression> | _hey_api_codegen_core0.NodeName) => ExprTsDsl) & {
2157
- /** Creates an array literal expression (e.g. `[1, 2, 3]`). */array: (...args: ConstructorParameters<typeof ArrayTsDsl>) => ArrayTsDsl; /** Creates an `as` type assertion expression (e.g. `value as Type`). */
2158
- as: (expr: AsExpr, type: AsType) => AsTsDsl; /** Creates a property access expression (e.g. `obj.foo`). */
2159
- attr: (left: AttrLeft, right: _hey_api_codegen_core0.NodeName) => AttrTsDsl; /** Creates an await expression (e.g. `await promise`). */
2160
- await: (expr: AwaitExpr) => AwaitTsDsl; /** Creates a binary expression (e.g. `a + b`). */
2161
- binary: (base: ts.Expression | TsDsl<ts.Expression> | _hey_api_codegen_core0.NodeName, op?: (("!=" | "!==" | "&&" | "*" | "+" | "-" | "/" | "<" | "<=" | "=" | "==" | "===" | ">" | ">=" | "??" | "??=" | "||") | ts.BinaryOperator) | undefined, expr?: (ts.Expression | TsDsl<ts.Expression> | _hey_api_codegen_core0.NodeName) | undefined) => BinaryTsDsl; /** Creates a statement block (`{ ... }`). */
2162
- block: (...args: ConstructorParameters<typeof BlockTsDsl>) => BlockTsDsl; /** Creates a function or method call expression (e.g. `fn(arg)`). */
2270
+ declare const $: ((id: ts.Expression | TsDsl<ts.Expression> | NodeName) => ExprTsDsl) & {
2271
+ /** Creates an array literal expression (e.g., `[1, 2, 3]`). */array: (...args: ConstructorParameters<typeof ArrayTsDsl>) => ArrayTsDsl; /** Creates an `as` type assertion expression (e.g., `value as Type`). */
2272
+ as: (expr: AsExpr, type: AsType) => AsTsDsl; /** Creates a property access expression (e.g., `obj.foo`). */
2273
+ attr: (left: AttrLeft, right: NodeName) => AttrTsDsl; /** Creates an await expression (e.g., `await promise`). */
2274
+ await: (expr: AwaitExpr) => AwaitTsDsl; /** Creates a binary expression (e.g., `a + b`). */
2275
+ binary: (base: ts.Expression | TsDsl<ts.Expression> | NodeName, op?: (("!=" | "!==" | "&&" | "*" | "+" | "-" | "/" | "<" | "<=" | "=" | "==" | "===" | ">" | ">=" | "??" | "??=" | "||") | ts.BinaryOperator) | undefined, expr?: (ts.Expression | TsDsl<ts.Expression> | NodeName) | undefined) => BinaryTsDsl; /** Creates a statement block (`{ ... }`). */
2276
+ block: (...args: ConstructorParameters<typeof BlockTsDsl>) => BlockTsDsl; /** Creates a function or method call expression (e.g., `fn(arg)`). */
2163
2277
  call: (callee: CallCallee, ...args: (CallCallee | undefined)[]) => CallTsDsl; /** Creates a class declaration or expression. */
2164
- class: (name: _hey_api_codegen_core0.NodeName) => ClassTsDsl; /** Creates a constant variable declaration (`const`). */
2165
- const: (name?: _hey_api_codegen_core0.NodeName | undefined) => VarTsDsl; /** Creates a decorator expression (e.g. `@decorator`). */
2166
- decorator: (name: _hey_api_codegen_core0.NodeName, ...args: (string | ts.Expression | TsDsl<ts.Expression>)[]) => DecoratorTsDsl; /** Creates a JSDoc documentation block. */
2278
+ class: (name: NodeName) => ClassTsDsl; /** Creates a constant variable declaration (`const`). */
2279
+ const: (name?: NodeName | undefined) => VarTsDsl; /** Creates a postfix decrement expression (`i--`). */
2280
+ dec: (expr?: PostfixExpr | undefined, op?: ts.PostfixUnaryOperator | undefined) => PostfixTsDsl; /** Creates a decorator expression (e.g., `@decorator`). */
2281
+ decorator: (name: NodeName, ...args: (string | ts.Expression | TsDsl<ts.Expression>)[]) => DecoratorTsDsl; /** Creates a JSDoc documentation block. */
2167
2282
  doc: (lines?: DocLines | undefined, fn?: DocFn | undefined) => DocTsDsl; /** Creates an enum declaration. */
2168
- enum: (name: _hey_api_codegen_core0.NodeName, fn?: ((e: EnumTsDsl) => void) | undefined) => EnumTsDsl; /** Creates a general expression node. */
2169
- expr: (id: ts.Expression | TsDsl<ts.Expression> | _hey_api_codegen_core0.NodeName) => ExprTsDsl; /** Creates a field declaration in a class or object. */
2170
- field: (name: _hey_api_codegen_core0.NodeName, fn?: ((f: FieldTsDsl) => void) | undefined) => FieldTsDsl; /** Converts a runtime value into a corresponding expression node. */
2283
+ enum: (name: NodeName, fn?: ((e: EnumTsDsl) => void) | undefined) => EnumTsDsl; /** Creates a general expression node. */
2284
+ expr: (id: ts.Expression | TsDsl<ts.Expression> | NodeName) => ExprTsDsl; /** Creates a field declaration in a class or object. */
2285
+ field: (name: NodeName, fn?: ((f: FieldTsDsl) => void) | undefined) => FieldTsDsl; /** Creates a for loop (for, for...of, for...in, or for await...of). */
2286
+ for: {
2287
+ (variableOrInit?: VarTsDsl): ForTsDsl<ForMode>;
2288
+ (variableOrInit: VarTsDsl, condition: ForCondition, iterableOrUpdate?: ForIterable): ForTsDsl<"for">;
2289
+ <T extends ForMode>(variableOrInit: VarTsDsl, mode: T, iterableOrUpdate?: ForIterable): ForTsDsl<T>;
2290
+ }; /** Converts a runtime value into a corresponding expression node. */
2171
2291
  fromValue: (input: unknown, options?: {
2172
2292
  layout?: "pretty";
2173
2293
  } | undefined) => TsDsl<ts.Expression>; /** Creates a function expression or declaration. */
2174
2294
  func: {
2175
2295
  (): FuncTsDsl<"arrow">;
2176
2296
  (fn: (f: FuncTsDsl<"arrow">) => void): FuncTsDsl<"arrow">;
2177
- (name: string): FuncTsDsl<"decl">;
2178
- (name: string, fn: (f: FuncTsDsl<"decl">) => void): FuncTsDsl<"decl">;
2179
- (name?: string, fn?: (f: FuncTsDsl<"decl">) => void): FuncTsDsl<"arrow"> | FuncTsDsl<"decl">;
2297
+ (name: NodeName): FuncTsDsl<"decl">;
2298
+ (name: NodeName, fn: (f: FuncTsDsl<"decl">) => void): FuncTsDsl<"decl">;
2299
+ (name?: NodeName, fn?: (f: FuncTsDsl<"decl">) => void): FuncTsDsl<"arrow"> | FuncTsDsl<"decl">;
2180
2300
  }; /** Creates a getter method declaration. */
2181
- getter: (name: _hey_api_codegen_core0.NodeName, fn?: ((g: GetterTsDsl) => void) | undefined) => GetterTsDsl; /** Creates a single-line comment (//). */
2182
- hint: (lines?: HintLines | undefined, fn?: HintFn | undefined) => HintTsDsl; /** Creates an identifier (e.g. `foo`). */
2301
+ getter: (name: NodeName, fn?: ((g: GetterTsDsl) => void) | undefined) => GetterTsDsl; /** Creates a single-line comment (//). */
2302
+ hint: (lines?: HintLines | undefined, fn?: HintFn | undefined) => HintTsDsl; /** Creates an identifier (e.g., `foo`). */
2183
2303
  id: (name: string) => IdTsDsl; /** Creates an if statement. */
2184
- if: (condition?: IfCondition | undefined) => IfTsDsl; /** Creates an initialization block or statement. */
2304
+ if: (condition?: IfCondition | undefined) => IfTsDsl; /** Creates a postfix increment expression (`i++`). */
2305
+ inc: (expr?: PostfixExpr | undefined, op?: ts.PostfixUnaryOperator | undefined) => PostfixTsDsl; /** Creates an initialization block or statement. */
2185
2306
  init: (fn?: ((i: InitTsDsl) => void) | undefined) => InitTsDsl; /** Creates a lazy, context-aware node with deferred evaluation. */
2186
2307
  lazy: <T extends ts.Node>(thunk: LazyThunk<T>) => LazyTsDsl<T>; /** Creates a let variable declaration (`let`). */
2187
- let: (name?: _hey_api_codegen_core0.NodeName | undefined) => VarTsDsl; /** Creates a literal value (e.g. string, number, boolean). */
2308
+ let: (name?: NodeName | undefined) => VarTsDsl; /** Creates a literal value (e.g., string, number, boolean). */
2188
2309
  literal: (value: TsLiteralValue) => LiteralTsDsl; /** Creates an enum member declaration. */
2189
- member: (name: _hey_api_codegen_core0.NodeName, value?: ((string | number | ts.Expression | TsDsl<ts.Expression>) | ((m: EnumMemberTsDsl) => void)) | undefined) => EnumMemberTsDsl; /** Creates a method declaration inside a class or object. */
2190
- method: (name: _hey_api_codegen_core0.NodeName, fn?: ((m: MethodTsDsl) => void) | undefined) => MethodTsDsl; /** Creates a negation expression (`-x`). */
2191
- neg: (expr?: string | ts.Expression | TsDsl<ts.Expression> | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl; /** Creates a new expression (e.g. `new ClassName()`). */
2310
+ member: (name: NodeName, value?: ((string | number | ts.Expression | TsDsl<ts.Expression>) | ((m: EnumMemberTsDsl) => void)) | undefined) => EnumMemberTsDsl; /** Creates a method declaration inside a class or object. */
2311
+ method: (name: NodeName, fn?: ((m: MethodTsDsl) => void) | undefined) => MethodTsDsl; /** Creates a negation expression (`-x`). */
2312
+ neg: (expr?: PrefixExpr | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl; /** Creates a new expression (e.g., `new ClassName()`). */
2192
2313
  new: (expr: NewExpr, ...args: (NewExpr | undefined)[]) => NewTsDsl; /** Creates a newline (for formatting purposes). */
2193
2314
  newline: () => NewlineTsDsl; /** Creates a logical NOT expression (`!x`). */
2194
- not: (expr?: string | ts.Expression | TsDsl<ts.Expression> | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl; /** Creates a block comment (/* ... *\/). */
2315
+ not: (expr?: PrefixExpr | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl; /** Creates a block comment (/* ... *\/). */
2195
2316
  note: (lines?: NoteLines | undefined, fn?: NoteFn | undefined) => NoteTsDsl; /** Creates an object literal expression. */
2196
2317
  object: (...args: ConstructorParameters<typeof ObjectTsDsl>) => ObjectTsDsl; /** Creates a parameter declaration for functions or methods. */
2197
2318
  param: (name: ParamName, fn?: ParamFn | undefined) => ParamTsDsl; /** Creates a pattern for destructuring or matching. */
2198
- pattern: () => PatternTsDsl; /** Creates a prefix unary expression (e.g. `-x`, `!x`, `~x`). */
2199
- prefix: (expr?: string | ts.Expression | TsDsl<ts.Expression> | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl; /** Creates an object literal property (e.g. `{ foo: bar }`). */
2319
+ pattern: () => PatternTsDsl; /** Creates a prefix unary expression (e.g., `-x`, `!x`, `~x`). */
2320
+ prefix: (expr?: PrefixExpr | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl; /** Creates an object literal property (e.g., `{ foo: bar }`). */
2200
2321
  prop: (meta: {
2201
2322
  kind: "computed";
2202
2323
  name: string;
2203
2324
  } | {
2204
2325
  kind: "getter";
2205
2326
  name: string;
2327
+ } | {
2328
+ kind: "method";
2329
+ name: string;
2206
2330
  } | {
2207
2331
  kind: "prop";
2208
2332
  name: string;
@@ -2212,36 +2336,38 @@ declare const $: ((id: ts.Expression | TsDsl<ts.Expression> | _hey_api_codegen_c
2212
2336
  } | {
2213
2337
  kind: "spread";
2214
2338
  name?: undefined;
2215
- }) => ObjectPropTsDsl; /** Creates a regular expression literal (e.g. `/foo/gi`). */
2339
+ }) => ObjectPropTsDsl; /** Creates a regular expression literal (e.g., `/foo/gi`). */
2216
2340
  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; /** Creates a return statement. */
2217
2341
  return: (expr?: ReturnExpr | undefined) => ReturnTsDsl; /** Creates a setter method declaration. */
2218
- setter: (name: _hey_api_codegen_core0.NodeName, fn?: ((s: SetterTsDsl) => void) | undefined) => SetterTsDsl; /** Wraps an expression or statement-like value into a `StmtTsDsl`. */
2342
+ setter: (name: NodeName, fn?: ((s: SetterTsDsl) => void) | undefined) => SetterTsDsl; /** Creates a spread element from an expression (e.g., `...expr`). */
2343
+ spread: (expr: SpreadExpr) => SpreadTsDsl; /** Wraps an expression or statement-like value into a `StmtTsDsl`. */
2219
2344
  stmt: (inner: ts.Expression | ts.Statement | TsDsl<any>) => StmtTsDsl; /** Creates a template literal expression. */
2220
2345
  template: (value?: TemplatePart | undefined) => TemplateTsDsl; /** Creates a ternary conditional expression (if ? then : else). */
2221
2346
  ternary: (condition?: string | ts.Expression | TsDsl<ts.Expression> | undefined) => TernaryTsDsl; /** Creates a throw statement. */
2222
- throw: (error: string | ts.Expression | TsDsl<ts.Expression>, useNew?: boolean | undefined) => ThrowTsDsl; /** Creates a syntax token (e.g. `?`, `readonly`, `+`, `-`). */
2347
+ throw: (error: string | ts.Expression | TsDsl<ts.Expression>, useNew?: boolean | undefined) => ThrowTsDsl; /** Creates a syntax token (e.g., `?`, `readonly`, `+`, `-`). */
2223
2348
  token: () => TokenTsDsl<never>; /** Creates a try/catch/finally statement. */
2224
- try: (...args: ConstructorParameters<typeof TryTsDsl>) => TryTsDsl; /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */
2225
- type: ((name: _hey_api_codegen_core0.NodeName, fn?: TypeExprFn | undefined) => TypeExprTsDsl) & {
2226
- /** Creates a type alias declaration (e.g. `type Foo = Bar`). */alias: (name: _hey_api_codegen_core0.NodeName, fn?: ((t: TypeAliasTsDsl) => void) | undefined) => TypeAliasTsDsl; /** Creates an intersection type (e.g. `A & B`). */
2227
- and: (...args: ConstructorParameters<typeof TypeAndTsDsl>) => TypeAndTsDsl; /** Creates a qualified type reference (e.g. Foo.Bar). */
2228
- attr: (right: _hey_api_codegen_core0.NodeName | ts.Identifier) => TypeAttrTsDsl; /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */
2229
- expr: (name: _hey_api_codegen_core0.NodeName, fn?: TypeExprFn | undefined) => TypeExprTsDsl; /** Converts a runtime value into a corresponding type expression node. */
2230
- fromValue: (input: unknown) => TsDsl<ts.TypeNode>; /** Creates a function type node (e.g. `(a: string) => number`). */
2231
- func: (...args: ConstructorParameters<typeof TypeFuncTsDsl>) => TypeFuncTsDsl; /** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
2232
- idx: (base: string | ts.TypeNode | TsDsl<ts.TypeNode>, index: string | number | ts.TypeNode | TsDsl<ts.TypeNode>) => TypeIdxTsDsl; /** Creates a literal type node (e.g. 'foo', 42, or true). */
2233
- literal: (value: TsLiteralValue) => TypeLiteralTsDsl; /** Creates a mapped type (e.g. `{ [K in keyof T]: U }`). */
2234
- mapped: (name?: _hey_api_codegen_core0.NodeName | undefined) => TypeMappedTsDsl; /** Creates a type literal node (e.g. { foo: string }). */
2235
- object: () => TypeObjectTsDsl; /** Creates a type operator node (e.g. `readonly T`, `keyof T`, `unique T`). */
2236
- operator: () => TypeOperatorTsDsl; /** Represents a union type (e.g. `A | B | C`). */
2237
- or: (...args: ConstructorParameters<typeof TypeOrTsDsl>) => TypeOrTsDsl; /** Creates a type parameter (e.g. `<T>`). */
2238
- param: (name?: _hey_api_codegen_core0.NodeName | undefined, fn?: ((name: TypeParamTsDsl) => void) | undefined) => TypeParamTsDsl; /** Creates a type query node (e.g. `typeof Foo`). */
2239
- query: (expr: TypeQueryExpr) => TypeQueryTsDsl; /** Builds a TypeScript template literal *type* (e.g. `${Foo}-${Bar}` as a type). */
2240
- template: (value?: string | ts.TypeNode | TsDsl<ts.TypeNode> | undefined) => TypeTemplateTsDsl; /** Creates a tuple type (e.g. [A, B, C]). */
2241
- tuple: (...args: ConstructorParameters<typeof TypeTupleTsDsl>) => TypeTupleTsDsl;
2242
- }; /** Creates a `typeof` expression (e.g. `typeof value`). */
2349
+ try: (...args: ConstructorParameters<typeof TryTsDsl>) => TryTsDsl; /** Creates a basic type reference or type expression (e.g., Foo or Foo<T>). */
2350
+ type: ((name: NodeName, fn?: TypeExprFn | undefined) => TypeExprTsDsl) & {
2351
+ /** Creates a type alias declaration (e.g., `type Foo = Bar`). */alias: (name: NodeName, fn?: ((t: TypeAliasTsDsl) => void) | undefined) => TypeAliasTsDsl; /** Creates an intersection type (e.g., `A & B`). */
2352
+ and: (...args: ConstructorParameters<typeof TypeAndTsDsl>) => TypeAndTsDsl; /** Creates a qualified type reference (e.g., Foo.Bar). */
2353
+ attr: (right: NodeName | ts.Identifier) => TypeAttrTsDsl; /** Creates a basic type reference or type expression (e.g., Foo or Foo<T>). */
2354
+ expr: (name: NodeName, fn?: TypeExprFn | undefined) => TypeExprTsDsl; /** Converts a runtime value into a corresponding type expression node. */
2355
+ fromValue: (input: unknown) => TsDsl<ts.TypeNode>; /** Creates a function type node (e.g., `(a: string) => number`). */
2356
+ func: (...args: ConstructorParameters<typeof TypeFuncTsDsl>) => TypeFuncTsDsl; /** Creates an indexed-access type (e.g., `Foo<T>[K]`). */
2357
+ idx: (base: string | ts.TypeNode | TsDsl<ts.TypeNode>, index: string | number | ts.TypeNode | TsDsl<ts.TypeNode>) => TypeIdxTsDsl; /** Creates a literal type node (e.g., 'foo', 42, or true). */
2358
+ literal: (value: TsLiteralValue) => TypeLiteralTsDsl; /** Creates a mapped type (e.g., `{ [K in keyof T]: U }`). */
2359
+ mapped: (name?: NodeName | undefined) => TypeMappedTsDsl; /** Creates a type literal node (e.g., { foo: string }). */
2360
+ object: () => TypeObjectTsDsl; /** Creates a type operator node (e.g., `readonly T`, `keyof T`, `unique T`). */
2361
+ operator: () => TypeOperatorTsDsl; /** Represents a union type (e.g., `A | B | C`). */
2362
+ or: (...args: ConstructorParameters<typeof TypeOrTsDsl>) => TypeOrTsDsl; /** Creates a type parameter (e.g., `<T>`). */
2363
+ param: (name?: NodeName | undefined, fn?: ((name: TypeParamTsDsl) => void) | undefined) => TypeParamTsDsl; /** Creates a type query node (e.g., `typeof Foo`). */
2364
+ query: (expr: TypeQueryExpr) => TypeQueryTsDsl; /** Builds a TypeScript template literal *type* (e.g., `${Foo}-${Bar}` as a type). */
2365
+ template: (value?: string | ts.TypeNode | TsDsl<ts.TypeNode> | undefined) => TypeTemplateTsDsl; /** Creates a tuple type (e.g., [A, B, C]). */
2366
+ tuple: (...args: ConstructorParameters<typeof TypeTupleTsDsl>) => TypeTupleTsDsl; /** Creates a named tuple element (e.g., `[resolver?: R]`). */
2367
+ tupleMember: (name: NodeName) => TypeTupleMemberTsDsl;
2368
+ }; /** Creates a `typeof` expression (e.g., `typeof value`). */
2243
2369
  typeofExpr: (expr: TypeOfExpr) => TypeOfExprTsDsl; /** Creates a variable declaration (`var`). */
2244
- var: (name?: _hey_api_codegen_core0.NodeName | undefined) => VarTsDsl;
2370
+ var: (name?: NodeName | undefined) => VarTsDsl;
2245
2371
  };
2246
2372
  type DollarTsDsl = {
2247
2373
  /**
@@ -2342,22 +2468,9 @@ type UserConfig$26 = Plugin$1.Name<'@faker-js/faker'> & Plugin$1.Hooks & Plugin$
2342
2468
  seed?: number;
2343
2469
  };
2344
2470
  type Config$23 = Plugin$1.Name<'@faker-js/faker'> & Plugin$1.Hooks & Plugin$1.Exports & {
2345
- /**
2346
- * Casing convention for generated names.
2347
- */
2348
- case: Casing;
2349
- /**
2350
- * Configuration for reusable schema definitions.
2351
- */
2352
- definitions: NamingOptions & FeatureToggle;
2353
- /**
2354
- * Faker locale for generated data.
2355
- */
2356
- locale: string;
2357
- /**
2358
- * Seed for deterministic output. When set, Faker will produce
2359
- * the same values across runs.
2360
- */
2471
+ /** Casing convention for generated names. */case: Casing; /** Configuration for reusable schema definitions. */
2472
+ definitions: NamingOptions & FeatureToggle; /** Faker locale for generated data. */
2473
+ locale: string; /** Seed for deterministic output. */
2361
2474
  seed?: number;
2362
2475
  };
2363
2476
  type FakerJsFakerPlugin = DefinePlugin$1<UserConfig$26, Config$23, IApi$4>;
@@ -2510,7 +2623,7 @@ interface Config$22 {
2510
2623
  requestValidator?: (data: unknown) => Promise<unknown>;
2511
2624
  /**
2512
2625
  * A function transforming response data before it's returned. This is useful
2513
- * for post-processing data, e.g. converting ISO strings into Date objects.
2626
+ * for post-processing data, e.g., converting ISO strings into Date objects.
2514
2627
  */
2515
2628
  responseTransformer?: (data: unknown) => Promise<unknown>;
2516
2629
  /**
@@ -2690,7 +2803,7 @@ interface ClientOptions$6 {
2690
2803
  throwOnError?: boolean;
2691
2804
  }
2692
2805
  type MethodFn$6 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$3 = 'fields'>(options: Omit<RequestOptions$6<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult$6<TData, TError, ThrowOnError, TResponseStyle>;
2693
- type SseFn$6 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$3 = 'fields'>(options: Omit<RequestOptions$6<TData, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
2806
+ type SseFn$6 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$3 = 'fields'>(options: Omit<RequestOptions$6<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
2694
2807
  type RequestFn$6 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$3 = 'fields'>(options: Omit<RequestOptions$6<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions$6<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult$6<TData, TError, ThrowOnError, TResponseStyle>;
2695
2808
  type RequestOptionsFn = <T, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$3 = 'fields'>(options: RequestOptions$6<T, TResponseStyle, ThrowOnError>) => HttpRequest<T>;
2696
2809
  type BuildUrlFn$6 = <TData extends {
@@ -2698,20 +2811,20 @@ type BuildUrlFn$6 = <TData extends {
2698
2811
  path?: Record<string, unknown>;
2699
2812
  query?: Record<string, unknown>;
2700
2813
  url: string;
2701
- }>(options: TData & Options$7<TData>) => string;
2814
+ }>(options: TData & Options$6<TData>) => string;
2702
2815
  type Client$7 = Client$8<RequestFn$6, Config$21, MethodFn$6, BuildUrlFn$6, SseFn$6> & {
2703
2816
  interceptors: Middleware$4<HttpRequest<unknown>, HttpResponse<unknown>, unknown, ResolvedRequestOptions$4>;
2704
2817
  requestOptions: RequestOptionsFn;
2705
2818
  };
2706
- interface TDataShape$6 {
2819
+ interface TDataShape$5 {
2707
2820
  body?: unknown;
2708
2821
  headers?: unknown;
2709
2822
  path?: unknown;
2710
2823
  query?: unknown;
2711
2824
  url: string;
2712
2825
  }
2713
- type OmitKeys$6<T, K> = Pick<T, Exclude<keyof T, K>>;
2714
- type Options$7<TData extends TDataShape$6 = TDataShape$6, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle$3 = 'fields'> = OmitKeys$6<RequestOptions$6<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
2826
+ type OmitKeys$5<T, K> = Pick<T, Exclude<keyof T, K>>;
2827
+ type Options$6<TData extends TDataShape$5 = TDataShape$5, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle$3 = 'fields'> = OmitKeys$5<RequestOptions$6<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
2715
2828
  //#endregion
2716
2829
  //#region src/plugins/@hey-api/client-axios/bundle/types.d.ts
2717
2830
  interface Config$20<T extends ClientOptions$5 = ClientOptions$5> extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, Config$22 {
@@ -2768,26 +2881,16 @@ type RequestResult$5<TData = unknown, TError = unknown, ThrowOnError extends boo
2768
2881
  error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
2769
2882
  })>;
2770
2883
  type MethodFn$5 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$5<TData, ThrowOnError>, 'method'>) => RequestResult$5<TData, TError, ThrowOnError>;
2771
- type SseFn$5 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$5<TData, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
2884
+ type SseFn$5 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$5<never, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
2772
2885
  type RequestFn$5 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$5<TData, ThrowOnError>, 'method'> & Pick<Required<RequestOptions$5<TData, ThrowOnError>>, 'method'>) => RequestResult$5<TData, TError, ThrowOnError>;
2773
2886
  type BuildUrlFn$5 = <TData extends {
2774
- body?: unknown;
2775
2887
  path?: Record<string, unknown>;
2776
2888
  query?: Record<string, unknown>;
2777
2889
  url: string;
2778
- }>(options: TData & Options$6<TData>) => string;
2890
+ }>(options: TData & Pick<RequestOptions$5<unknown, boolean>, 'axios' | 'baseURL' | 'paramsSerializer' | 'querySerializer'>) => string;
2779
2891
  type Client$6 = Client$8<RequestFn$5, Config$20, MethodFn$5, BuildUrlFn$5, SseFn$5> & {
2780
2892
  instance: AxiosInstance;
2781
2893
  };
2782
- interface TDataShape$5 {
2783
- body?: unknown;
2784
- headers?: unknown;
2785
- path?: unknown;
2786
- query?: unknown;
2787
- url: string;
2788
- }
2789
- type OmitKeys$5<T, K> = Pick<T, Exclude<keyof T, K>>;
2790
- type Options$6<TData extends TDataShape$5 = TDataShape$5, ThrowOnError extends boolean = boolean, TResponse = unknown> = OmitKeys$5<RequestOptions$5<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
2791
2894
  //#endregion
2792
2895
  //#region src/plugins/@hey-api/client-axios/types.d.ts
2793
2896
  type UserConfig$25 = Plugin$1.Name<'@hey-api/client-axios'> & Client.Config & {
@@ -2903,7 +3006,7 @@ interface ClientOptions$4 {
2903
3006
  throwOnError?: boolean;
2904
3007
  }
2905
3008
  type MethodFn$4 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$2 = 'fields'>(options: Omit<RequestOptions$4<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult$4<TData, TError, ThrowOnError, TResponseStyle>;
2906
- type SseFn$4 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$2 = 'fields'>(options: Omit<RequestOptions$4<TData, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
3009
+ type SseFn$4 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$2 = 'fields'>(options: Omit<RequestOptions$4<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
2907
3010
  type RequestFn$4 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$2 = 'fields'>(options: Omit<RequestOptions$4<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions$4<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult$4<TData, TError, ThrowOnError, TResponseStyle>;
2908
3011
  type BuildUrlFn$4 = <TData extends {
2909
3012
  body?: unknown;
@@ -3020,7 +3123,7 @@ interface ClientOptions$3 {
3020
3123
  throwOnError?: boolean;
3021
3124
  }
3022
3125
  type MethodFn$3 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$3<TData, ThrowOnError>, 'method'>) => RequestResult$3<TData, TError, ThrowOnError>;
3023
- type SseFn$3 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$3<TData, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
3126
+ type SseFn$3 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$3<never, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
3024
3127
  type RequestFn$3 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$3<TData, ThrowOnError>, 'method'> & Pick<Required<RequestOptions$3<TData, ThrowOnError>>, 'method'>) => RequestResult$3<TData, TError, ThrowOnError>;
3025
3128
  type BuildUrlFn$3 = <TData extends {
3026
3129
  body?: unknown;
@@ -3287,7 +3390,7 @@ interface ClientOptions$1 {
3287
3390
  throwOnError?: boolean;
3288
3391
  }
3289
3392
  type MethodFn$1 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$1 = 'fields'>(options: Omit<RequestOptions$1<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult$1<TData, TError, ThrowOnError, TResponseStyle>;
3290
- type SseFn$1 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$1 = 'fields'>(options: Omit<RequestOptions$1<TData, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
3393
+ type SseFn$1 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$1 = 'fields'>(options: Omit<RequestOptions$1<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
3291
3394
  type RequestFn$1 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$1 = 'fields'>(options: Omit<RequestOptions$1<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions$1<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult$1<TData, TError, ThrowOnError, TResponseStyle>;
3292
3395
  type BuildUrlFn$1 = <TData extends {
3293
3396
  body?: unknown;
@@ -3519,7 +3622,7 @@ interface ClientOptions {
3519
3622
  throwOnError?: boolean;
3520
3623
  }
3521
3624
  type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
3522
- type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
3625
+ type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
3523
3626
  type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
3524
3627
  type BuildUrlFn = <TData extends {
3525
3628
  body?: unknown;
@@ -3555,12 +3658,12 @@ type HeyApiClientKyPlugin = DefinePlugin$1<UserConfig$19, UserConfig$19>;
3555
3658
  type UserConfig$18 = Plugin$1.Name<'@hey-api/schemas'> & Plugin$1.Hooks & Plugin$1.UserExports & {
3556
3659
  /**
3557
3660
  * Customise the schema name. By default, `{{name}}Schema` is used. `name` is a
3558
- * valid JavaScript/TypeScript identifier, e.g. if your schema name is
3661
+ * valid JavaScript/TypeScript identifier, e.g., if your schema name is
3559
3662
  * "Foo-Bar", `name` value would be "FooBar".
3560
3663
  *
3561
3664
  * @default '{{name}}Schema'
3562
3665
  */
3563
- nameBuilder?: string | ((name: string, schema: OpenApiV2_0_XTypes['SchemaObject'] | OpenApiV3_0_XTypes['ReferenceObject'] | OpenApiV3_0_XTypes['SchemaObject'] | OpenApiV3_1_XTypes['SchemaObject']) => string);
3666
+ nameBuilder?: string | ((name: string, schema: OpenAPIV2.SchemaObject | OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject | OpenAPIV3_1.SchemaObject) => string);
3564
3667
  /**
3565
3668
  * Choose schema type to generate. Select 'form' if you don't want
3566
3669
  * descriptions to reduce bundle size and you plan to use schemas
@@ -3768,7 +3871,7 @@ type UserConfig$17 = Plugin$1.Name<'@hey-api/sdk'> & Plugin$1.Hooks & Plugin$1.U
3768
3871
  client?: PluginClientNames | boolean;
3769
3872
  /**
3770
3873
  * Generate code examples for SDK operations and attach them to the
3771
- * input source (e.g. via `x-codeSamples`).
3874
+ * input source (e.g., via `x-codeSamples`).
3772
3875
  *
3773
3876
  * Set to `false` to disable example generation entirely, or provide an
3774
3877
  * object for fine-grained control over the output and post-processing.
@@ -7593,13 +7696,13 @@ type TanStackVueQueryPlugin = DefinePlugin$1<UserConfig$8, Config$5>;
7593
7696
  //#endregion
7594
7697
  //#region src/plugins/arktype/shared/types.d.ts
7595
7698
  type ValidatorArgs$2 = {
7596
- operation: IR$1.OperationObject;
7699
+ operation: IR$1.OperationObject; /** The plugin instance. */
7597
7700
  plugin: ArktypePlugin['Instance'];
7598
7701
  };
7599
7702
  //#endregion
7600
7703
  //#region src/plugins/arktype/api.d.ts
7601
7704
  type IApi$2 = {
7602
- createRequestValidator: (args: ValidatorArgs$2) => ReturnType<typeof $.func> | undefined;
7705
+ createRequestValidator: (args: RequestSchemaContext<ArktypePlugin['Instance']>) => ReturnType<typeof $.func> | undefined;
7603
7706
  createResponseValidator: (args: ValidatorArgs$2) => ReturnType<typeof $.func> | undefined;
7604
7707
  };
7605
7708
  //#endregion
@@ -8690,7 +8793,8 @@ interface ValibotFinal extends Pick<ValibotResult, 'pipes'> {
8690
8793
  //#endregion
8691
8794
  //#region src/plugins/valibot/api.d.ts
8692
8795
  type IApi$1 = {
8693
- createRequestValidator: (args: ValidatorArgs$1) => ReturnType<typeof $.func> | undefined;
8796
+ createRequestSchema: (ctx: RequestSchemaContext<ValibotPlugin['Instance']>) => Symbol | Pipe | undefined;
8797
+ createRequestValidator: (args: RequestSchemaContext<ValibotPlugin['Instance']>) => ReturnType<typeof $.func> | undefined;
8694
8798
  createResponseValidator: (args: ValidatorArgs$1) => ReturnType<typeof $.func> | undefined;
8695
8799
  };
8696
8800
  //#endregion
@@ -8819,23 +8923,21 @@ type ValibotResolvers = Plugin$1.Resolvers<{
8819
8923
  *
8820
8924
  * Allow customization of validator function bodies.
8821
8925
  *
8822
- * Example path: `~resolvers.validator.request` or `~resolvers.validator.response`
8823
- *
8824
8926
  * Returning `undefined` will execute the default resolver logic.
8825
8927
  */
8826
- validator?: ValidatorResolver$1 | {
8928
+ validator?: ((ctx: ValidatorResolverContext$1) => PipeResult | null | undefined) | {
8827
8929
  /**
8828
8930
  * Controls how the request validator function body is generated.
8829
8931
  *
8830
8932
  * Returning `undefined` will execute the default resolver logic.
8831
8933
  */
8832
- request?: ValidatorResolver$1;
8934
+ request?: (ctx: RequestValidatorResolverContext$1) => PipeResult | null | undefined;
8833
8935
  /**
8834
8936
  * Controls how the response validator function body is generated.
8835
8937
  *
8836
8938
  * Returning `undefined` will execute the default resolver logic.
8837
8939
  */
8838
- response?: ValidatorResolver$1;
8940
+ response?: (ctx: ResponseValidatorResolverContext$1) => PipeResult | null | undefined;
8839
8941
  };
8840
8942
  /**
8841
8943
  * Resolver for void schemas.
@@ -8846,7 +8948,6 @@ type ValibotResolvers = Plugin$1.Resolvers<{
8846
8948
  */
8847
8949
  void?: (ctx: VoidResolverContext$1) => PipeResult;
8848
8950
  }>;
8849
- type ValidatorResolver$1 = (ctx: ValidatorResolverContext$1) => PipeResult | null | undefined;
8850
8951
  interface BaseContext$1 extends DollarTsDsl {
8851
8952
  /**
8852
8953
  * Functions for working with pipes.
@@ -9056,15 +9157,61 @@ interface UnknownResolverContext$1 extends BaseContext$1 {
9056
9157
  };
9057
9158
  schema: SchemaWithType<'unknown'>;
9058
9159
  }
9059
- interface ValidatorResolverContext$1 extends BaseContext$1 {
9160
+ interface RequestValidatorResolverContext$1 extends BaseContext$1, RequestSchemaContext<ValibotPlugin['Instance']> {
9161
+ /**
9162
+ * Nodes used to build different parts of the result.
9163
+ */
9164
+ nodes: {
9165
+ /**
9166
+ * Returns the composite schema combining all layers.
9167
+ *
9168
+ * Returns `undefined` if all layers are omitted.
9169
+ */
9170
+ composite: (ctx: RequestValidatorResolverContext$1) => Pipe | undefined;
9171
+ /**
9172
+ * Returns an empty/fallback schema for a layer based on its `whenEmpty` config.
9173
+ *
9174
+ * @throws if `whenEmpty` is `'omit'` (no schema should be generated)
9175
+ */
9176
+ empty: (ctx: RequestValidatorResolverContext$1 & {
9177
+ /** Resolved configuration for the request layer. */layer: ResolvedRequestValidatorLayer;
9178
+ }) => Pipe;
9179
+ /**
9180
+ * Returns an optional schema based on the layer's config.
9181
+ */
9182
+ optional: (ctx: RequestValidatorResolverContext$1 & {
9183
+ /** Resolved configuration for the request layer. */layer: ResolvedRequestValidatorLayer; /** The schema to conditionally wrap. */
9184
+ schema: Pipe;
9185
+ }) => Pipe;
9186
+ };
9187
+ /**
9188
+ * Provides access to commonly used symbols within the plugin.
9189
+ */
9190
+ symbols: BaseContext$1['symbols'] & {
9191
+ /**
9192
+ * The schema to use in the validator body.
9193
+ *
9194
+ * This is either:
9195
+ * - an inline AST expression
9196
+ * - a Symbol reference to a named export
9197
+ */
9198
+ schema: Symbol | Pipe;
9199
+ };
9200
+ }
9201
+ interface ResponseValidatorResolverContext$1 extends BaseContext$1 {
9202
+ /** The operation being processed. */
9060
9203
  operation: IR$1.OperationObject;
9061
9204
  /**
9062
9205
  * Provides access to commonly used symbols within the plugin.
9063
9206
  */
9064
9207
  symbols: BaseContext$1['symbols'] & {
9208
+ /**
9209
+ * The response schema symbol.
9210
+ */
9065
9211
  schema: Symbol;
9066
9212
  };
9067
9213
  }
9214
+ type ValidatorResolverContext$1 = RequestValidatorResolverContext$1 | ResponseValidatorResolverContext$1;
9068
9215
  interface VoidResolverContext$1 extends BaseContext$1 {
9069
9216
  /**
9070
9217
  * Nodes used to build different parts of the result.
@@ -9150,6 +9297,36 @@ type UserConfig$2 = Plugin$1.Name<'valibot'> & Plugin$1.Hooks & Plugin$1.UserCom
9150
9297
  * @default true
9151
9298
  */
9152
9299
  requests?: boolean | NameTransformer | {
9300
+ /**
9301
+ * Configuration for request body Valibot schemas.
9302
+ *
9303
+ * Can be:
9304
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9305
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9306
+ * - `object`: Full configuration object
9307
+ *
9308
+ * @default true
9309
+ */
9310
+ body?: boolean | NameTransformer | {
9311
+ /**
9312
+ * Casing convention for generated names.
9313
+ *
9314
+ * @default 'camelCase'
9315
+ */
9316
+ case?: Casing;
9317
+ /**
9318
+ * Whether this feature is enabled.
9319
+ *
9320
+ * @default true
9321
+ */
9322
+ enabled?: boolean;
9323
+ /**
9324
+ * Naming pattern for generated names.
9325
+ *
9326
+ * @default 'v{{name}}Body'
9327
+ */
9328
+ name?: NameTransformer;
9329
+ };
9153
9330
  /**
9154
9331
  * Casing convention for generated names.
9155
9332
  *
@@ -9162,12 +9339,128 @@ type UserConfig$2 = Plugin$1.Name<'valibot'> & Plugin$1.Hooks & Plugin$1.UserCom
9162
9339
  * @default true
9163
9340
  */
9164
9341
  enabled?: boolean;
9342
+ /**
9343
+ * Configuration for request headers Valibot schemas.
9344
+ *
9345
+ * Can be:
9346
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9347
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9348
+ * - `object`: Full configuration object
9349
+ *
9350
+ * @default true
9351
+ */
9352
+ headers?: boolean | NameTransformer | {
9353
+ /**
9354
+ * Casing convention for generated names.
9355
+ *
9356
+ * @default 'camelCase'
9357
+ */
9358
+ case?: Casing;
9359
+ /**
9360
+ * Whether this feature is enabled.
9361
+ *
9362
+ * @default true
9363
+ */
9364
+ enabled?: boolean;
9365
+ /**
9366
+ * Naming pattern for generated names.
9367
+ *
9368
+ * @default 'v{{name}}Headers'
9369
+ */
9370
+ name?: NameTransformer;
9371
+ };
9165
9372
  /**
9166
9373
  * Naming pattern for generated names.
9167
9374
  *
9168
9375
  * @default 'v{{name}}Data'
9169
9376
  */
9170
9377
  name?: NameTransformer;
9378
+ /**
9379
+ * Configuration for request path parameters Valibot schemas.
9380
+ *
9381
+ * Can be:
9382
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9383
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9384
+ * - `object`: Full configuration object
9385
+ *
9386
+ * @default true
9387
+ */
9388
+ path?: boolean | NameTransformer | {
9389
+ /**
9390
+ * Casing convention for generated names.
9391
+ *
9392
+ * @default 'camelCase'
9393
+ */
9394
+ case?: Casing;
9395
+ /**
9396
+ * Whether this feature is enabled.
9397
+ *
9398
+ * @default true
9399
+ */
9400
+ enabled?: boolean;
9401
+ /**
9402
+ * Naming pattern for generated names.
9403
+ *
9404
+ * @default 'v{{name}}Path'
9405
+ */
9406
+ name?: NameTransformer;
9407
+ };
9408
+ /**
9409
+ * Configuration for request query parameters Valibot schemas.
9410
+ *
9411
+ * Can be:
9412
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
9413
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
9414
+ * - `object`: Full configuration object
9415
+ *
9416
+ * @default true
9417
+ */
9418
+ query?: boolean | NameTransformer | {
9419
+ /**
9420
+ * Casing convention for generated names.
9421
+ *
9422
+ * @default 'camelCase'
9423
+ */
9424
+ case?: Casing;
9425
+ /**
9426
+ * Whether this feature is enabled.
9427
+ *
9428
+ * @default true
9429
+ */
9430
+ enabled?: boolean;
9431
+ /**
9432
+ * Naming pattern for generated names.
9433
+ *
9434
+ * @default 'v{{name}}Query'
9435
+ */
9436
+ name?: NameTransformer;
9437
+ };
9438
+ /**
9439
+ * Whether to extract the request schema into a named export.
9440
+ *
9441
+ * When `true`, generates a reusable schema like `vProjectListData`.
9442
+ * When `false`, the schema is built inline within the caller plugin.
9443
+ *
9444
+ * Can be a boolean or a function for per-operation control.
9445
+ *
9446
+ * @default false
9447
+ * @example
9448
+ * ```ts
9449
+ * // Always extract
9450
+ * shouldExtract: true
9451
+ *
9452
+ * // Extract only for operations with complex request bodies
9453
+ * shouldExtract: ({ operation }) =>
9454
+ * operation.body !== undefined && operation.parameters !== undefined
9455
+ *
9456
+ * // Extract based on custom extension
9457
+ * shouldExtract: ({ operation }) =>
9458
+ * operation['x-custom']?.extractRequestSchema === true
9459
+ * ```
9460
+ */
9461
+ shouldExtract?: MaybeFunc<(ctx: {
9462
+ /** The operation being processed */operation: IR$1.OperationObject;
9463
+ }) => boolean>;
9171
9464
  };
9172
9465
  /**
9173
9466
  * Configuration for response-specific Valibot schemas.
@@ -9242,7 +9535,15 @@ type Config$1 = Plugin$1.Name<'valibot'> & Plugin$1.Hooks & Plugin$1.Comments &
9242
9535
  node: ReturnType<typeof $.object>;
9243
9536
  schema: IR$1.SchemaObject;
9244
9537
  }) => void); /** Configuration for request-specific Valibot schemas. */
9245
- requests: NamingOptions & FeatureToggle; /** Configuration for response-specific Valibot schemas. */
9538
+ requests: NamingOptions & FeatureToggle & {
9539
+ /** Configuration for request body Valibot schemas. */body: NamingOptions & FeatureToggle; /** Configuration for request headers Valibot schemas. */
9540
+ headers: NamingOptions & FeatureToggle; /** Configuration for request path parameters Valibot schemas. */
9541
+ path: NamingOptions & FeatureToggle; /** Configuration for request query parameters Valibot schemas. */
9542
+ query: NamingOptions & FeatureToggle; /** Whether to extract the request schema into a named export. */
9543
+ shouldExtract: (ctx: {
9544
+ /** The operation being processed */operation: IR$1.OperationObject;
9545
+ }) => boolean;
9546
+ }; /** Configuration for response-specific Valibot schemas. */
9246
9547
  responses: NamingOptions & FeatureToggle; /** Configuration for webhook-specific Valibot schemas. */
9247
9548
  webhooks: NamingOptions & FeatureToggle;
9248
9549
  };
@@ -9298,8 +9599,9 @@ interface ZodFinal extends Pick<ZodResult, 'expression'> {
9298
9599
  //#endregion
9299
9600
  //#region src/plugins/zod/api.d.ts
9300
9601
  type IApi = {
9301
- createRequestValidator: (args: ValidatorArgs) => ReturnType<typeof $.func> | undefined;
9302
- createResponseValidator: (args: ValidatorArgs) => ReturnType<typeof $.func> | undefined;
9602
+ createRequestSchema: (ctx: RequestSchemaContext<ZodPlugin['Instance']>) => Symbol | Chain | undefined;
9603
+ createRequestValidator: (ctx: RequestSchemaContext<ZodPlugin['Instance']>) => ReturnType<typeof $.func> | undefined;
9604
+ createResponseValidator: (ctx: ValidatorArgs) => ReturnType<typeof $.func> | undefined;
9303
9605
  };
9304
9606
  //#endregion
9305
9607
  //#region src/plugins/zod/resolvers.d.ts
@@ -9413,23 +9715,21 @@ type ZodResolvers = Plugin$1.Resolvers<{
9413
9715
  *
9414
9716
  * Allow customization of validator function bodies.
9415
9717
  *
9416
- * Example path: `~resolvers.validator.request` or `~resolvers.validator.response`
9417
- *
9418
9718
  * Returning `undefined` will execute the default resolver logic.
9419
9719
  */
9420
- validator?: ValidatorResolver | {
9720
+ validator?: ((ctx: ValidatorResolverContext) => MaybeArray<TsDsl<ts.Statement>> | null | undefined) | {
9421
9721
  /**
9422
9722
  * Controls how the request validator function body is generated.
9423
9723
  *
9424
9724
  * Returning `undefined` will execute the default resolver logic.
9425
9725
  */
9426
- request?: ValidatorResolver;
9726
+ request?: (ctx: RequestValidatorResolverContext) => MaybeArray<TsDsl<ts.Statement>> | null | undefined;
9427
9727
  /**
9428
9728
  * Controls how the response validator function body is generated.
9429
9729
  *
9430
9730
  * Returning `undefined` will execute the default resolver logic.
9431
9731
  */
9432
- response?: ValidatorResolver;
9732
+ response?: (ctx: ResponseValidatorResolverContext) => MaybeArray<TsDsl<ts.Statement>> | null | undefined;
9433
9733
  };
9434
9734
  /**
9435
9735
  * Resolver for void schemas.
@@ -9440,7 +9740,6 @@ type ZodResolvers = Plugin$1.Resolvers<{
9440
9740
  */
9441
9741
  void?: (ctx: VoidResolverContext) => ChainResult;
9442
9742
  }>;
9443
- type ValidatorResolver = (ctx: ValidatorResolverContext) => MaybeArray<TsDsl<ts.Statement>> | null | undefined;
9444
9743
  interface BaseContext extends DollarTsDsl {
9445
9744
  /**
9446
9745
  * Functions for working with chains.
@@ -9749,15 +10048,61 @@ interface UnknownResolverContext extends BaseContext {
9749
10048
  };
9750
10049
  schema: SchemaWithType<'unknown'>;
9751
10050
  }
9752
- interface ValidatorResolverContext extends BaseContext {
10051
+ interface RequestValidatorResolverContext extends BaseContext, RequestSchemaContext<ZodPlugin['Instance']> {
10052
+ /**
10053
+ * Nodes used to build different parts of the result.
10054
+ */
10055
+ nodes: {
10056
+ /**
10057
+ * Returns the composite schema combining all layers.
10058
+ *
10059
+ * Returns `undefined` if all layers are omitted.
10060
+ */
10061
+ composite: (ctx: RequestValidatorResolverContext) => Chain | undefined;
10062
+ /**
10063
+ * Returns an empty/fallback schema for a layer based on its `whenEmpty` config.
10064
+ *
10065
+ * @throws if `whenEmpty` is `'omit'` (no schema should be generated)
10066
+ */
10067
+ empty: (ctx: RequestValidatorResolverContext & {
10068
+ /** Resolved configuration for the request layer. */layer: ResolvedRequestValidatorLayer;
10069
+ }) => Chain;
10070
+ /**
10071
+ * Returns an optional schema based on the layer's config.
10072
+ */
10073
+ optional: (ctx: RequestValidatorResolverContext & {
10074
+ /** Resolved configuration for the request layer. */layer: ResolvedRequestValidatorLayer; /** The schema to conditionally wrap. */
10075
+ schema: Chain;
10076
+ }) => Chain;
10077
+ };
10078
+ /**
10079
+ * Provides access to commonly used symbols within the plugin.
10080
+ */
10081
+ symbols: BaseContext['symbols'] & {
10082
+ /**
10083
+ * The schema to use in the validator body.
10084
+ *
10085
+ * This is either:
10086
+ * - an inline AST expression
10087
+ * - a Symbol reference to a named export
10088
+ */
10089
+ schema: Symbol | Chain;
10090
+ };
10091
+ }
10092
+ interface ResponseValidatorResolverContext extends BaseContext {
10093
+ /** The operation being processed. */
9753
10094
  operation: IR$1.OperationObject;
9754
10095
  /**
9755
10096
  * Provides access to commonly used symbols within the plugin.
9756
10097
  */
9757
10098
  symbols: BaseContext['symbols'] & {
10099
+ /**
10100
+ * The response schema symbol.
10101
+ */
9758
10102
  schema: Symbol;
9759
10103
  };
9760
10104
  }
10105
+ type ValidatorResolverContext = RequestValidatorResolverContext | ResponseValidatorResolverContext;
9761
10106
  interface VoidResolverContext extends BaseContext {
9762
10107
  /**
9763
10108
  * Nodes used to build different parts of the result.
@@ -9910,7 +10255,7 @@ type UserConfig$1 = Plugin$1.Name<'zod'> & Plugin$1.Hooks & Plugin$1.UserComment
9910
10255
  /**
9911
10256
  * Configuration for request-specific Zod schemas.
9912
10257
  *
9913
- * Controls generation of Zod schemas for request bodies, query parameters, path
10258
+ * Controls generation of Zod schemas for request bodies, path parameters, query
9914
10259
  * parameters, and headers.
9915
10260
  *
9916
10261
  * Can be:
@@ -9921,6 +10266,73 @@ type UserConfig$1 = Plugin$1.Name<'zod'> & Plugin$1.Hooks & Plugin$1.UserComment
9921
10266
  * @default true
9922
10267
  */
9923
10268
  requests?: boolean | NameTransformer | {
10269
+ /**
10270
+ * Configuration for request body Zod schemas.
10271
+ *
10272
+ * Can be:
10273
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10274
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10275
+ * - `object`: Full configuration object
10276
+ *
10277
+ * @default true
10278
+ */
10279
+ body?: boolean | NameTransformer | {
10280
+ /**
10281
+ * Casing convention for generated names.
10282
+ *
10283
+ * @default 'camelCase'
10284
+ */
10285
+ case?: Casing;
10286
+ /**
10287
+ * Whether this feature is enabled.
10288
+ *
10289
+ * @default true
10290
+ */
10291
+ enabled?: boolean;
10292
+ /**
10293
+ * Naming pattern for generated names.
10294
+ *
10295
+ * @default 'z{{name}}Body'
10296
+ */
10297
+ name?: NameTransformer;
10298
+ /**
10299
+ * Configuration for TypeScript type generation from Zod schemas.
10300
+ *
10301
+ * Controls generation of TypeScript types based on the generated Zod schemas.
10302
+ */
10303
+ types?: {
10304
+ /**
10305
+ * Configuration for `infer` types.
10306
+ *
10307
+ * Can be:
10308
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10309
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10310
+ * - `object`: Full configuration object
10311
+ *
10312
+ * @default false
10313
+ */
10314
+ infer?: boolean | NameTransformer | {
10315
+ /**
10316
+ * Casing convention for generated names.
10317
+ *
10318
+ * @default 'PascalCase'
10319
+ */
10320
+ case?: Casing;
10321
+ /**
10322
+ * Whether this feature is enabled.
10323
+ *
10324
+ * @default true
10325
+ */
10326
+ enabled?: boolean;
10327
+ /**
10328
+ * Naming pattern for generated names.
10329
+ *
10330
+ * @default '{{name}}BodyZodType'
10331
+ */
10332
+ name?: NameTransformer;
10333
+ };
10334
+ };
10335
+ };
9924
10336
  /**
9925
10337
  * Casing convention for generated names.
9926
10338
  *
@@ -9933,12 +10345,239 @@ type UserConfig$1 = Plugin$1.Name<'zod'> & Plugin$1.Hooks & Plugin$1.UserComment
9933
10345
  * @default true
9934
10346
  */
9935
10347
  enabled?: boolean;
10348
+ /**
10349
+ * Configuration for request headers Zod schemas.
10350
+ *
10351
+ * Can be:
10352
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10353
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10354
+ * - `object`: Full configuration object
10355
+ *
10356
+ * @default true
10357
+ */
10358
+ headers?: boolean | NameTransformer | {
10359
+ /**
10360
+ * Casing convention for generated names.
10361
+ *
10362
+ * @default 'camelCase'
10363
+ */
10364
+ case?: Casing;
10365
+ /**
10366
+ * Whether this feature is enabled.
10367
+ *
10368
+ * @default true
10369
+ */
10370
+ enabled?: boolean;
10371
+ /**
10372
+ * Naming pattern for generated names.
10373
+ *
10374
+ * @default 'z{{name}}Headers'
10375
+ */
10376
+ name?: NameTransformer;
10377
+ /**
10378
+ * Configuration for TypeScript type generation from Zod schemas.
10379
+ *
10380
+ * Controls generation of TypeScript types based on the generated Zod schemas.
10381
+ */
10382
+ types?: {
10383
+ /**
10384
+ * Configuration for `infer` types.
10385
+ *
10386
+ * Can be:
10387
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10388
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10389
+ * - `object`: Full configuration object
10390
+ *
10391
+ * @default false
10392
+ */
10393
+ infer?: boolean | NameTransformer | {
10394
+ /**
10395
+ * Casing convention for generated names.
10396
+ *
10397
+ * @default 'PascalCase'
10398
+ */
10399
+ case?: Casing;
10400
+ /**
10401
+ * Whether this feature is enabled.
10402
+ *
10403
+ * @default true
10404
+ */
10405
+ enabled?: boolean;
10406
+ /**
10407
+ * Naming pattern for generated names.
10408
+ *
10409
+ * @default '{{name}}HeadersZodType'
10410
+ */
10411
+ name?: NameTransformer;
10412
+ };
10413
+ };
10414
+ };
9936
10415
  /**
9937
10416
  * Naming pattern for generated names.
9938
10417
  *
9939
10418
  * @default 'z{{name}}Data'
9940
10419
  */
9941
10420
  name?: NameTransformer;
10421
+ /**
10422
+ * Configuration for request path parameters Zod schemas.
10423
+ *
10424
+ * Can be:
10425
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10426
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10427
+ * - `object`: Full configuration object
10428
+ *
10429
+ * @default true
10430
+ */
10431
+ path?: boolean | NameTransformer | {
10432
+ /**
10433
+ * Casing convention for generated names.
10434
+ *
10435
+ * @default 'camelCase'
10436
+ */
10437
+ case?: Casing;
10438
+ /**
10439
+ * Whether this feature is enabled.
10440
+ *
10441
+ * @default true
10442
+ */
10443
+ enabled?: boolean;
10444
+ /**
10445
+ * Naming pattern for generated names.
10446
+ *
10447
+ * @default 'z{{name}}Path'
10448
+ */
10449
+ name?: NameTransformer;
10450
+ /**
10451
+ * Configuration for TypeScript type generation from Zod schemas.
10452
+ *
10453
+ * Controls generation of TypeScript types based on the generated Zod schemas.
10454
+ */
10455
+ types?: {
10456
+ /**
10457
+ * Configuration for `infer` types.
10458
+ *
10459
+ * Can be:
10460
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10461
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10462
+ * - `object`: Full configuration object
10463
+ *
10464
+ * @default false
10465
+ */
10466
+ infer?: boolean | NameTransformer | {
10467
+ /**
10468
+ * Casing convention for generated names.
10469
+ *
10470
+ * @default 'PascalCase'
10471
+ */
10472
+ case?: Casing;
10473
+ /**
10474
+ * Whether this feature is enabled.
10475
+ *
10476
+ * @default true
10477
+ */
10478
+ enabled?: boolean;
10479
+ /**
10480
+ * Naming pattern for generated names.
10481
+ *
10482
+ * @default '{{name}}PathZodType'
10483
+ */
10484
+ name?: NameTransformer;
10485
+ };
10486
+ };
10487
+ };
10488
+ /**
10489
+ * Configuration for request query parameters Zod schemas.
10490
+ *
10491
+ * Can be:
10492
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10493
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10494
+ * - `object`: Full configuration object
10495
+ *
10496
+ * @default true
10497
+ */
10498
+ query?: boolean | NameTransformer | {
10499
+ /**
10500
+ * Casing convention for generated names.
10501
+ *
10502
+ * @default 'camelCase'
10503
+ */
10504
+ case?: Casing;
10505
+ /**
10506
+ * Whether this feature is enabled.
10507
+ *
10508
+ * @default true
10509
+ */
10510
+ enabled?: boolean;
10511
+ /**
10512
+ * Naming pattern for generated names.
10513
+ *
10514
+ * @default 'z{{name}}Query'
10515
+ */
10516
+ name?: NameTransformer;
10517
+ /**
10518
+ * Configuration for TypeScript type generation from Zod schemas.
10519
+ *
10520
+ * Controls generation of TypeScript types based on the generated Zod schemas.
10521
+ */
10522
+ types?: {
10523
+ /**
10524
+ * Configuration for `infer` types.
10525
+ *
10526
+ * Can be:
10527
+ * - `boolean`: Shorthand for `{ enabled: boolean }`
10528
+ * - `string` or `function`: Shorthand for `{ name: string | function }`
10529
+ * - `object`: Full configuration object
10530
+ *
10531
+ * @default false
10532
+ */
10533
+ infer?: boolean | NameTransformer | {
10534
+ /**
10535
+ * Casing convention for generated names.
10536
+ *
10537
+ * @default 'PascalCase'
10538
+ */
10539
+ case?: Casing;
10540
+ /**
10541
+ * Whether this feature is enabled.
10542
+ *
10543
+ * @default true
10544
+ */
10545
+ enabled?: boolean;
10546
+ /**
10547
+ * Naming pattern for generated names.
10548
+ *
10549
+ * @default '{{name}}QueryZodType'
10550
+ */
10551
+ name?: NameTransformer;
10552
+ };
10553
+ };
10554
+ };
10555
+ /**
10556
+ * Whether to extract the request schema into a named export.
10557
+ *
10558
+ * When `true`, generates a reusable schema like `zProjectListData`.
10559
+ * When `false`, the schema is built inline within the caller plugin.
10560
+ *
10561
+ * Can be a boolean or a function for per-operation control.
10562
+ *
10563
+ * @default false
10564
+ * @example
10565
+ * ```ts
10566
+ * // Always extract
10567
+ * shouldExtract: true
10568
+ *
10569
+ * // Extract only for operations with complex request bodies
10570
+ * shouldExtract: ({ operation }) =>
10571
+ * operation.body !== undefined && operation.parameters !== undefined
10572
+ *
10573
+ * // Extract based on custom extension
10574
+ * shouldExtract: ({ operation }) =>
10575
+ * operation['x-custom']?.extractRequestSchema === true
10576
+ * ```
10577
+ */
10578
+ shouldExtract?: MaybeFunc<(ctx: {
10579
+ /** The operation being processed */operation: IR$1.OperationObject;
10580
+ }) => boolean>;
9942
10581
  /**
9943
10582
  * Configuration for TypeScript type generation from Zod schemas.
9944
10583
  *
@@ -10160,7 +10799,15 @@ type Config = Plugin$1.Name<'zod'> & Plugin$1.Hooks & Plugin$1.Comments & Plugin
10160
10799
  node: ReturnType<typeof $.object>;
10161
10800
  schema: IR$1.SchemaObject;
10162
10801
  }) => void); /** Configuration for request-specific Zod schemas. */
10163
- requests: NamingOptions & FeatureToggle & TypeOptions; /** Configuration for response-specific Zod schemas. */
10802
+ requests: NamingOptions & FeatureToggle & TypeOptions & {
10803
+ /** Configuration for request body Zod schemas. */body: NamingOptions & FeatureToggle & TypeOptions; /** Configuration for request headers Zod schemas. */
10804
+ headers: NamingOptions & FeatureToggle & TypeOptions; /** Configuration for request path parameters Zod schemas. */
10805
+ path: NamingOptions & FeatureToggle & TypeOptions; /** Configuration for request query parameters Zod schemas. */
10806
+ query: NamingOptions & FeatureToggle & TypeOptions; /** Whether to extract the request schema into a named export. */
10807
+ shouldExtract: (ctx: {
10808
+ /** The operation being processed */operation: IR$1.OperationObject;
10809
+ }) => boolean;
10810
+ }; /** Configuration for response-specific Zod schemas. */
10164
10811
  responses: NamingOptions & FeatureToggle & TypeOptions; /** Configuration for TypeScript type generation from Zod schemas. */
10165
10812
  types: {
10166
10813
  /** Configuration for `infer` types. */infer: FeatureToggle & {