@hey-api/openapi-ts 0.94.5 → 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, NameTransformer, NamingConfig, NamingOptions, NamingRule, OpenApi, OpenApiMetaObject, OpenApiOperationObject, OpenApiParameterObject, OpenApiRequestBodyObject, OpenApiResponseObject, OpenApiSchemaObject, 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";
@@ -416,6 +415,262 @@ interface TypeArgsMethods extends Node {
416
415
  generics(...args: ReadonlyArray<Arg$1>): this;
417
416
  }
418
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
419
674
  //#region src/ts-dsl/mixins/as.d.ts
420
675
  interface AsMethods extends Node {
421
676
  /** Creates an `as` type assertion expression (e.g., `value as Type`). */
@@ -426,8 +681,8 @@ interface AsMethods extends Node {
426
681
  type AsExpr = NodeName | MaybeTsDsl<ts.Expression>;
427
682
  type AsType = NodeName | TypeTsDsl;
428
683
  type AsCtor = (expr: AsExpr, type: AsType) => AsTsDsl;
429
- declare const Mixed$54: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.AsExpression>, ExprMethods>, AsMethods>;
430
- declare class AsTsDsl extends Mixed$54 {
684
+ declare const Mixed$53: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.AsExpression>, ExprMethods>, AsMethods>;
685
+ declare class AsTsDsl extends Mixed$53 {
431
686
  readonly '~dsl' = "AsTsDsl";
432
687
  protected expr: Ref<AsExpr>;
433
688
  protected type: Ref<AsType>;
@@ -436,66 +691,57 @@ declare class AsTsDsl extends Mixed$54 {
436
691
  toAst(): ts.AsExpression;
437
692
  }
438
693
  //#endregion
439
- //#region src/ts-dsl/mixins/optional.d.ts
440
- interface OptionalMethods extends Node {
441
- _optional?: boolean;
442
- /** Marks the node as optional when the condition is true. */
443
- optional(condition?: boolean): this;
444
- /** Marks the node as required when the condition is true. */
445
- required(condition?: boolean): this;
446
- }
447
- //#endregion
448
694
  //#region src/ts-dsl/expr/binary.d.ts
449
- type Expr$3 = NodeName | MaybeTsDsl<ts.Expression>;
695
+ type Expr$2 = NodeName | MaybeTsDsl<ts.Expression>;
450
696
  type Op$1 = Operator | ts.BinaryOperator;
451
697
  type Operator = '!=' | '!==' | '&&' | '*' | '+' | '-' | '/' | '<' | '<=' | '=' | '==' | '===' | '>' | '>=' | '??' | '??=' | '||';
452
- declare const Mixed$53: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.BinaryExpression>, ExprMethods>, AsMethods>;
453
- declare class BinaryTsDsl extends Mixed$53 {
698
+ declare const Mixed$52: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.BinaryExpression>, ExprMethods>, AsMethods>;
699
+ declare class BinaryTsDsl extends Mixed$52 {
454
700
  readonly '~dsl' = "BinaryTsDsl";
455
- protected _base: Ref<Expr$3>;
456
- protected _expr?: Ref<Expr$3>;
701
+ protected _base: Ref<Expr$2>;
702
+ protected _expr?: Ref<Expr$2>;
457
703
  protected _op?: Op$1;
458
- constructor(base: Expr$3, op?: Op$1, expr?: Expr$3);
704
+ constructor(base: Expr$2, op?: Op$1, expr?: Expr$2);
459
705
  analyze(ctx: AnalysisContext): void;
460
706
  /** Returns true when all required builder calls are present. */
461
707
  get isValid(): boolean;
462
708
  /** Logical AND — `this && expr` */
463
- and(expr: Expr$3): this;
709
+ and(expr: Expr$2): this;
464
710
  /** Creates an assignment expression (e.g., `this = expr`). */
465
- assign(expr: Expr$3): this;
711
+ assign(expr: Expr$2): this;
466
712
  /** Nullish coalescing — `this ?? expr` */
467
- coalesce(expr: Expr$3): this;
713
+ coalesce(expr: Expr$2): this;
468
714
  /** Division — `this / expr` */
469
- div(expr: Expr$3): this;
715
+ div(expr: Expr$2): this;
470
716
  /** Strict equality — `this === expr` */
471
- eq(expr: Expr$3): this;
717
+ eq(expr: Expr$2): this;
472
718
  /** Greater than — `this > expr` */
473
- gt(expr: Expr$3): this;
719
+ gt(expr: Expr$2): this;
474
720
  /** Greater than or equal — `this >= expr` */
475
- gte(expr: Expr$3): this;
721
+ gte(expr: Expr$2): this;
476
722
  /** Loose equality — `this == expr` */
477
- looseEq(expr: Expr$3): this;
723
+ looseEq(expr: Expr$2): this;
478
724
  /** Loose inequality — `this != expr` */
479
- looseNeq(expr: Expr$3): this;
725
+ looseNeq(expr: Expr$2): this;
480
726
  /** Less than — `this < expr` */
481
- lt(expr: Expr$3): this;
727
+ lt(expr: Expr$2): this;
482
728
  /** Less than or equal — `this <= expr` */
483
- lte(expr: Expr$3): this;
729
+ lte(expr: Expr$2): this;
484
730
  /** Subtraction — `this - expr` */
485
- minus(expr: Expr$3): this;
731
+ minus(expr: Expr$2): this;
486
732
  /** Strict inequality — `this !== expr` */
487
- neq(expr: Expr$3): this;
733
+ neq(expr: Expr$2): this;
488
734
  /** Nullish assignment — `this ??= expr` */
489
- nullishAssign(expr: Expr$3): this;
735
+ nullishAssign(expr: Expr$2): this;
490
736
  /** Logical OR — `this || expr` */
491
- or(expr: Expr$3): this;
737
+ or(expr: Expr$2): this;
492
738
  /** Addition — `this + expr` */
493
- plus(expr: Expr$3): this;
739
+ plus(expr: Expr$2): this;
494
740
  /** Multiplication — `this * expr` */
495
- times(expr: Expr$3): this;
741
+ times(expr: Expr$2): this;
496
742
  toAst(): ts.BinaryExpression;
497
743
  $validate(): asserts this is this & {
498
- _expr: Ref<Expr$3>;
744
+ _expr: Ref<Expr$2>;
499
745
  _op: Op$1;
500
746
  };
501
747
  private missingRequiredCalls;
@@ -505,49 +751,49 @@ declare class BinaryTsDsl extends Mixed$53 {
505
751
  }
506
752
  //#endregion
507
753
  //#region src/ts-dsl/mixins/operator.d.ts
508
- type Expr$2 = NodeName | MaybeTsDsl<ts.Expression>;
754
+ type Expr$1 = NodeName | MaybeTsDsl<ts.Expression>;
509
755
  interface OperatorMethods extends Node {
510
756
  /** Logical AND — `this && expr` */
511
- and(expr: Expr$2): BinaryTsDsl;
757
+ and(expr: Expr$1): BinaryTsDsl;
512
758
  /** Creates an assignment expression (e.g., `this = expr`). */
513
- assign(expr: Expr$2): BinaryTsDsl;
759
+ assign(expr: Expr$1): BinaryTsDsl;
514
760
  /** Nullish coalescing — `this ?? expr` */
515
- coalesce(expr: Expr$2): BinaryTsDsl;
761
+ coalesce(expr: Expr$1): BinaryTsDsl;
516
762
  /** Division — `this / expr` */
517
- div(expr: Expr$2): BinaryTsDsl;
763
+ div(expr: Expr$1): BinaryTsDsl;
518
764
  /** Strict equality — `this === expr` */
519
- eq(expr: Expr$2): BinaryTsDsl;
765
+ eq(expr: Expr$1): BinaryTsDsl;
520
766
  /** Greater than — `this > expr` */
521
- gt(expr: Expr$2): BinaryTsDsl;
767
+ gt(expr: Expr$1): BinaryTsDsl;
522
768
  /** Greater than or equal — `this >= expr` */
523
- gte(expr: Expr$2): BinaryTsDsl;
769
+ gte(expr: Expr$1): BinaryTsDsl;
524
770
  /** Loose equality — `this == expr` */
525
- looseEq(expr: Expr$2): BinaryTsDsl;
771
+ looseEq(expr: Expr$1): BinaryTsDsl;
526
772
  /** Loose inequality — `this != expr` */
527
- looseNeq(expr: Expr$2): BinaryTsDsl;
773
+ looseNeq(expr: Expr$1): BinaryTsDsl;
528
774
  /** Less than — `this < expr` */
529
- lt(expr: Expr$2): BinaryTsDsl;
775
+ lt(expr: Expr$1): BinaryTsDsl;
530
776
  /** Less than or equal — `this <= expr` */
531
- lte(expr: Expr$2): BinaryTsDsl;
777
+ lte(expr: Expr$1): BinaryTsDsl;
532
778
  /** Subtraction — `this - expr` */
533
- minus(expr: Expr$2): BinaryTsDsl;
779
+ minus(expr: Expr$1): BinaryTsDsl;
534
780
  /** Strict inequality — `this !== expr` */
535
- neq(expr: Expr$2): BinaryTsDsl;
781
+ neq(expr: Expr$1): BinaryTsDsl;
536
782
  /** Nullish assignment — `this ??= expr` */
537
- nullishAssign(expr: Expr$2): BinaryTsDsl;
783
+ nullishAssign(expr: Expr$1): BinaryTsDsl;
538
784
  /** Logical OR — `this || expr` */
539
- or(expr: Expr$2): BinaryTsDsl;
785
+ or(expr: Expr$1): BinaryTsDsl;
540
786
  /** Addition — `this + expr` */
541
- plus(expr: Expr$2): BinaryTsDsl;
787
+ plus(expr: Expr$1): BinaryTsDsl;
542
788
  /** Multiplication — `this * expr` */
543
- times(expr: Expr$2): BinaryTsDsl;
789
+ times(expr: Expr$1): BinaryTsDsl;
544
790
  }
545
791
  //#endregion
546
792
  //#region src/ts-dsl/expr/attr.d.ts
547
793
  type AttrLeft = NodeName | MaybeTsDsl<ts.Expression>;
548
794
  type AttrCtor = (left: AttrLeft, right: NodeName) => AttrTsDsl;
549
- declare const Mixed$52: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyAccessExpression | ts.ElementAccessExpression>, OptionalMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
550
- declare class AttrTsDsl extends Mixed$52 {
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 {
551
797
  readonly '~dsl' = "AttrTsDsl";
552
798
  protected _computed: boolean;
553
799
  protected _left: Ref<AttrLeft>;
@@ -561,8 +807,8 @@ declare class AttrTsDsl extends Mixed$52 {
561
807
  //#region src/ts-dsl/expr/await.d.ts
562
808
  type AwaitExpr = NodeName | MaybeTsDsl<ts.Expression>;
563
809
  type AwaitCtor = (expr: AwaitExpr) => AwaitTsDsl;
564
- declare const Mixed$51: MixinCtor<abstract new () => TsDsl<ts.AwaitExpression>, ExprMethods>;
565
- declare class AwaitTsDsl extends Mixed$51 {
810
+ declare const Mixed$50: MixinCtor<abstract new () => TsDsl<ts.AwaitExpression>, ExprMethods>;
811
+ declare class AwaitTsDsl extends Mixed$50 {
566
812
  readonly '~dsl' = "AwaitTsDsl";
567
813
  protected _awaitExpr: Ref<AwaitExpr>;
568
814
  constructor(expr: AwaitExpr);
@@ -571,10 +817,10 @@ declare class AwaitTsDsl extends Mixed$51 {
571
817
  }
572
818
  //#endregion
573
819
  //#region src/ts-dsl/mixins/args.d.ts
574
- type Arg = NodeName | MaybeTsDsl<ts.Expression>;
820
+ type Arg = NodeName | MaybeTsDsl<ts.Expression | ts.SpreadElement>;
575
821
  interface ArgsMethods extends Node {
576
- /** Renders the arguments into an array of `Expression`s. */
577
- $args(): ReadonlyArray<ts.Expression>;
822
+ /** Renders the arguments into an array of `Expression`s or `SpreadElement`s. */
823
+ $args(): ReadonlyArray<ts.Expression | ts.SpreadElement>;
578
824
  /** Adds a single expression argument. */
579
825
  arg(arg: Arg | undefined): this;
580
826
  /** Adds one or more expression arguments. */
@@ -585,8 +831,8 @@ interface ArgsMethods extends Node {
585
831
  type NewArgs = ReadonlyArray<NewExpr | undefined>;
586
832
  type NewExpr = NodeName | MaybeTsDsl<ts.Expression>;
587
833
  type NewCtor = (expr: NewExpr, ...args: NewArgs) => NewTsDsl;
588
- declare const Mixed$50: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.NewExpression>, TypeArgsMethods>, ExprMethods>, AsMethods>, ArgsMethods>;
589
- declare class NewTsDsl extends Mixed$50 {
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 {
590
836
  readonly '~dsl' = "NewTsDsl";
591
837
  protected _newExpr: Ref<NewExpr>;
592
838
  constructor(expr: NewExpr, ...args: NewArgs);
@@ -594,11 +840,23 @@ declare class NewTsDsl extends Mixed$50 {
594
840
  toAst(): ts.NewExpression;
595
841
  }
596
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
597
855
  //#region src/ts-dsl/expr/typeof.d.ts
598
- type TypeOfExpr = string | MaybeTsDsl<ts.Expression>;
856
+ type TypeOfExpr = NodeName | MaybeTsDsl<ts.Expression>;
599
857
  type TypeOfExprCtor = (expr: TypeOfExpr) => TypeOfExprTsDsl;
600
- declare const Mixed$49: MixinCtor<abstract new () => TsDsl<ts.TypeOfExpression>, OperatorMethods>;
601
- declare class TypeOfExprTsDsl extends Mixed$49 {
858
+ declare const Mixed$47: MixinCtor<abstract new () => TsDsl<ts.TypeOfExpression>, OperatorMethods>;
859
+ declare class TypeOfExprTsDsl extends Mixed$47 {
602
860
  readonly '~dsl' = "TypeOfExprTsDsl";
603
861
  protected _expr: TypeOfExpr;
604
862
  constructor(expr: TypeOfExpr);
@@ -609,8 +867,8 @@ declare class TypeOfExprTsDsl extends Mixed$49 {
609
867
  //#region src/ts-dsl/stmt/return.d.ts
610
868
  type ReturnExpr = NodeName | MaybeTsDsl<ts.Expression>;
611
869
  type ReturnCtor = (expr?: ReturnExpr) => ReturnTsDsl;
612
- declare const Mixed$48: abstract new () => TsDsl<ts.ReturnStatement>;
613
- declare class ReturnTsDsl extends Mixed$48 {
870
+ declare const Mixed$46: abstract new () => TsDsl<ts.ReturnStatement>;
871
+ declare class ReturnTsDsl extends Mixed$46 {
614
872
  readonly '~dsl' = "ReturnTsDsl";
615
873
  protected _returnExpr?: Ref<ReturnExpr>;
616
874
  constructor(expr?: ReturnExpr);
@@ -639,8 +897,8 @@ interface TypeExprMethods extends Node {
639
897
  //#region src/ts-dsl/type/attr.d.ts
640
898
  type Base$1 = NodeName | MaybeTsDsl<ts.EntityName>;
641
899
  type Right = NodeName | ts.Identifier;
642
- declare const Mixed$47: MixinCtor<abstract new () => TsDsl<ts.QualifiedName>, TypeExprMethods>;
643
- declare class TypeAttrTsDsl extends Mixed$47 {
900
+ declare const Mixed$45: MixinCtor<abstract new () => TsDsl<ts.QualifiedName>, TypeExprMethods>;
901
+ declare class TypeAttrTsDsl extends Mixed$45 {
644
902
  readonly '~dsl' = "TypeAttrTsDsl";
645
903
  scope: NodeScope;
646
904
  protected _base?: Ref<Base$1>;
@@ -664,8 +922,8 @@ declare class TypeAttrTsDsl extends Mixed$47 {
664
922
  type TypeExprExpr = NodeName | TypeAttrTsDsl;
665
923
  type TypeExprFn = (t: TypeExprTsDsl) => void;
666
924
  type TypeExprCtor = (nameOrFn?: NodeName | TypeExprFn, fn?: TypeExprFn) => TypeExprTsDsl;
667
- declare const Mixed$46: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.TypeReferenceNode>, TypeExprMethods>, TypeArgsMethods>;
668
- declare class TypeExprTsDsl extends Mixed$46 {
925
+ declare const Mixed$44: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.TypeReferenceNode>, TypeExprMethods>, TypeArgsMethods>;
926
+ declare class TypeExprTsDsl extends Mixed$44 {
669
927
  readonly '~dsl' = "TypeExprTsDsl";
670
928
  scope: NodeScope;
671
929
  protected _exprInput?: Ref<TypeExprExpr>;
@@ -689,8 +947,8 @@ declare class TypeExprTsDsl extends Mixed$46 {
689
947
  type Base = string | MaybeTsDsl<ts.TypeNode>;
690
948
  type Index = string | number | MaybeTsDsl<ts.TypeNode>;
691
949
  type TypeIdxCtor = (base: Base, index: Index) => TypeIdxTsDsl;
692
- declare const Mixed$45: MixinCtor<abstract new () => TsDsl<ts.IndexedAccessTypeNode>, TypeExprMethods>;
693
- declare class TypeIdxTsDsl extends Mixed$45 {
950
+ declare const Mixed$43: MixinCtor<abstract new () => TsDsl<ts.IndexedAccessTypeNode>, TypeExprMethods>;
951
+ declare class TypeIdxTsDsl extends Mixed$43 {
694
952
  readonly '~dsl' = "TypeIdxTsDsl";
695
953
  scope: NodeScope;
696
954
  protected _base: Base;
@@ -713,7 +971,7 @@ declare class TypeIdxTsDsl extends Mixed$45 {
713
971
  type Op = ts.SyntaxKind.KeyOfKeyword | ts.SyntaxKind.ReadonlyKeyword | ts.SyntaxKind.UniqueKeyword;
714
972
  type Type$3 = string | MaybeTsDsl<ts.TypeNode>;
715
973
  type TypeOperatorCtor = () => TypeOperatorTsDsl;
716
- declare const Mixed$44: abstract new () => TsDsl<ts.TypeOperatorNode>;
974
+ declare const Mixed$42: abstract new () => TsDsl<ts.TypeOperatorNode>;
717
975
  /**
718
976
  * Builds a TypeScript `TypeOperatorNode`, such as:
719
977
  *
@@ -726,7 +984,7 @@ declare const Mixed$44: abstract new () => TsDsl<ts.TypeOperatorNode>;
726
984
  *
727
985
  * The node will throw during render if required fields are missing.
728
986
  */
729
- declare class TypeOperatorTsDsl extends Mixed$44 {
987
+ declare class TypeOperatorTsDsl extends Mixed$42 {
730
988
  readonly '~dsl' = "TypeOperatorTsDsl";
731
989
  scope: NodeScope;
732
990
  protected _op?: Op;
@@ -754,8 +1012,8 @@ declare class TypeOperatorTsDsl extends Mixed$44 {
754
1012
  //#region src/ts-dsl/type/query.d.ts
755
1013
  type TypeQueryExpr = NodeName | MaybeTsDsl<TypeTsDsl | ts.Expression>;
756
1014
  type TypeQueryCtor = (expr: TypeQueryExpr) => TypeQueryTsDsl;
757
- declare const Mixed$43: MixinCtor<abstract new () => TsDsl<ts.TypeQueryNode>, TypeExprMethods>;
758
- declare class TypeQueryTsDsl extends Mixed$43 {
1015
+ declare const Mixed$41: MixinCtor<abstract new () => TsDsl<ts.TypeQueryNode>, TypeExprMethods>;
1016
+ declare class TypeQueryTsDsl extends Mixed$41 {
759
1017
  readonly '~dsl' = "TypeQueryTsDsl";
760
1018
  scope: NodeScope;
761
1019
  protected _expr: Ref<TypeQueryExpr>;
@@ -764,6 +1022,23 @@ declare class TypeQueryTsDsl extends Mixed$43 {
764
1022
  toAst(): ts.TypeQueryNode;
765
1023
  }
766
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
767
1042
  //#region src/ts-dsl/utils/factories.d.ts
768
1043
  type Ctor = (...args: Array<any>) => any;
769
1044
  type Factory<T extends Ctor> = {
@@ -774,36 +1049,33 @@ declare const f: {
774
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`). */
775
1050
  attr: Factory<AttrCtor>; /** Factory for creating await expressions (e.g., `await promise`). */
776
1051
  await: Factory<AwaitCtor>; /** Factory for creating function or method call expressions (e.g., `fn(arg)`). */
777
- call: Factory<CallCtor>; /** Factory for creating new expressions (e.g., `new ClassName()`). */
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()`). */
778
1054
  new: Factory<NewCtor>; /** Factory for creating return statements. */
779
- 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. */
780
1057
  type: {
781
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]`). */
782
1059
  idx: Factory<TypeIdxCtor>; /** Factory for creating type operator nodes (e.g., `readonly T`, `keyof T`, `unique T`). */
783
1060
  operator: Factory<TypeOperatorCtor>; /** Factory for creating type query nodes (e.g., `typeof Foo`). */
784
- query: Factory<TypeQueryCtor>;
1061
+ query: Factory<TypeQueryCtor>; /** Factory for creating named tuple elements (e.g., `[resolver?: R]`). */
1062
+ tupleMember: Factory<TypeTupleMemberCtor>;
785
1063
  }; /** Factory for creating `typeof` expressions (e.g., `typeof value`). */
786
1064
  typeofExpr: Factory<TypeOfExprCtor>;
787
1065
  };
788
1066
  //#endregion
789
- //#region src/ts-dsl/mixins/expr.d.ts
790
- interface ExprMethods extends Node {
791
- /** Accesses a property on the current expression (e.g., `this.foo`). */
792
- attr(...args: DropFirst<Parameters<typeof f.attr>>): ReturnType<typeof f.attr>;
793
- /** Awaits the current expression (e.g., `await expr`). */
794
- await(): ReturnType<typeof f.await>;
795
- /** Calls the current expression (e.g., `fn(arg1, arg2)`). */
796
- call(...args: DropFirst<Parameters<typeof f.call>>): ReturnType<typeof f.call>;
797
- /** Produces a `return` statement returning the current expression. */
798
- 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>;
799
1071
  }
800
1072
  //#endregion
801
1073
  //#region src/ts-dsl/expr/call.d.ts
802
1074
  type CallArgs = ReadonlyArray<CallCallee | undefined>;
803
1075
  type CallCallee = NodeName | MaybeTsDsl<ts.Expression>;
804
1076
  type CallCtor = (callee: CallCallee, ...args: CallArgs) => CallTsDsl;
805
- declare const Mixed$42: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.CallExpression>, TypeArgsMethods>, ExprMethods>, AsMethods>, ArgsMethods>;
806
- declare class CallTsDsl extends Mixed$42 {
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 {
807
1079
  readonly '~dsl' = "CallTsDsl";
808
1080
  protected _callee: Ref<CallCallee>;
809
1081
  constructor(callee: CallCallee, ...args: CallArgs);
@@ -917,8 +1189,8 @@ type TypeOf<I> = I extends ReadonlyArray<infer U> ? ReadonlyArray<TypeOf<U>> : I
917
1189
  //#region src/ts-dsl/expr/postfix.d.ts
918
1190
  type PostfixExpr = string | MaybeTsDsl<ts.Expression>;
919
1191
  type PostfixOp = ts.PostfixUnaryOperator;
920
- declare const Mixed$41: abstract new () => TsDsl<ts.PostfixUnaryExpression>;
921
- declare class PostfixTsDsl extends Mixed$41 {
1192
+ declare const Mixed$38: abstract new () => TsDsl<ts.PostfixUnaryExpression>;
1193
+ declare class PostfixTsDsl extends Mixed$38 {
922
1194
  readonly '~dsl' = "PostfixTsDsl";
923
1195
  protected _expr?: PostfixExpr;
924
1196
  protected _op?: PostfixOp;
@@ -942,20 +1214,6 @@ declare class PostfixTsDsl extends Mixed$41 {
942
1214
  private missingRequiredCalls;
943
1215
  }
944
1216
  //#endregion
945
- //#region src/ts-dsl/layout/doc.d.ts
946
- type DocMaybeLazy<T> = ((ctx: TsDslContext) => T) | T;
947
- type DocFn = (d: DocTsDsl) => void;
948
- type DocLines = DocMaybeLazy<MaybeArray<string>>;
949
- declare class DocTsDsl extends TsDsl<ts.Node> {
950
- readonly '~dsl' = "DocTsDsl";
951
- protected _lines: Array<DocLines>;
952
- constructor(lines?: DocLines, fn?: DocFn);
953
- analyze(ctx: AnalysisContext): void;
954
- add(lines: DocLines): this;
955
- apply<T extends ts.Node>(node: T): T;
956
- toAst(): ts.Identifier;
957
- }
958
- //#endregion
959
1217
  //#region src/ts-dsl/layout/hint.d.ts
960
1218
  type HintMaybeLazy<T> = ((ctx: TsDslContext) => T) | T;
961
1219
  type HintFn = (d: HintTsDsl) => void;
@@ -970,20 +1228,10 @@ declare class HintTsDsl extends TsDsl<ts.Node> {
970
1228
  toAst(): ts.Identifier;
971
1229
  }
972
1230
  //#endregion
973
- //#region src/ts-dsl/mixins/do.d.ts
974
- type DoExpr = MaybeTsDsl<ts.Expression | ts.Statement>;
975
- interface DoMethods extends Node {
976
- /** Renders the collected `.do()` calls into an array of `Statement` nodes. */
977
- $do(): ReadonlyArray<ts.Statement>;
978
- _do: Array<DoExpr>;
979
- /** Adds one or more expressions/statements to the body. */
980
- do(...items: ReadonlyArray<DoExpr>): this;
981
- }
982
- //#endregion
983
1231
  //#region src/ts-dsl/stmt/if.d.ts
984
- type IfCondition = string | MaybeTsDsl<ts.Expression>;
985
- declare const Mixed$40: MixinCtor<abstract new () => TsDsl<ts.IfStatement>, DoMethods>;
986
- declare class IfTsDsl extends Mixed$40 {
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 {
987
1235
  readonly '~dsl' = "IfTsDsl";
988
1236
  protected _condition?: IfCondition;
989
1237
  protected _else?: Array<DoExpr>;
@@ -1082,8 +1330,8 @@ declare function createLiteral(value: TsLiteralValue, leadingComments?: Readonly
1082
1330
  //#region src/ts-dsl/expr/prefix.d.ts
1083
1331
  type PrefixExpr = string | MaybeTsDsl<ts.Expression>;
1084
1332
  type PrefixOp = ts.PrefixUnaryOperator;
1085
- declare const Mixed$39: abstract new () => TsDsl<ts.PrefixUnaryExpression>;
1086
- declare class PrefixTsDsl extends Mixed$39 {
1333
+ declare const Mixed$36: abstract new () => TsDsl<ts.PrefixUnaryExpression>;
1334
+ declare class PrefixTsDsl extends Mixed$36 {
1087
1335
  readonly '~dsl' = "PrefixTsDsl";
1088
1336
  protected _expr?: PrefixExpr;
1089
1337
  protected _op?: PrefixOp;
@@ -1103,75 +1351,28 @@ declare class PrefixTsDsl extends Mixed$39 {
1103
1351
  $validate(): asserts this is this & {
1104
1352
  _expr: PrefixExpr;
1105
1353
  _op: PrefixOp;
1106
- };
1107
- private missingRequiredCalls;
1108
- }
1109
- //#endregion
1110
- //#region src/ts-dsl/layout/note.d.ts
1111
- type NoteMaybeLazy<T> = ((ctx: TsDslContext) => T) | T;
1112
- type NoteFn = (d: NoteTsDsl) => void;
1113
- type NoteLines = NoteMaybeLazy<MaybeArray<string>>;
1114
- declare class NoteTsDsl extends TsDsl<ts.Node> {
1115
- readonly '~dsl' = "NoteTsDsl";
1116
- protected _lines: Array<NoteLines>;
1117
- constructor(lines?: NoteLines, fn?: NoteFn);
1118
- analyze(ctx: AnalysisContext): void;
1119
- add(lines: NoteLines): this;
1120
- apply<T extends ts.Node>(node: T): T;
1121
- toAst(): ts.Identifier;
1122
- }
1123
- //#endregion
1124
- //#region src/ts-dsl/mixins/value.d.ts
1125
- type ValueExpr = string | MaybeTsDsl<ts.Expression>;
1126
- interface ValueMethods extends Node {
1127
- $value(): ts.Expression | undefined;
1128
- /** Sets the initializer expression (e.g., `= expr`). */
1129
- assign(expr: ValueExpr): this;
1130
- }
1131
- //#endregion
1132
- //#region src/ts-dsl/mixins/pattern.d.ts
1133
- interface PatternMethods extends Node {
1134
- /** Renders the pattern into a `BindingName`. */
1135
- $pattern(): ts.BindingName | undefined;
1136
- /** Defines an array binding pattern. */
1137
- array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
1138
- /** Defines an object binding pattern. */
1139
- object(...props: ReadonlyArray<MaybeArray<string> | Record<string, string>>): this;
1140
- /** Adds a spread element (e.g., `...args`, `...options`) to the pattern. */
1141
- spread(name: string): this;
1142
- }
1143
- //#endregion
1144
- //#region src/ts-dsl/mixins/decorator.d.ts
1145
- interface DecoratorMethods extends Node {
1146
- /** Renders the decorators into an array of `ts.Decorator`s. */
1147
- $decorators(): ReadonlyArray<ts.Decorator>;
1148
- /** Adds a decorator (e.g., `@sealed({ in: 'root' })`). */
1149
- decorator(name: NodeName | MaybeTsDsl<ts.Expression>, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>): this;
1150
- }
1151
- //#endregion
1152
- //#region src/ts-dsl/decl/param.d.ts
1153
- type ParamName = NodeName | ParamFn;
1154
- type ParamFn = (p: ParamTsDsl) => void;
1155
- type ParamCtor = (name: ParamName, fn?: ParamFn) => ParamTsDsl;
1156
- declare const Mixed$38: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ParameterDeclaration>, ValueMethods>, PatternMethods>, OptionalMethods>, DecoratorMethods>;
1157
- declare class ParamTsDsl extends Mixed$38 {
1158
- readonly '~dsl' = "ParamTsDsl";
1159
- protected _type?: TypeTsDsl;
1160
- constructor(name: ParamName, fn?: ParamFn);
1161
- analyze(ctx: AnalysisContext): void;
1162
- /** Returns true when all required builder calls are present. */
1163
- get isValid(): boolean;
1164
- /** Sets the parameter type. */
1165
- type(type: string | TypeTsDsl): this;
1166
- toAst(): ts.ParameterDeclaration;
1167
- $validate(): asserts this;
1354
+ };
1168
1355
  private missingRequiredCalls;
1169
1356
  }
1170
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;
1370
+ }
1371
+ //#endregion
1171
1372
  //#region src/ts-dsl/expr/template.d.ts
1172
1373
  type TemplatePart = NodeName | MaybeTsDsl<ts.Expression>;
1173
- declare const Mixed$37: abstract new () => TsDsl<ts.TemplateExpression | ts.NoSubstitutionTemplateLiteral>;
1174
- declare class TemplateTsDsl extends Mixed$37 {
1374
+ declare const Mixed$35: abstract new () => TsDsl<ts.TemplateExpression | ts.NoSubstitutionTemplateLiteral>;
1375
+ declare class TemplateTsDsl extends Mixed$35 {
1175
1376
  readonly '~dsl' = "TemplateTsDsl";
1176
1377
  protected parts: Array<Ref<TemplatePart>>;
1177
1378
  constructor(value?: TemplatePart);
@@ -1180,145 +1381,10 @@ declare class TemplateTsDsl extends Mixed$37 {
1180
1381
  toAst(): ts.TemplateExpression | ts.NoSubstitutionTemplateLiteral;
1181
1382
  }
1182
1383
  //#endregion
1183
- //#region src/ts-dsl/type/param.d.ts
1184
- type TypeParamExpr = NodeName | boolean | MaybeTsDsl<TypeTsDsl>;
1185
- declare const Mixed$36: abstract new () => TsDsl<ts.TypeParameterDeclaration>;
1186
- declare class TypeParamTsDsl extends Mixed$36 {
1187
- readonly '~dsl' = "TypeParamTsDsl";
1188
- scope: NodeScope;
1189
- protected constraint?: Ref<TypeParamExpr>;
1190
- protected defaultValue?: Ref<TypeParamExpr>;
1191
- constructor(name?: NodeName, fn?: (name: TypeParamTsDsl) => void);
1192
- analyze(ctx: AnalysisContext): void;
1193
- /** Sets the parameter default value. */
1194
- default(value: TypeParamExpr): this;
1195
- extends(constraint: TypeParamExpr): this;
1196
- toAst(): ts.TypeParameterDeclaration;
1197
- }
1198
- //#endregion
1199
- //#region src/ts-dsl/mixins/type-params.d.ts
1200
- interface TypeParamsMethods extends Node {
1201
- /** Returns the type parameters as an array of ts.TypeParameterDeclaration nodes. */
1202
- $generics(): ReadonlyArray<ts.TypeParameterDeclaration> | undefined;
1203
- /** Adds a single type parameter (e.g., `T` in `Array<T>`). */
1204
- generic(...args: ConstructorParameters<typeof TypeParamTsDsl>): this;
1205
- /** Adds type parameters (e.g., `Map<string, T>`). */
1206
- generics(...args: ReadonlyArray<NodeName | MaybeTsDsl<TypeParamTsDsl>>): this;
1207
- }
1208
- //#endregion
1209
- //#region src/ts-dsl/mixins/modifiers.d.ts
1210
- type Modifiers = {
1211
- /**
1212
- * Checks if the specified modifier is present.
1213
- *
1214
- * @param modifier - The modifier to check.
1215
- * @returns True if the modifier is present, false otherwise.
1216
- */
1217
- hasModifier(modifier: Modifier): boolean;
1218
- modifiers: Array<ts.Modifier>;
1219
- };
1220
- type Modifier = 'abstract' | 'async' | 'const' | 'declare' | 'default' | 'export' | 'override' | 'private' | 'protected' | 'public' | 'readonly' | 'static';
1221
- interface AbstractMethods extends Modifiers {
1222
- /**
1223
- * Adds the `abstract` keyword modifier if the condition is true.
1224
- *
1225
- * @param condition - Whether to add the modifier (default: true).
1226
- * @returns The target object for chaining.
1227
- */
1228
- abstract(condition?: boolean): this;
1229
- }
1230
- interface AsyncMethods extends Modifiers {
1231
- /**
1232
- * Adds the `async` keyword modifier if the condition is true.
1233
- *
1234
- * @param condition - Whether to add the modifier (default: true).
1235
- * @returns The target object for chaining.
1236
- */
1237
- async(condition?: boolean): this;
1238
- }
1239
- interface ConstMethods extends Modifiers {
1240
- /**
1241
- * Adds the `const` keyword modifier if the condition is true.
1242
- *
1243
- * @param condition - Whether to add the modifier (default: true).
1244
- * @returns The target object for chaining.
1245
- */
1246
- const(condition?: boolean): this;
1247
- }
1248
- interface DefaultMethods extends Modifiers {
1249
- /**
1250
- * Adds the `default` keyword modifier if the condition is true.
1251
- *
1252
- * @param condition - Whether to add the modifier (default: true).
1253
- * @returns The target object for chaining.
1254
- */
1255
- default(condition?: boolean): this;
1256
- }
1257
- interface ExportMethods extends Modifiers {
1258
- /**
1259
- * Adds the `export` keyword modifier if the condition is true.
1260
- *
1261
- * @param condition - Whether to add the modifier (default: true).
1262
- * @returns The target object for chaining.
1263
- */
1264
- export(condition?: boolean): this;
1265
- }
1266
- interface PrivateMethods extends Modifiers {
1267
- /**
1268
- * Adds the `private` keyword modifier if the condition is true.
1269
- *
1270
- * @param condition - Whether to add the modifier (default: true).
1271
- * @returns The target object for chaining.
1272
- */
1273
- private(condition?: boolean): this;
1274
- }
1275
- interface ProtectedMethods extends Modifiers {
1276
- /**
1277
- * Adds the `protected` keyword modifier if the condition is true.
1278
- *
1279
- * @param condition - Whether to add the modifier (default: true).
1280
- * @returns The target object for chaining.
1281
- */
1282
- protected(condition?: boolean): this;
1283
- }
1284
- interface PublicMethods extends Modifiers {
1285
- /**
1286
- * Adds the `public` keyword modifier if the condition is true.
1287
- *
1288
- * @param condition - Whether to add the modifier (default: true).
1289
- * @returns The target object for chaining.
1290
- */
1291
- public(condition?: boolean): this;
1292
- }
1293
- interface ReadonlyMethods extends Modifiers {
1294
- /**
1295
- * Adds the `readonly` keyword modifier if the condition is true.
1296
- *
1297
- * @param condition - Whether to add the modifier (default: true).
1298
- * @returns The target object for chaining.
1299
- */
1300
- readonly(condition?: boolean): this;
1301
- }
1302
- interface StaticMethods extends Modifiers {
1303
- /**
1304
- * Adds the `static` keyword modifier if the condition is true.
1305
- *
1306
- * @param condition - Whether to add the modifier (default: true).
1307
- * @returns The target object for chaining.
1308
- */
1309
- static(condition?: boolean): this;
1310
- }
1311
- //#endregion
1312
- //#region src/ts-dsl/mixins/doc.d.ts
1313
- interface DocMethods extends Node {
1314
- $docs<T extends ts.Node>(node: T): T;
1315
- doc(lines?: DocLines, fn?: DocFn): this;
1316
- }
1317
- //#endregion
1318
1384
  //#region src/ts-dsl/decl/field.d.ts
1319
1385
  type FieldType = NodeName | TypeTsDsl;
1320
- 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>;
1321
- 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 {
1322
1388
  readonly '~dsl' = "FieldTsDsl";
1323
1389
  readonly nameSanitizer: (name: string) => string;
1324
1390
  protected _type?: TypeTsDsl;
@@ -1329,43 +1395,15 @@ declare class FieldTsDsl extends Mixed$35 {
1329
1395
  toAst(): ts.PropertyDeclaration;
1330
1396
  }
1331
1397
  //#endregion
1332
- //#region src/ts-dsl/mixins/param.d.ts
1333
- interface ParamMethods extends Node {
1334
- /** Renders the parameters into an array of `ParameterDeclaration`s. */
1335
- $params(): ReadonlyArray<ts.ParameterDeclaration>;
1336
- /** Adds a parameter. */
1337
- param(...args: Parameters<ParamCtor>): this;
1338
- /** Adds multiple parameters. */
1339
- params(...params: ReadonlyArray<MaybeTsDsl<ts.ParameterDeclaration>>): this;
1340
- }
1341
- //#endregion
1342
1398
  //#region src/ts-dsl/decl/init.d.ts
1343
- declare const Mixed$34: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ConstructorDeclaration>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>;
1344
- 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 {
1345
1401
  readonly '~dsl' = "InitTsDsl";
1346
1402
  constructor(fn?: (i: InitTsDsl) => void);
1347
1403
  analyze(ctx: AnalysisContext): void;
1348
1404
  toAst(): ts.ConstructorDeclaration;
1349
1405
  }
1350
1406
  //#endregion
1351
- //#region src/ts-dsl/mixins/type-returns.d.ts
1352
- interface TypeReturnsMethods extends Node {
1353
- /** Returns the return type node. */
1354
- $returns(): ts.TypeNode | undefined;
1355
- /** Sets the return type. */
1356
- returns(type: NodeName | TypeTsDsl): this;
1357
- }
1358
- //#endregion
1359
- //#region src/ts-dsl/decl/method.d.ts
1360
- 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>;
1361
- declare class MethodTsDsl extends Mixed$33 {
1362
- readonly '~dsl' = "MethodTsDsl";
1363
- readonly nameSanitizer: (name: string) => string;
1364
- constructor(name: NodeName, fn?: (m: MethodTsDsl) => void);
1365
- analyze(ctx: AnalysisContext): void;
1366
- toAst(): ts.MethodDeclaration;
1367
- }
1368
- //#endregion
1369
1407
  //#region src/ts-dsl/decl/class.d.ts
1370
1408
  type Body = Array<MaybeTsDsl<ts.ClassElement | ts.Node>>;
1371
1409
  declare const Mixed$32: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ClassDeclaration>, TypeParamsMethods>, ExportMethods>, DocMethods>, DefaultMethods>, DecoratorMethods>, AbstractMethods>;
@@ -1438,7 +1476,7 @@ declare class EnumTsDsl extends Mixed$29 {
1438
1476
  //#endregion
1439
1477
  //#region src/ts-dsl/decl/func.d.ts
1440
1478
  type FuncMode = 'arrow' | 'decl' | 'expr';
1441
- 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>;
1442
1480
  declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$28 {
1443
1481
  readonly '~dsl' = "FuncTsDsl";
1444
1482
  readonly nameSanitizer: (name: string) => string;
@@ -1539,30 +1577,23 @@ interface LayoutMethods extends Node {
1539
1577
  }
1540
1578
  //#endregion
1541
1579
  //#region src/ts-dsl/expr/array.d.ts
1542
- declare const Mixed$24: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ArrayLiteralExpression>, LayoutMethods>, ExprMethods>, 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>;
1543
1582
  declare class ArrayTsDsl extends Mixed$24 {
1544
1583
  readonly '~dsl' = "ArrayTsDsl";
1545
- protected _elements: Array<{
1546
- expr: MaybeTsDsl<ts.Expression>;
1547
- kind: 'element';
1548
- } | {
1549
- expr: MaybeTsDsl<ts.Expression>;
1550
- kind: 'spread';
1551
- }>;
1552
- constructor(...exprs: Array<string | number | boolean | MaybeTsDsl<ts.Expression>>);
1584
+ protected _elements: Array<MaybeTsDsl<ts.Expression>>;
1585
+ constructor(...exprs: Array<ArrayExpr>);
1553
1586
  analyze(ctx: AnalysisContext): void;
1554
1587
  /** Adds a single array element. */
1555
- element(expr: string | number | boolean | MaybeTsDsl<ts.Expression>): this;
1588
+ element(expr: ArrayExpr): this;
1556
1589
  /** Adds multiple array elements. */
1557
- elements(...exprs: ReadonlyArray<string | number | boolean | MaybeTsDsl<ts.Expression>>): this;
1558
- /** Adds a spread element (`...expr`). */
1559
- spread(expr: MaybeTsDsl<ts.Expression>): this;
1590
+ elements(...exprs: ReadonlyArray<ArrayExpr>): this;
1560
1591
  toAst(): ts.ArrayLiteralExpression;
1561
1592
  }
1562
1593
  //#endregion
1563
1594
  //#region src/ts-dsl/expr/expr.d.ts
1564
1595
  type Id = NodeName | MaybeTsDsl<ts.Expression>;
1565
- 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>;
1566
1597
  declare class ExprTsDsl extends Mixed$23 {
1567
1598
  readonly '~dsl' = "ExprTsDsl";
1568
1599
  protected _exprInput: Ref<Id>;
@@ -1646,15 +1677,17 @@ interface HintMethods extends Node {
1646
1677
  }
1647
1678
  //#endregion
1648
1679
  //#region src/ts-dsl/expr/prop.d.ts
1649
- type Expr$1 = NodeName | MaybeTsDsl<ts.Expression>;
1650
- type Stmt$1 = NodeName | MaybeTsDsl<ts.Statement>;
1651
- 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>;
1652
1682
  type Meta = {
1653
1683
  kind: 'computed';
1654
1684
  name: string;
1655
1685
  } | {
1656
1686
  kind: 'getter';
1657
1687
  name: string;
1688
+ } | {
1689
+ kind: 'method';
1690
+ name: string;
1658
1691
  } | {
1659
1692
  kind: 'prop';
1660
1693
  name: string;
@@ -1668,17 +1701,17 @@ type Meta = {
1668
1701
  declare const Mixed$20: MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralElementLike>, DocMethods>;
1669
1702
  declare class ObjectPropTsDsl extends Mixed$20 {
1670
1703
  readonly '~dsl' = "ObjectPropTsDsl";
1671
- protected _value?: Ref<Expr$1 | Stmt$1>;
1704
+ protected _value?: Ref<ObjectPropValue>;
1672
1705
  protected _meta: Meta;
1673
1706
  constructor(meta: Meta);
1674
- get kind(): ObjectPropKind;
1675
- get propName(): string | undefined;
1676
1707
  analyze(ctx: AnalysisContext): void;
1677
1708
  get isValid(): boolean;
1678
- value(value: Expr$1 | Stmt$1 | ((p: ObjectPropTsDsl) => void)): this;
1679
- 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;
1680
1713
  $validate(): asserts this is this & {
1681
- _value: Expr$1 | Stmt$1;
1714
+ _value: ObjectPropValue;
1682
1715
  kind: ObjectPropKind;
1683
1716
  };
1684
1717
  private missingRequiredCalls;
@@ -1687,33 +1720,33 @@ declare class ObjectPropTsDsl extends Mixed$20 {
1687
1720
  //#region src/ts-dsl/expr/object.d.ts
1688
1721
  type Expr = NodeName | MaybeTsDsl<ts.Expression>;
1689
1722
  type Stmt = NodeName | MaybeTsDsl<ts.Statement>;
1690
- type ExprFn = Expr | ((p: ObjectPropTsDsl) => void);
1691
- type StmtFn = Stmt | ((p: ObjectPropTsDsl) => void);
1692
1723
  declare const Mixed$19: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralExpression>, LayoutMethods>, HintMethods>, ExprMethods>, AsMethods>;
1693
1724
  declare class ObjectTsDsl extends Mixed$19 {
1694
1725
  readonly '~dsl' = "ObjectTsDsl";
1695
1726
  protected _props: Map<string, ObjectPropTsDsl>;
1696
1727
  protected _spreadCounter: number;
1697
- constructor(...props: Array<ObjectPropTsDsl>);
1728
+ constructor(...props: Array<ObjectPropTsDsl> | [(o: ObjectTsDsl) => void]);
1698
1729
  analyze(ctx: AnalysisContext): void;
1699
1730
  /** Returns composite key for the property. */
1700
1731
  private _propKey;
1701
1732
  /** Adds a computed property (e.g., `{ [expr]: value }`), or removes if null. */
1702
- computed(name: string, expr: ExprFn | null): this;
1733
+ computed(name: string, expr: Expr | null): this;
1703
1734
  /** Adds a getter property (e.g., `{ get foo() { ... } }`), or removes if null. */
1704
- getter(name: string, stmt: StmtFn | null): this;
1735
+ getter(name: string, stmt: Stmt | null): this;
1705
1736
  /** Returns true if object has at least one property or spread. */
1706
1737
  hasProps(): boolean;
1707
1738
  /** Returns true if object has no properties or spreads. */
1708
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;
1709
1742
  /** Adds a property assignment, or removes if null. */
1710
- prop(name: string, expr: ExprFn | null): this;
1743
+ prop(name: string, expr: Expr | null): this;
1711
1744
  /** Adds multiple properties. */
1712
1745
  props(...props: ReadonlyArray<ObjectPropTsDsl>): this;
1713
1746
  /** Adds a setter property (e.g., `{ set foo(v) { ... } }`), or removes if null. */
1714
- setter(name: string, stmt: StmtFn | null): this;
1747
+ setter(name: string, stmt: Stmt | null): this;
1715
1748
  /** Adds a spread property (e.g., `{ ...options }`). */
1716
- spread(expr: ExprFn): this;
1749
+ spread(expr: Expr): this;
1717
1750
  toAst(): ts.ObjectLiteralExpression;
1718
1751
  }
1719
1752
  //#endregion
@@ -1783,7 +1816,7 @@ declare class VarTsDsl extends Mixed$15 {
1783
1816
  const(): this;
1784
1817
  let(): this;
1785
1818
  /** Sets the variable type. */
1786
- type(type: string | TypeTsDsl): this;
1819
+ type(node: NodeName | TypeTsDsl): this;
1787
1820
  var(): this;
1788
1821
  toAst(): ts.VariableStatement;
1789
1822
  $validate(): asserts this;
@@ -2101,14 +2134,15 @@ declare class TypeTemplateTsDsl extends Mixed$1 {
2101
2134
  }
2102
2135
  //#endregion
2103
2136
  //#region src/ts-dsl/type/tuple.d.ts
2137
+ type TupleElement = string | ts.TypeNode | TypeTsDsl;
2104
2138
  declare const Mixed: abstract new () => TsDsl<ts.TupleTypeNode>;
2105
2139
  declare class TypeTupleTsDsl extends Mixed {
2106
2140
  readonly '~dsl' = "TypeTupleTsDsl";
2107
2141
  scope: NodeScope;
2108
- protected _elements: Array<string | ts.TypeNode | TypeTsDsl>;
2109
- constructor(...nodes: Array<string | ts.TypeNode | TypeTsDsl>);
2142
+ protected _elements: Array<TupleElement>;
2143
+ constructor(...nodes: Array<TupleElement>);
2110
2144
  analyze(ctx: AnalysisContext): void;
2111
- elements(...types: Array<string | ts.TypeNode | TypeTsDsl>): this;
2145
+ elements(...types: Array<TupleElement>): this;
2112
2146
  toAst(): ts.TupleTypeNode;
2113
2147
  }
2114
2148
  //#endregion
@@ -2233,22 +2267,22 @@ declare const reserved: {
2233
2267
  };
2234
2268
  //#endregion
2235
2269
  //#region src/ts-dsl/index.d.ts
2236
- declare const $: ((id: ts.Expression | TsDsl<ts.Expression> | _hey_api_codegen_core0.NodeName) => ExprTsDsl) & {
2270
+ declare const $: ((id: ts.Expression | TsDsl<ts.Expression> | NodeName) => ExprTsDsl) & {
2237
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`). */
2238
2272
  as: (expr: AsExpr, type: AsType) => AsTsDsl; /** Creates a property access expression (e.g., `obj.foo`). */
2239
- attr: (left: AttrLeft, right: _hey_api_codegen_core0.NodeName) => AttrTsDsl; /** Creates an await expression (e.g., `await promise`). */
2273
+ attr: (left: AttrLeft, right: NodeName) => AttrTsDsl; /** Creates an await expression (e.g., `await promise`). */
2240
2274
  await: (expr: AwaitExpr) => AwaitTsDsl; /** Creates a binary expression (e.g., `a + b`). */
2241
- 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 (`{ ... }`). */
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 (`{ ... }`). */
2242
2276
  block: (...args: ConstructorParameters<typeof BlockTsDsl>) => BlockTsDsl; /** Creates a function or method call expression (e.g., `fn(arg)`). */
2243
2277
  call: (callee: CallCallee, ...args: (CallCallee | undefined)[]) => CallTsDsl; /** Creates a class declaration or expression. */
2244
- class: (name: _hey_api_codegen_core0.NodeName) => ClassTsDsl; /** Creates a constant variable declaration (`const`). */
2245
- const: (name?: _hey_api_codegen_core0.NodeName | undefined) => VarTsDsl; /** Creates a postfix decrement expression (`i--`). */
2278
+ class: (name: NodeName) => ClassTsDsl; /** Creates a constant variable declaration (`const`). */
2279
+ const: (name?: NodeName | undefined) => VarTsDsl; /** Creates a postfix decrement expression (`i--`). */
2246
2280
  dec: (expr?: PostfixExpr | undefined, op?: ts.PostfixUnaryOperator | undefined) => PostfixTsDsl; /** Creates a decorator expression (e.g., `@decorator`). */
2247
- decorator: (name: _hey_api_codegen_core0.NodeName, ...args: (string | ts.Expression | TsDsl<ts.Expression>)[]) => DecoratorTsDsl; /** Creates a JSDoc documentation block. */
2281
+ decorator: (name: NodeName, ...args: (string | ts.Expression | TsDsl<ts.Expression>)[]) => DecoratorTsDsl; /** Creates a JSDoc documentation block. */
2248
2282
  doc: (lines?: DocLines | undefined, fn?: DocFn | undefined) => DocTsDsl; /** Creates an enum declaration. */
2249
- enum: (name: _hey_api_codegen_core0.NodeName, fn?: ((e: EnumTsDsl) => void) | undefined) => EnumTsDsl; /** Creates a general expression node. */
2250
- expr: (id: ts.Expression | TsDsl<ts.Expression> | _hey_api_codegen_core0.NodeName) => ExprTsDsl; /** Creates a field declaration in a class or object. */
2251
- field: (name: _hey_api_codegen_core0.NodeName, fn?: ((f: FieldTsDsl) => void) | undefined) => FieldTsDsl; /** Creates a for loop (for, for...of, for...in, or for await...of). */
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). */
2252
2286
  for: {
2253
2287
  (variableOrInit?: VarTsDsl): ForTsDsl<ForMode>;
2254
2288
  (variableOrInit: VarTsDsl, condition: ForCondition, iterableOrUpdate?: ForIterable): ForTsDsl<"for">;
@@ -2260,21 +2294,21 @@ declare const $: ((id: ts.Expression | TsDsl<ts.Expression> | _hey_api_codegen_c
2260
2294
  func: {
2261
2295
  (): FuncTsDsl<"arrow">;
2262
2296
  (fn: (f: FuncTsDsl<"arrow">) => void): FuncTsDsl<"arrow">;
2263
- (name: string): FuncTsDsl<"decl">;
2264
- (name: string, fn: (f: FuncTsDsl<"decl">) => void): FuncTsDsl<"decl">;
2265
- (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">;
2266
2300
  }; /** Creates a getter method declaration. */
2267
- getter: (name: _hey_api_codegen_core0.NodeName, fn?: ((g: GetterTsDsl) => void) | undefined) => GetterTsDsl; /** Creates a single-line comment (//). */
2301
+ getter: (name: NodeName, fn?: ((g: GetterTsDsl) => void) | undefined) => GetterTsDsl; /** Creates a single-line comment (//). */
2268
2302
  hint: (lines?: HintLines | undefined, fn?: HintFn | undefined) => HintTsDsl; /** Creates an identifier (e.g., `foo`). */
2269
2303
  id: (name: string) => IdTsDsl; /** Creates an if statement. */
2270
2304
  if: (condition?: IfCondition | undefined) => IfTsDsl; /** Creates a postfix increment expression (`i++`). */
2271
2305
  inc: (expr?: PostfixExpr | undefined, op?: ts.PostfixUnaryOperator | undefined) => PostfixTsDsl; /** Creates an initialization block or statement. */
2272
2306
  init: (fn?: ((i: InitTsDsl) => void) | undefined) => InitTsDsl; /** Creates a lazy, context-aware node with deferred evaluation. */
2273
2307
  lazy: <T extends ts.Node>(thunk: LazyThunk<T>) => LazyTsDsl<T>; /** Creates a let variable declaration (`let`). */
2274
- 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). */
2275
2309
  literal: (value: TsLiteralValue) => LiteralTsDsl; /** Creates an enum member declaration. */
2276
- 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. */
2277
- method: (name: _hey_api_codegen_core0.NodeName, fn?: ((m: MethodTsDsl) => void) | undefined) => MethodTsDsl; /** Creates a negation expression (`-x`). */
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`). */
2278
2312
  neg: (expr?: PrefixExpr | undefined, op?: ts.PrefixUnaryOperator | undefined) => PrefixTsDsl; /** Creates a new expression (e.g., `new ClassName()`). */
2279
2313
  new: (expr: NewExpr, ...args: (NewExpr | undefined)[]) => NewTsDsl; /** Creates a newline (for formatting purposes). */
2280
2314
  newline: () => NewlineTsDsl; /** Creates a logical NOT expression (`!x`). */
@@ -2290,6 +2324,9 @@ declare const $: ((id: ts.Expression | TsDsl<ts.Expression> | _hey_api_codegen_c
2290
2324
  } | {
2291
2325
  kind: "getter";
2292
2326
  name: string;
2327
+ } | {
2328
+ kind: "method";
2329
+ name: string;
2293
2330
  } | {
2294
2331
  kind: "prop";
2295
2332
  name: string;
@@ -2302,33 +2339,35 @@ declare const $: ((id: ts.Expression | TsDsl<ts.Expression> | _hey_api_codegen_c
2302
2339
  }) => ObjectPropTsDsl; /** Creates a regular expression literal (e.g., `/foo/gi`). */
2303
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. */
2304
2341
  return: (expr?: ReturnExpr | undefined) => ReturnTsDsl; /** Creates a setter method declaration. */
2305
- 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`. */
2306
2344
  stmt: (inner: ts.Expression | ts.Statement | TsDsl<any>) => StmtTsDsl; /** Creates a template literal expression. */
2307
2345
  template: (value?: TemplatePart | undefined) => TemplateTsDsl; /** Creates a ternary conditional expression (if ? then : else). */
2308
2346
  ternary: (condition?: string | ts.Expression | TsDsl<ts.Expression> | undefined) => TernaryTsDsl; /** Creates a throw statement. */
2309
2347
  throw: (error: string | ts.Expression | TsDsl<ts.Expression>, useNew?: boolean | undefined) => ThrowTsDsl; /** Creates a syntax token (e.g., `?`, `readonly`, `+`, `-`). */
2310
2348
  token: () => TokenTsDsl<never>; /** Creates a try/catch/finally statement. */
2311
2349
  try: (...args: ConstructorParameters<typeof TryTsDsl>) => TryTsDsl; /** Creates a basic type reference or type expression (e.g., Foo or Foo<T>). */
2312
- type: ((name: _hey_api_codegen_core0.NodeName, fn?: TypeExprFn | undefined) => TypeExprTsDsl) & {
2313
- /** 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`). */
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`). */
2314
2352
  and: (...args: ConstructorParameters<typeof TypeAndTsDsl>) => TypeAndTsDsl; /** Creates a qualified type reference (e.g., Foo.Bar). */
2315
- attr: (right: _hey_api_codegen_core0.NodeName | ts.Identifier) => TypeAttrTsDsl; /** Creates a basic type reference or type expression (e.g., Foo or Foo<T>). */
2316
- expr: (name: _hey_api_codegen_core0.NodeName, fn?: TypeExprFn | undefined) => TypeExprTsDsl; /** Converts a runtime value into a corresponding type expression node. */
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. */
2317
2355
  fromValue: (input: unknown) => TsDsl<ts.TypeNode>; /** Creates a function type node (e.g., `(a: string) => number`). */
2318
2356
  func: (...args: ConstructorParameters<typeof TypeFuncTsDsl>) => TypeFuncTsDsl; /** Creates an indexed-access type (e.g., `Foo<T>[K]`). */
2319
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). */
2320
2358
  literal: (value: TsLiteralValue) => TypeLiteralTsDsl; /** Creates a mapped type (e.g., `{ [K in keyof T]: U }`). */
2321
- mapped: (name?: _hey_api_codegen_core0.NodeName | undefined) => TypeMappedTsDsl; /** Creates a type literal node (e.g., { foo: string }). */
2359
+ mapped: (name?: NodeName | undefined) => TypeMappedTsDsl; /** Creates a type literal node (e.g., { foo: string }). */
2322
2360
  object: () => TypeObjectTsDsl; /** Creates a type operator node (e.g., `readonly T`, `keyof T`, `unique T`). */
2323
2361
  operator: () => TypeOperatorTsDsl; /** Represents a union type (e.g., `A | B | C`). */
2324
2362
  or: (...args: ConstructorParameters<typeof TypeOrTsDsl>) => TypeOrTsDsl; /** Creates a type parameter (e.g., `<T>`). */
2325
- param: (name?: _hey_api_codegen_core0.NodeName | undefined, fn?: ((name: TypeParamTsDsl) => void) | undefined) => TypeParamTsDsl; /** Creates a type query node (e.g., `typeof Foo`). */
2363
+ param: (name?: NodeName | undefined, fn?: ((name: TypeParamTsDsl) => void) | undefined) => TypeParamTsDsl; /** Creates a type query node (e.g., `typeof Foo`). */
2326
2364
  query: (expr: TypeQueryExpr) => TypeQueryTsDsl; /** Builds a TypeScript template literal *type* (e.g., `${Foo}-${Bar}` as a type). */
2327
2365
  template: (value?: string | ts.TypeNode | TsDsl<ts.TypeNode> | undefined) => TypeTemplateTsDsl; /** Creates a tuple type (e.g., [A, B, C]). */
2328
- tuple: (...args: ConstructorParameters<typeof TypeTupleTsDsl>) => TypeTupleTsDsl;
2366
+ tuple: (...args: ConstructorParameters<typeof TypeTupleTsDsl>) => TypeTupleTsDsl; /** Creates a named tuple element (e.g., `[resolver?: R]`). */
2367
+ tupleMember: (name: NodeName) => TypeTupleMemberTsDsl;
2329
2368
  }; /** Creates a `typeof` expression (e.g., `typeof value`). */
2330
2369
  typeofExpr: (expr: TypeOfExpr) => TypeOfExprTsDsl; /** Creates a variable declaration (`var`). */
2331
- var: (name?: _hey_api_codegen_core0.NodeName | undefined) => VarTsDsl;
2370
+ var: (name?: NodeName | undefined) => VarTsDsl;
2332
2371
  };
2333
2372
  type DollarTsDsl = {
2334
2373
  /**
@@ -2429,22 +2468,9 @@ type UserConfig$26 = Plugin$1.Name<'@faker-js/faker'> & Plugin$1.Hooks & Plugin$
2429
2468
  seed?: number;
2430
2469
  };
2431
2470
  type Config$23 = Plugin$1.Name<'@faker-js/faker'> & Plugin$1.Hooks & Plugin$1.Exports & {
2432
- /**
2433
- * Casing convention for generated names.
2434
- */
2435
- case: Casing;
2436
- /**
2437
- * Configuration for reusable schema definitions.
2438
- */
2439
- definitions: NamingOptions & FeatureToggle;
2440
- /**
2441
- * Faker locale for generated data.
2442
- */
2443
- locale: string;
2444
- /**
2445
- * Seed for deterministic output. When set, Faker will produce
2446
- * the same values across runs.
2447
- */
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. */
2448
2474
  seed?: number;
2449
2475
  };
2450
2476
  type FakerJsFakerPlugin = DefinePlugin$1<UserConfig$26, Config$23, IApi$4>;
@@ -2777,7 +2803,7 @@ interface ClientOptions$6 {
2777
2803
  throwOnError?: boolean;
2778
2804
  }
2779
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>;
2780
- 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>>;
2781
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>;
2782
2808
  type RequestOptionsFn = <T, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle$3 = 'fields'>(options: RequestOptions$6<T, TResponseStyle, ThrowOnError>) => HttpRequest<T>;
2783
2809
  type BuildUrlFn$6 = <TData extends {
@@ -2785,20 +2811,20 @@ type BuildUrlFn$6 = <TData extends {
2785
2811
  path?: Record<string, unknown>;
2786
2812
  query?: Record<string, unknown>;
2787
2813
  url: string;
2788
- }>(options: TData & Options$7<TData>) => string;
2814
+ }>(options: TData & Options$6<TData>) => string;
2789
2815
  type Client$7 = Client$8<RequestFn$6, Config$21, MethodFn$6, BuildUrlFn$6, SseFn$6> & {
2790
2816
  interceptors: Middleware$4<HttpRequest<unknown>, HttpResponse<unknown>, unknown, ResolvedRequestOptions$4>;
2791
2817
  requestOptions: RequestOptionsFn;
2792
2818
  };
2793
- interface TDataShape$6 {
2819
+ interface TDataShape$5 {
2794
2820
  body?: unknown;
2795
2821
  headers?: unknown;
2796
2822
  path?: unknown;
2797
2823
  query?: unknown;
2798
2824
  url: string;
2799
2825
  }
2800
- type OmitKeys$6<T, K> = Pick<T, Exclude<keyof T, K>>;
2801
- 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'>);
2802
2828
  //#endregion
2803
2829
  //#region src/plugins/@hey-api/client-axios/bundle/types.d.ts
2804
2830
  interface Config$20<T extends ClientOptions$5 = ClientOptions$5> extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, Config$22 {
@@ -2855,26 +2881,16 @@ type RequestResult$5<TData = unknown, TError = unknown, ThrowOnError extends boo
2855
2881
  error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
2856
2882
  })>;
2857
2883
  type MethodFn$5 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$5<TData, ThrowOnError>, 'method'>) => RequestResult$5<TData, TError, ThrowOnError>;
2858
- 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>>;
2859
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>;
2860
2886
  type BuildUrlFn$5 = <TData extends {
2861
- body?: unknown;
2862
2887
  path?: Record<string, unknown>;
2863
2888
  query?: Record<string, unknown>;
2864
2889
  url: string;
2865
- }>(options: TData & Options$6<TData>) => string;
2890
+ }>(options: TData & Pick<RequestOptions$5<unknown, boolean>, 'axios' | 'baseURL' | 'paramsSerializer' | 'querySerializer'>) => string;
2866
2891
  type Client$6 = Client$8<RequestFn$5, Config$20, MethodFn$5, BuildUrlFn$5, SseFn$5> & {
2867
2892
  instance: AxiosInstance;
2868
2893
  };
2869
- interface TDataShape$5 {
2870
- body?: unknown;
2871
- headers?: unknown;
2872
- path?: unknown;
2873
- query?: unknown;
2874
- url: string;
2875
- }
2876
- type OmitKeys$5<T, K> = Pick<T, Exclude<keyof T, K>>;
2877
- 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'>);
2878
2894
  //#endregion
2879
2895
  //#region src/plugins/@hey-api/client-axios/types.d.ts
2880
2896
  type UserConfig$25 = Plugin$1.Name<'@hey-api/client-axios'> & Client.Config & {
@@ -2990,7 +3006,7 @@ interface ClientOptions$4 {
2990
3006
  throwOnError?: boolean;
2991
3007
  }
2992
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>;
2993
- 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>>;
2994
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>;
2995
3011
  type BuildUrlFn$4 = <TData extends {
2996
3012
  body?: unknown;
@@ -3107,7 +3123,7 @@ interface ClientOptions$3 {
3107
3123
  throwOnError?: boolean;
3108
3124
  }
3109
3125
  type MethodFn$3 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions$3<TData, ThrowOnError>, 'method'>) => RequestResult$3<TData, TError, ThrowOnError>;
3110
- 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>>;
3111
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>;
3112
3128
  type BuildUrlFn$3 = <TData extends {
3113
3129
  body?: unknown;
@@ -3374,7 +3390,7 @@ interface ClientOptions$1 {
3374
3390
  throwOnError?: boolean;
3375
3391
  }
3376
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>;
3377
- 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>>;
3378
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>;
3379
3395
  type BuildUrlFn$1 = <TData extends {
3380
3396
  body?: unknown;
@@ -3606,7 +3622,7 @@ interface ClientOptions {
3606
3622
  throwOnError?: boolean;
3607
3623
  }
3608
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>;
3609
- 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>>;
3610
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>;
3611
3627
  type BuildUrlFn = <TData extends {
3612
3628
  body?: unknown;
@@ -7680,13 +7696,13 @@ type TanStackVueQueryPlugin = DefinePlugin$1<UserConfig$8, Config$5>;
7680
7696
  //#endregion
7681
7697
  //#region src/plugins/arktype/shared/types.d.ts
7682
7698
  type ValidatorArgs$2 = {
7683
- operation: IR$1.OperationObject;
7699
+ operation: IR$1.OperationObject; /** The plugin instance. */
7684
7700
  plugin: ArktypePlugin['Instance'];
7685
7701
  };
7686
7702
  //#endregion
7687
7703
  //#region src/plugins/arktype/api.d.ts
7688
7704
  type IApi$2 = {
7689
- createRequestValidator: (args: ValidatorArgs$2) => ReturnType<typeof $.func> | undefined;
7705
+ createRequestValidator: (args: RequestSchemaContext<ArktypePlugin['Instance']>) => ReturnType<typeof $.func> | undefined;
7690
7706
  createResponseValidator: (args: ValidatorArgs$2) => ReturnType<typeof $.func> | undefined;
7691
7707
  };
7692
7708
  //#endregion
@@ -8777,7 +8793,8 @@ interface ValibotFinal extends Pick<ValibotResult, 'pipes'> {
8777
8793
  //#endregion
8778
8794
  //#region src/plugins/valibot/api.d.ts
8779
8795
  type IApi$1 = {
8780
- 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;
8781
8798
  createResponseValidator: (args: ValidatorArgs$1) => ReturnType<typeof $.func> | undefined;
8782
8799
  };
8783
8800
  //#endregion
@@ -8906,23 +8923,21 @@ type ValibotResolvers = Plugin$1.Resolvers<{
8906
8923
  *
8907
8924
  * Allow customization of validator function bodies.
8908
8925
  *
8909
- * Example path: `~resolvers.validator.request` or `~resolvers.validator.response`
8910
- *
8911
8926
  * Returning `undefined` will execute the default resolver logic.
8912
8927
  */
8913
- validator?: ValidatorResolver$1 | {
8928
+ validator?: ((ctx: ValidatorResolverContext$1) => PipeResult | null | undefined) | {
8914
8929
  /**
8915
8930
  * Controls how the request validator function body is generated.
8916
8931
  *
8917
8932
  * Returning `undefined` will execute the default resolver logic.
8918
8933
  */
8919
- request?: ValidatorResolver$1;
8934
+ request?: (ctx: RequestValidatorResolverContext$1) => PipeResult | null | undefined;
8920
8935
  /**
8921
8936
  * Controls how the response validator function body is generated.
8922
8937
  *
8923
8938
  * Returning `undefined` will execute the default resolver logic.
8924
8939
  */
8925
- response?: ValidatorResolver$1;
8940
+ response?: (ctx: ResponseValidatorResolverContext$1) => PipeResult | null | undefined;
8926
8941
  };
8927
8942
  /**
8928
8943
  * Resolver for void schemas.
@@ -8933,7 +8948,6 @@ type ValibotResolvers = Plugin$1.Resolvers<{
8933
8948
  */
8934
8949
  void?: (ctx: VoidResolverContext$1) => PipeResult;
8935
8950
  }>;
8936
- type ValidatorResolver$1 = (ctx: ValidatorResolverContext$1) => PipeResult | null | undefined;
8937
8951
  interface BaseContext$1 extends DollarTsDsl {
8938
8952
  /**
8939
8953
  * Functions for working with pipes.
@@ -9143,15 +9157,61 @@ interface UnknownResolverContext$1 extends BaseContext$1 {
9143
9157
  };
9144
9158
  schema: SchemaWithType<'unknown'>;
9145
9159
  }
9146
- 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. */
9147
9203
  operation: IR$1.OperationObject;
9148
9204
  /**
9149
9205
  * Provides access to commonly used symbols within the plugin.
9150
9206
  */
9151
9207
  symbols: BaseContext$1['symbols'] & {
9208
+ /**
9209
+ * The response schema symbol.
9210
+ */
9152
9211
  schema: Symbol;
9153
9212
  };
9154
9213
  }
9214
+ type ValidatorResolverContext$1 = RequestValidatorResolverContext$1 | ResponseValidatorResolverContext$1;
9155
9215
  interface VoidResolverContext$1 extends BaseContext$1 {
9156
9216
  /**
9157
9217
  * Nodes used to build different parts of the result.
@@ -9237,6 +9297,36 @@ type UserConfig$2 = Plugin$1.Name<'valibot'> & Plugin$1.Hooks & Plugin$1.UserCom
9237
9297
  * @default true
9238
9298
  */
9239
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
+ };
9240
9330
  /**
9241
9331
  * Casing convention for generated names.
9242
9332
  *
@@ -9249,12 +9339,128 @@ type UserConfig$2 = Plugin$1.Name<'valibot'> & Plugin$1.Hooks & Plugin$1.UserCom
9249
9339
  * @default true
9250
9340
  */
9251
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
+ };
9252
9372
  /**
9253
9373
  * Naming pattern for generated names.
9254
9374
  *
9255
9375
  * @default 'v{{name}}Data'
9256
9376
  */
9257
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>;
9258
9464
  };
9259
9465
  /**
9260
9466
  * Configuration for response-specific Valibot schemas.
@@ -9329,7 +9535,15 @@ type Config$1 = Plugin$1.Name<'valibot'> & Plugin$1.Hooks & Plugin$1.Comments &
9329
9535
  node: ReturnType<typeof $.object>;
9330
9536
  schema: IR$1.SchemaObject;
9331
9537
  }) => void); /** Configuration for request-specific Valibot schemas. */
9332
- 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. */
9333
9547
  responses: NamingOptions & FeatureToggle; /** Configuration for webhook-specific Valibot schemas. */
9334
9548
  webhooks: NamingOptions & FeatureToggle;
9335
9549
  };
@@ -9385,8 +9599,9 @@ interface ZodFinal extends Pick<ZodResult, 'expression'> {
9385
9599
  //#endregion
9386
9600
  //#region src/plugins/zod/api.d.ts
9387
9601
  type IApi = {
9388
- createRequestValidator: (args: ValidatorArgs) => ReturnType<typeof $.func> | undefined;
9389
- 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;
9390
9605
  };
9391
9606
  //#endregion
9392
9607
  //#region src/plugins/zod/resolvers.d.ts
@@ -9500,23 +9715,21 @@ type ZodResolvers = Plugin$1.Resolvers<{
9500
9715
  *
9501
9716
  * Allow customization of validator function bodies.
9502
9717
  *
9503
- * Example path: `~resolvers.validator.request` or `~resolvers.validator.response`
9504
- *
9505
9718
  * Returning `undefined` will execute the default resolver logic.
9506
9719
  */
9507
- validator?: ValidatorResolver | {
9720
+ validator?: ((ctx: ValidatorResolverContext) => MaybeArray<TsDsl<ts.Statement>> | null | undefined) | {
9508
9721
  /**
9509
9722
  * Controls how the request validator function body is generated.
9510
9723
  *
9511
9724
  * Returning `undefined` will execute the default resolver logic.
9512
9725
  */
9513
- request?: ValidatorResolver;
9726
+ request?: (ctx: RequestValidatorResolverContext) => MaybeArray<TsDsl<ts.Statement>> | null | undefined;
9514
9727
  /**
9515
9728
  * Controls how the response validator function body is generated.
9516
9729
  *
9517
9730
  * Returning `undefined` will execute the default resolver logic.
9518
9731
  */
9519
- response?: ValidatorResolver;
9732
+ response?: (ctx: ResponseValidatorResolverContext) => MaybeArray<TsDsl<ts.Statement>> | null | undefined;
9520
9733
  };
9521
9734
  /**
9522
9735
  * Resolver for void schemas.
@@ -9527,7 +9740,6 @@ type ZodResolvers = Plugin$1.Resolvers<{
9527
9740
  */
9528
9741
  void?: (ctx: VoidResolverContext) => ChainResult;
9529
9742
  }>;
9530
- type ValidatorResolver = (ctx: ValidatorResolverContext) => MaybeArray<TsDsl<ts.Statement>> | null | undefined;
9531
9743
  interface BaseContext extends DollarTsDsl {
9532
9744
  /**
9533
9745
  * Functions for working with chains.
@@ -9836,15 +10048,61 @@ interface UnknownResolverContext extends BaseContext {
9836
10048
  };
9837
10049
  schema: SchemaWithType<'unknown'>;
9838
10050
  }
9839
- 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. */
9840
10094
  operation: IR$1.OperationObject;
9841
10095
  /**
9842
10096
  * Provides access to commonly used symbols within the plugin.
9843
10097
  */
9844
10098
  symbols: BaseContext['symbols'] & {
10099
+ /**
10100
+ * The response schema symbol.
10101
+ */
9845
10102
  schema: Symbol;
9846
10103
  };
9847
10104
  }
10105
+ type ValidatorResolverContext = RequestValidatorResolverContext | ResponseValidatorResolverContext;
9848
10106
  interface VoidResolverContext extends BaseContext {
9849
10107
  /**
9850
10108
  * Nodes used to build different parts of the result.
@@ -9997,7 +10255,7 @@ type UserConfig$1 = Plugin$1.Name<'zod'> & Plugin$1.Hooks & Plugin$1.UserComment
9997
10255
  /**
9998
10256
  * Configuration for request-specific Zod schemas.
9999
10257
  *
10000
- * Controls generation of Zod schemas for request bodies, query parameters, path
10258
+ * Controls generation of Zod schemas for request bodies, path parameters, query
10001
10259
  * parameters, and headers.
10002
10260
  *
10003
10261
  * Can be:
@@ -10008,6 +10266,73 @@ type UserConfig$1 = Plugin$1.Name<'zod'> & Plugin$1.Hooks & Plugin$1.UserComment
10008
10266
  * @default true
10009
10267
  */
10010
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
+ };
10011
10336
  /**
10012
10337
  * Casing convention for generated names.
10013
10338
  *
@@ -10020,12 +10345,239 @@ type UserConfig$1 = Plugin$1.Name<'zod'> & Plugin$1.Hooks & Plugin$1.UserComment
10020
10345
  * @default true
10021
10346
  */
10022
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
+ };
10023
10415
  /**
10024
10416
  * Naming pattern for generated names.
10025
10417
  *
10026
10418
  * @default 'z{{name}}Data'
10027
10419
  */
10028
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>;
10029
10581
  /**
10030
10582
  * Configuration for TypeScript type generation from Zod schemas.
10031
10583
  *
@@ -10247,7 +10799,15 @@ type Config = Plugin$1.Name<'zod'> & Plugin$1.Hooks & Plugin$1.Comments & Plugin
10247
10799
  node: ReturnType<typeof $.object>;
10248
10800
  schema: IR$1.SchemaObject;
10249
10801
  }) => void); /** Configuration for request-specific Zod schemas. */
10250
- 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. */
10251
10811
  responses: NamingOptions & FeatureToggle & TypeOptions; /** Configuration for TypeScript type generation from Zod schemas. */
10252
10812
  types: {
10253
10813
  /** Configuration for `infer` types. */infer: FeatureToggle & {