@hey-api/openapi-ts 0.87.1 → 0.87.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,6 @@
1
1
  import { IProject, Project, Symbol, SymbolIdentifier, SymbolIn, SymbolMeta } from "@hey-api/codegen-core";
2
2
  import { RangeOptions, SemVer } from "semver";
3
+ import * as typescript422 from "typescript";
3
4
  import ts from "typescript";
4
5
 
5
6
  //#region src/plugins/shared/types/refs.d.ts
@@ -2796,7 +2797,7 @@ type StringCase = 'camelCase' | 'PascalCase' | 'preserve' | 'snake_case' | 'SCRE
2796
2797
  type StringName = string | ((name: string) => string);
2797
2798
  //#endregion
2798
2799
  //#region src/plugins/@angular/common/types.d.ts
2799
- type UserConfig$22 = Plugin.Name<'@angular/common'> & Plugin.Hooks & {
2800
+ type UserConfig$23 = Plugin.Name<'@angular/common'> & Plugin.Hooks & {
2800
2801
  /**
2801
2802
  * Should the exports from the generated files be re-exported in the index
2802
2803
  * barrel file?
@@ -2927,10 +2928,10 @@ type Config$14 = Plugin.Name<'@angular/common'> & Plugin.Hooks & {
2927
2928
  methodNameBuilder: (operation: IR.OperationObject) => string;
2928
2929
  };
2929
2930
  };
2930
- type AngularCommonPlugin = DefinePlugin<UserConfig$22, Config$14>;
2931
+ type AngularCommonPlugin = DefinePlugin<UserConfig$23, Config$14>;
2931
2932
  //#endregion
2932
2933
  //#region src/plugins/@hey-api/client-axios/types.d.ts
2933
- type UserConfig$21 = Plugin.Name<'@hey-api/client-axios'> & Client.Config & {
2934
+ type UserConfig$22 = Plugin.Name<'@hey-api/client-axios'> & Client.Config & {
2934
2935
  /**
2935
2936
  * Throw an error instead of returning it in the response?
2936
2937
  *
@@ -2938,10 +2939,10 @@ type UserConfig$21 = Plugin.Name<'@hey-api/client-axios'> & Client.Config & {
2938
2939
  */
2939
2940
  throwOnError?: boolean;
2940
2941
  };
2941
- type HeyApiClientAxiosPlugin = DefinePlugin<UserConfig$21, UserConfig$21>;
2942
+ type HeyApiClientAxiosPlugin = DefinePlugin<UserConfig$22, UserConfig$22>;
2942
2943
  //#endregion
2943
2944
  //#region src/plugins/@hey-api/client-fetch/types.d.ts
2944
- type UserConfig$20 = Plugin.Name<'@hey-api/client-fetch'> & Client.Config & {
2945
+ type UserConfig$21 = Plugin.Name<'@hey-api/client-fetch'> & Client.Config & {
2945
2946
  /**
2946
2947
  * Throw an error instead of returning it in the response?
2947
2948
  *
@@ -2949,10 +2950,10 @@ type UserConfig$20 = Plugin.Name<'@hey-api/client-fetch'> & Client.Config & {
2949
2950
  */
2950
2951
  throwOnError?: boolean;
2951
2952
  };
2952
- type HeyApiClientFetchPlugin = DefinePlugin<UserConfig$20, UserConfig$20>;
2953
+ type HeyApiClientFetchPlugin = DefinePlugin<UserConfig$21, UserConfig$21>;
2953
2954
  //#endregion
2954
2955
  //#region src/plugins/@hey-api/client-next/types.d.ts
2955
- type UserConfig$19 = Plugin.Name<'@hey-api/client-next'> & Client.Config & {
2956
+ type UserConfig$20 = Plugin.Name<'@hey-api/client-next'> & Client.Config & {
2956
2957
  /**
2957
2958
  * Throw an error instead of returning it in the response?
2958
2959
  *
@@ -2960,14 +2961,14 @@ type UserConfig$19 = Plugin.Name<'@hey-api/client-next'> & Client.Config & {
2960
2961
  */
2961
2962
  throwOnError?: boolean;
2962
2963
  };
2963
- type HeyApiClientNextPlugin = DefinePlugin<UserConfig$19, UserConfig$19>;
2964
+ type HeyApiClientNextPlugin = DefinePlugin<UserConfig$20, UserConfig$20>;
2964
2965
  //#endregion
2965
2966
  //#region src/plugins/@hey-api/client-nuxt/types.d.ts
2966
- type UserConfig$18 = Plugin.Name<'@hey-api/client-nuxt'> & Client.Config;
2967
- type HeyApiClientNuxtPlugin = DefinePlugin<UserConfig$18, UserConfig$18>;
2967
+ type UserConfig$19 = Plugin.Name<'@hey-api/client-nuxt'> & Client.Config;
2968
+ type HeyApiClientNuxtPlugin = DefinePlugin<UserConfig$19, UserConfig$19>;
2968
2969
  //#endregion
2969
2970
  //#region src/plugins/@hey-api/client-ofetch/types.d.ts
2970
- type UserConfig$17 = Plugin.Name<'@hey-api/client-ofetch'> & Client.Config & {
2971
+ type UserConfig$18 = Plugin.Name<'@hey-api/client-ofetch'> & Client.Config & {
2971
2972
  /**
2972
2973
  * Throw an error instead of returning it in the response?
2973
2974
  *
@@ -2975,7 +2976,7 @@ type UserConfig$17 = Plugin.Name<'@hey-api/client-ofetch'> & Client.Config & {
2975
2976
  */
2976
2977
  throwOnError?: boolean;
2977
2978
  };
2978
- type HeyApiClientOfetchPlugin = DefinePlugin<UserConfig$17, UserConfig$17>;
2979
+ type HeyApiClientOfetchPlugin = DefinePlugin<UserConfig$18, UserConfig$18>;
2979
2980
  //#endregion
2980
2981
  //#region src/plugins/@hey-api/client-core/types.d.ts
2981
2982
  interface PluginHandler {
@@ -3045,7 +3046,7 @@ declare namespace Client {
3045
3046
  }
3046
3047
  //#endregion
3047
3048
  //#region src/plugins/@hey-api/client-angular/types.d.ts
3048
- type UserConfig$16 = Plugin.Name<'@hey-api/client-angular'> & Client.Config & {
3049
+ type UserConfig$17 = Plugin.Name<'@hey-api/client-angular'> & Client.Config & {
3049
3050
  /**
3050
3051
  * Throw an error instead of returning it in the response?
3051
3052
  *
@@ -3053,7 +3054,18 @@ type UserConfig$16 = Plugin.Name<'@hey-api/client-angular'> & Client.Config & {
3053
3054
  */
3054
3055
  throwOnError?: boolean;
3055
3056
  };
3056
- type HeyApiClientAngularPlugin = DefinePlugin<UserConfig$16, UserConfig$16>;
3057
+ type HeyApiClientAngularPlugin = DefinePlugin<UserConfig$17, UserConfig$17>;
3058
+ //#endregion
3059
+ //#region src/plugins/@hey-api/client-ky/types.d.ts
3060
+ type UserConfig$16 = Plugin.Name<'@hey-api/client-ky'> & Client.Config & {
3061
+ /**
3062
+ * Throw an error instead of returning it in the response?
3063
+ *
3064
+ * @default false
3065
+ */
3066
+ throwOnError?: boolean;
3067
+ };
3068
+ type HeyApiClientKyPlugin = DefinePlugin<UserConfig$16, UserConfig$16>;
3057
3069
  //#endregion
3058
3070
  //#region src/openApi/2.0.x/types/json-schema-draft-4.d.ts
3059
3071
  interface JsonSchemaDraft4 extends EnumExtensions {
@@ -9919,6 +9931,826 @@ type Config$5 = Plugin.Name<'@tanstack/vue-query'> & Plugin.Hooks & {
9919
9931
  };
9920
9932
  type TanStackVueQueryPlugin = DefinePlugin<UserConfig$6, Config$5>;
9921
9933
  //#endregion
9934
+ //#region src/ts-dsl/base.d.ts
9935
+ type MaybeArray$1<T> = T | ReadonlyArray<T>;
9936
+ type WithStatement<T = ts.Expression> = T | ts.Statement;
9937
+ type WithString<T = ts.Expression> = T | string;
9938
+ interface ITsDsl<T extends ts.Node = ts.Node> {
9939
+ $render(): T;
9940
+ }
9941
+ declare abstract class TsDsl<T extends ts.Node = ts.Node> implements ITsDsl<T> {
9942
+ abstract $render(): T;
9943
+ protected $expr<T>(expr: WithString<T>): T;
9944
+ /** Conditionally applies a callback to this builder. */
9945
+ $if<T extends TsDsl, V$1, R extends TsDsl = T>(this: T, value: V$1, ifTrue: (self: T, v: Exclude<V$1, false | null | undefined>) => R | void, ifFalse?: (self: T, v: Extract<V$1, false | null | undefined>) => R | void): R | T;
9946
+ $if<T extends TsDsl, V$1, R extends TsDsl = T>(this: T, value: V$1, ifTrue: (v: Exclude<V$1, false | null | undefined>) => R | void, ifFalse?: (v: Extract<V$1, false | null | undefined>) => R | void): R | T;
9947
+ $if<T extends TsDsl, V$1, R extends TsDsl = T>(this: T, value: V$1, ifTrue: () => R | void, ifFalse?: () => R | void): R | T;
9948
+ protected $node<I>(input: I): NodeOfMaybe<I>;
9949
+ protected $stmt(input: MaybeArray$1<MaybeTsDsl<WithString<WithStatement>>>): ReadonlyArray<ts.Statement>;
9950
+ protected $type<I>(input: I, args?: ReadonlyArray<ts.TypeNode>): TypeOfMaybe<I>;
9951
+ private _render;
9952
+ }
9953
+ type NodeOfMaybe<I> = undefined extends I ? NodeOf<NonNullable<I>> | undefined : NodeOf<I>;
9954
+ type NodeOf<I> = I extends ReadonlyArray<infer U> ? ReadonlyArray<U extends TsDsl<infer N> ? N : U> : I extends string ? ts.Expression : I extends boolean ? ts.Expression : I extends TsDsl<infer N> ? N : I extends ts.Node ? I : never;
9955
+ type MaybeTsDsl<T> = string extends T ? Exclude<T, string> extends ts.Node ? string | Exclude<T, string> | TsDsl<Exclude<T, string>> : string : T extends TsDsl<any> ? T : T extends ts.Node ? T | TsDsl<T> : never;
9956
+ type TypeOfTsDsl<T> = T extends TsDsl<infer U> ? U : never;
9957
+ declare abstract class TypeTsDsl<T extends ts.TypeNode | ts.TypeElement | ts.LiteralTypeNode | ts.TypeParameterDeclaration = ts.TypeNode> extends TsDsl<T> {}
9958
+ type TypeOfMaybe<I> = undefined extends I ? TypeOf<NonNullable<I>> | undefined : TypeOf<I>;
9959
+ type TypeOf<I> = I extends ReadonlyArray<infer U> ? ReadonlyArray<TypeOf<U>> : I extends string ? ts.TypeNode : I extends boolean ? ts.LiteralTypeNode : I extends TsDsl<infer N> ? N : I extends ts.TypeNode ? I : never;
9960
+ //#endregion
9961
+ //#region src/ts-dsl/array.d.ts
9962
+ declare class ArrayTsDsl extends TsDsl<ts.ArrayLiteralExpression> {
9963
+ private _elements;
9964
+ /** Adds one or more elements to the array expression. */
9965
+ elements(...exprs: ReadonlyArray<string | number | boolean | TsDsl<ts.Expression>>): this;
9966
+ $render(): ts.ArrayLiteralExpression;
9967
+ }
9968
+ //#endregion
9969
+ //#region src/ts-dsl/await.d.ts
9970
+ declare class AwaitTsDsl extends TsDsl<ts.AwaitExpression> {
9971
+ private _awaitExpr;
9972
+ constructor(expr: MaybeTsDsl<WithString>);
9973
+ $render(): ts.AwaitExpression;
9974
+ }
9975
+ interface AwaitTsDsl extends AccessMixin {}
9976
+ //#endregion
9977
+ //#region src/ts-dsl/mixins/args.d.ts
9978
+ /**
9979
+ * Adds `.arg()` and `.args()` for managing expression arguments in call-like nodes.
9980
+ */
9981
+ declare class ArgsMixin extends TsDsl {
9982
+ private _args?;
9983
+ /** Adds a single expression argument. */
9984
+ arg(arg: MaybeTsDsl<WithString>): this;
9985
+ /** Adds one or more expression arguments. */
9986
+ args(...args: ReadonlyArray<MaybeTsDsl<WithString>>): this;
9987
+ /** Renders the arguments into an array of `Expression`s. */
9988
+ protected $args(): ReadonlyArray<ts.Expression>;
9989
+ $render(): ts.Node;
9990
+ }
9991
+ //#endregion
9992
+ //#region src/ts-dsl/mixins/type-args.d.ts
9993
+ declare class TypeArgsMixin extends TsDsl {
9994
+ protected _generics?: Array<WithString<MaybeTsDsl<TypeOfTsDsl<TypeTsDsl>>>>;
9995
+ /** Adds a single type argument (e.g. `string` in `Foo<string>`). */
9996
+ generic(arg: WithString<MaybeTsDsl<TypeOfTsDsl<TypeTsDsl>>>): this;
9997
+ /** Adds type arguments (e.g. `Map<string, number>`). */
9998
+ generics(...args: ReadonlyArray<WithString<MaybeTsDsl<TypeOfTsDsl<TypeTsDsl>>>>): this;
9999
+ /**
10000
+ * Returns the type arguments as an array of ts.TypeNode nodes.
10001
+ */
10002
+ protected $generics(): ReadonlyArray<ts.TypeNode> | undefined;
10003
+ $render(): ts.Node;
10004
+ }
10005
+ //#endregion
10006
+ //#region src/ts-dsl/call.d.ts
10007
+ declare class CallTsDsl extends TsDsl<ts.CallExpression> {
10008
+ private _callee;
10009
+ constructor(callee: MaybeTsDsl<WithString>, ...args: ReadonlyArray<MaybeTsDsl<WithString> | undefined>);
10010
+ $render(): ts.CallExpression;
10011
+ }
10012
+ interface CallTsDsl extends AccessMixin, ArgsMixin, TypeArgsMixin {}
10013
+ //#endregion
10014
+ //#region src/ts-dsl/return.d.ts
10015
+ declare class ReturnTsDsl extends TsDsl<ts.ReturnStatement> {
10016
+ private _returnExpr?;
10017
+ constructor(expr?: MaybeTsDsl<WithString>);
10018
+ $render(): ts.ReturnStatement;
10019
+ }
10020
+ interface ReturnTsDsl extends AccessMixin {}
10021
+ //#endregion
10022
+ //#region src/ts-dsl/mixins/access.d.ts
10023
+ declare class AccessMixin {
10024
+ /** Accesses a property on the current expression (e.g. `this.foo`). */
10025
+ attr(this: MaybeTsDsl<WithString>, name: WithString<ts.MemberName> | number): AttrTsDsl;
10026
+ /** Awaits the current expression (e.g. `await expr`). */
10027
+ await(this: MaybeTsDsl<WithString>): AwaitTsDsl;
10028
+ /** Calls the current expression (e.g. `fn(arg1, arg2)`). */
10029
+ call(this: MaybeTsDsl<WithString>, ...args: ReadonlyArray<MaybeTsDsl<WithString> | undefined>): CallTsDsl;
10030
+ /** Produces a `return` statement returning the current expression. */
10031
+ return(this: MaybeTsDsl<WithString>): ReturnTsDsl;
10032
+ }
10033
+ //#endregion
10034
+ //#region src/ts-dsl/binary.d.ts
10035
+ type Operator = '!=' | '!==' | '&&' | '*' | '+' | '-' | '/' | '<' | '<=' | '=' | '==' | '===' | '>' | '>=' | '??' | '||';
10036
+ declare class BinaryTsDsl extends TsDsl<ts.BinaryExpression> {
10037
+ private left;
10038
+ private operator;
10039
+ private right;
10040
+ constructor(left: MaybeTsDsl<WithString>, operator: Operator | ts.BinaryOperator, right: MaybeTsDsl<WithString>);
10041
+ $render(): ts.BinaryExpression;
10042
+ private mapOperator;
10043
+ }
10044
+ //#endregion
10045
+ //#region src/ts-dsl/mixins/assignment.d.ts
10046
+ declare class AssignmentMixin {
10047
+ /** Creates an assignment expression (e.g. `this = expr`). */
10048
+ assign(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10049
+ }
10050
+ //#endregion
10051
+ //#region src/ts-dsl/mixins/operator.d.ts
10052
+ declare class OperatorMixin {
10053
+ /** Logical AND — `this && expr` */
10054
+ and(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10055
+ /** Nullish coalescing — `this ?? expr` */
10056
+ coalesce(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10057
+ /** Division — `this / expr` */
10058
+ div(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10059
+ /** Strict equality — `this === expr` */
10060
+ eq(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10061
+ /** Greater than — `this > expr` */
10062
+ gt(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10063
+ /** Greater than or equal — `this >= expr` */
10064
+ gte(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10065
+ /** Loose equality — `this == expr` */
10066
+ looseEq(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10067
+ /** Loose inequality — `this != expr` */
10068
+ looseNeq(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10069
+ /** Less than — `this < expr` */
10070
+ lt(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10071
+ /** Less than or equal — `this <= expr` */
10072
+ lte(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10073
+ /** Subtraction — `this - expr` */
10074
+ minus(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10075
+ /** Strict inequality — `this !== expr` */
10076
+ neq(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10077
+ /** Logical OR — `this || expr` */
10078
+ or(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10079
+ /** Addition — `this + expr` */
10080
+ plus(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10081
+ /** Multiplication — `this * expr` */
10082
+ times(this: MaybeTsDsl<WithString>, expr: MaybeTsDsl<WithString>): BinaryTsDsl;
10083
+ }
10084
+ //#endregion
10085
+ //#region src/ts-dsl/mixins/optional.d.ts
10086
+ declare class OptionalMixin {
10087
+ protected isOptional?: boolean;
10088
+ protected questionToken?: ts.PunctuationToken<ts.SyntaxKind.QuestionToken>;
10089
+ optional<T extends this>(this: T, condition?: boolean): T;
10090
+ }
10091
+ //#endregion
10092
+ //#region src/ts-dsl/attr.d.ts
10093
+ declare class AttrTsDsl extends TsDsl<ts.PropertyAccessExpression | ts.ElementAccessExpression> {
10094
+ private left;
10095
+ private right;
10096
+ constructor(left: MaybeTsDsl<WithString>, right: WithString<ts.MemberName> | number);
10097
+ $render(): ts.PropertyAccessExpression | ts.ElementAccessExpression;
10098
+ }
10099
+ interface AttrTsDsl extends AccessMixin, AssignmentMixin, OperatorMixin, OptionalMixin {}
10100
+ //#endregion
10101
+ //#region src/ts-dsl/mixins/decorator.d.ts
10102
+ declare class DecoratorMixin extends TsDsl {
10103
+ private decorators?;
10104
+ /** Adds a decorator (e.g. `@sealed({ in: 'root' })`). */
10105
+ decorator(name: WithString, ...args: ReadonlyArray<MaybeTsDsl<WithString>>): this;
10106
+ /** Renders the decorators into an array of `ts.Decorator`s. */
10107
+ protected $decorators(): ReadonlyArray<ts.Decorator>;
10108
+ $render(): ts.Node;
10109
+ }
10110
+ //#endregion
10111
+ //#region src/ts-dsl/describe.d.ts
10112
+ declare class DescribeTsDsl extends TsDsl {
10113
+ private _lines;
10114
+ constructor(lines?: MaybeArray$1<string>, fn?: (d: DescribeTsDsl) => void);
10115
+ add(...lines: ReadonlyArray<string>): this;
10116
+ apply<T extends ts.Node>(node: T): T;
10117
+ $render(): ts.Node;
10118
+ }
10119
+ //#endregion
10120
+ //#region src/ts-dsl/mixins/describe.d.ts
10121
+ declare function DescribeMixin<TBase extends new (...args: ReadonlyArray<any>) => ITsDsl>(Base: TBase): {
10122
+ new (...args: ReadonlyArray<any>): {
10123
+ _desc?: DescribeTsDsl;
10124
+ describe(lines?: MaybeArray$1<string>, fn?: (d: DescribeTsDsl) => void): /*elided*/any;
10125
+ $render(): typescript422.Node;
10126
+ };
10127
+ } & TBase;
10128
+ type DescribeMixin = InstanceType<ReturnType<typeof DescribeMixin>>;
10129
+ //#endregion
10130
+ //#region src/ts-dsl/mixins/modifiers.d.ts
10131
+ type Target = object & {
10132
+ _m?(kind: ts.ModifierSyntaxKind, condition?: boolean): unknown;
10133
+ };
10134
+ /**
10135
+ * Mixin that adds an `abstract` modifier to a node.
10136
+ */
10137
+ declare class AbstractMixin {
10138
+ /**
10139
+ * Adds the `abstract` keyword modifier if the condition is true.
10140
+ *
10141
+ * @param condition - Whether to add the modifier (default: true).
10142
+ * @returns The target object for chaining.
10143
+ */
10144
+ abstract<T extends Target>(this: T, condition?: boolean): T;
10145
+ }
10146
+ /**
10147
+ * Mixin that adds an `async` modifier to a node.
10148
+ */
10149
+ declare class AsyncMixin {
10150
+ /**
10151
+ * Adds the `async` keyword modifier if the condition is true.
10152
+ *
10153
+ * @param condition - Whether to add the modifier (default: true).
10154
+ * @returns The target object for chaining.
10155
+ */
10156
+ async<T extends Target>(this: T, condition?: boolean): T;
10157
+ }
10158
+ /**
10159
+ * Mixin that adds a `default` modifier to a node.
10160
+ */
10161
+ declare class DefaultMixin {
10162
+ /**
10163
+ * Adds the `default` keyword modifier if the condition is true.
10164
+ *
10165
+ * @param condition - Whether to add the modifier (default: true).
10166
+ * @returns The target object for chaining.
10167
+ */
10168
+ default<T extends Target>(this: T, condition?: boolean): T;
10169
+ }
10170
+ /**
10171
+ * Mixin that adds an `export` modifier to a node.
10172
+ */
10173
+ declare class ExportMixin {
10174
+ /**
10175
+ * Adds the `export` keyword modifier if the condition is true.
10176
+ *
10177
+ * @param condition - Whether to add the modifier (default: true).
10178
+ * @returns The target object for chaining.
10179
+ */
10180
+ export<T extends Target>(this: T, condition?: boolean): T;
10181
+ }
10182
+ /**
10183
+ * Mixin that adds a `private` modifier to a node.
10184
+ */
10185
+ declare class PrivateMixin {
10186
+ /**
10187
+ * Adds the `private` keyword modifier if the condition is true.
10188
+ *
10189
+ * @param condition - Whether to add the modifier (default: true).
10190
+ * @returns The target object for chaining.
10191
+ */
10192
+ private<T extends Target>(this: T, condition?: boolean): T;
10193
+ }
10194
+ /**
10195
+ * Mixin that adds a `protected` modifier to a node.
10196
+ */
10197
+ declare class ProtectedMixin {
10198
+ /**
10199
+ * Adds the `protected` keyword modifier if the condition is true.
10200
+ *
10201
+ * @param condition - Whether to add the modifier (default: true).
10202
+ * @returns The target object for chaining.
10203
+ */
10204
+ protected<T extends Target>(this: T, condition?: boolean): T;
10205
+ }
10206
+ /**
10207
+ * Mixin that adds a `public` modifier to a node.
10208
+ */
10209
+ declare class PublicMixin {
10210
+ /**
10211
+ * Adds the `public` keyword modifier if the condition is true.
10212
+ *
10213
+ * @param condition - Whether to add the modifier (default: true).
10214
+ * @returns The target object for chaining.
10215
+ */
10216
+ public<T extends Target>(this: T, condition?: boolean): T;
10217
+ }
10218
+ /**
10219
+ * Mixin that adds a `readonly` modifier to a node.
10220
+ */
10221
+ declare class ReadonlyMixin {
10222
+ /**
10223
+ * Adds the `readonly` keyword modifier if the condition is true.
10224
+ *
10225
+ * @param condition - Whether to add the modifier (default: true).
10226
+ * @returns The target object for chaining.
10227
+ */
10228
+ readonly<T extends Target>(this: T, condition?: boolean): T;
10229
+ }
10230
+ /**
10231
+ * Mixin that adds a `static` modifier to a node.
10232
+ */
10233
+ declare class StaticMixin {
10234
+ /**
10235
+ * Adds the `static` keyword modifier if the condition is true.
10236
+ *
10237
+ * @param condition - Whether to add the modifier (default: true).
10238
+ * @returns The target object for chaining.
10239
+ */
10240
+ static<T extends Target>(this: T, condition?: boolean): T;
10241
+ }
10242
+ //#endregion
10243
+ //#region src/ts-dsl/mixins/value.d.ts
10244
+ declare class ValueMixin extends TsDsl {
10245
+ private value?;
10246
+ /** Sets the initializer expression (e.g. `= expr`). */
10247
+ assign<T extends this>(this: T, expr: MaybeTsDsl<WithString>): T;
10248
+ protected $value(): ts.Expression | undefined;
10249
+ $render(): ts.Node;
10250
+ }
10251
+ //#endregion
10252
+ //#region src/ts-dsl/field.d.ts
10253
+ declare class FieldTsDsl extends TsDsl<ts.PropertyDeclaration> {
10254
+ private modifiers;
10255
+ private name;
10256
+ private _type?;
10257
+ constructor(name: string, fn?: (f: FieldTsDsl) => void);
10258
+ /** Sets the field type. */
10259
+ type(type: string | TypeTsDsl): this;
10260
+ /** Builds the `PropertyDeclaration` node. */
10261
+ $render(): ts.PropertyDeclaration;
10262
+ }
10263
+ interface FieldTsDsl extends DecoratorMixin, DescribeMixin, PrivateMixin, ProtectedMixin, PublicMixin, ReadonlyMixin, StaticMixin, ValueMixin {}
10264
+ //#endregion
10265
+ //#region src/ts-dsl/mixins/do.d.ts
10266
+ /**
10267
+ * Adds `.do()` for appending statements or expressions to a body.
10268
+ */
10269
+ declare class DoMixin extends TsDsl {
10270
+ private _do?;
10271
+ /** Adds one or more expressions/statements to the body. */
10272
+ do(...items: ReadonlyArray<MaybeTsDsl<WithStatement>>): this;
10273
+ /** Renders the collected `.do()` calls into an array of `Statement` nodes. */
10274
+ protected $do(): ReadonlyArray<ts.Statement>;
10275
+ $render(): ts.Node;
10276
+ }
10277
+ //#endregion
10278
+ //#region src/ts-dsl/mixins/pattern.d.ts
10279
+ /**
10280
+ * Mixin providing `.array()`, `.object()`, and `.spread()` methods for defining destructuring patterns.
10281
+ */
10282
+ declare class PatternMixin extends TsDsl {
10283
+ private pattern?;
10284
+ /** Defines an array binding pattern. */
10285
+ array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
10286
+ /** Defines an object binding pattern. */
10287
+ object(...props: ReadonlyArray<MaybeArray$1<string> | Record<string, string>>): this;
10288
+ /** Adds a spread element (e.g. `...args`, `...options`) to the pattern. */
10289
+ spread(name: string): this;
10290
+ /** Renders the pattern into a `BindingName`. */
10291
+ protected $pattern(): ts.BindingName | undefined;
10292
+ $render(): ts.Node;
10293
+ }
10294
+ //#endregion
10295
+ //#region src/ts-dsl/param.d.ts
10296
+ declare class ParamTsDsl extends TsDsl<ts.ParameterDeclaration> {
10297
+ private name?;
10298
+ private _type?;
10299
+ constructor(name: string | ((p: ParamTsDsl) => void), fn?: (p: ParamTsDsl) => void);
10300
+ /** Sets the parameter type. */
10301
+ type(type: string | TypeTsDsl): this;
10302
+ $render(): ts.ParameterDeclaration;
10303
+ }
10304
+ interface ParamTsDsl extends DecoratorMixin, OptionalMixin, PatternMixin, ValueMixin {}
10305
+ //#endregion
10306
+ //#region src/ts-dsl/mixins/param.d.ts
10307
+ declare class ParamMixin extends TsDsl {
10308
+ private _params?;
10309
+ /** Adds a parameter. */
10310
+ param(name: string | ((p: ParamTsDsl) => void), fn?: (p: ParamTsDsl) => void): this;
10311
+ /** Adds multiple parameters. */
10312
+ params(...params: ReadonlyArray<MaybeTsDsl<ts.ParameterDeclaration>>): this;
10313
+ /** Renders the parameters into an array of `ParameterDeclaration`s. */
10314
+ protected $params(): ReadonlyArray<ts.ParameterDeclaration>;
10315
+ $render(): ts.Node;
10316
+ }
10317
+ //#endregion
10318
+ //#region src/ts-dsl/init.d.ts
10319
+ declare class InitTsDsl extends TsDsl<ts.ConstructorDeclaration> {
10320
+ private modifiers;
10321
+ constructor(fn?: (i: InitTsDsl) => void);
10322
+ /** Builds the `ConstructorDeclaration` node. */
10323
+ $render(): ts.ConstructorDeclaration;
10324
+ }
10325
+ interface InitTsDsl extends DecoratorMixin, DescribeMixin, DoMixin, ParamMixin, PrivateMixin, ProtectedMixin, PublicMixin {}
10326
+ //#endregion
10327
+ //#region src/ts-dsl/type/param.d.ts
10328
+ declare class TypeParamTsDsl extends TypeTsDsl<ts.TypeParameterDeclaration> {
10329
+ protected name?: WithString<ts.Identifier>;
10330
+ protected constraint?: WithString<MaybeTsDsl<TypeTsDsl>> | boolean;
10331
+ protected defaultValue?: WithString<MaybeTsDsl<TypeTsDsl>> | boolean;
10332
+ constructor(name?: WithString<ts.Identifier>, fn?: (name: TypeParamTsDsl) => void);
10333
+ default(value: WithString<MaybeTsDsl<TypeTsDsl>> | boolean): this;
10334
+ extends(constraint: WithString<MaybeTsDsl<TypeTsDsl>> | boolean): this;
10335
+ $render(): ts.TypeParameterDeclaration;
10336
+ }
10337
+ //#endregion
10338
+ //#region src/ts-dsl/mixins/type-params.d.ts
10339
+ declare class TypeParamsMixin extends TsDsl {
10340
+ protected _generics?: Array<string | MaybeTsDsl<TypeOfTsDsl<TypeParamTsDsl>>>;
10341
+ /** Adds a single type parameter (e.g. `T` in `Array<T>`). */
10342
+ generic(...args: ConstructorParameters<typeof TypeParamTsDsl>): this;
10343
+ /** Adds type parameters (e.g. `Map<string, T>`). */
10344
+ generics(...args: ReadonlyArray<string | MaybeTsDsl<TypeOfTsDsl<TypeParamTsDsl>>>): this;
10345
+ /**
10346
+ * Returns the type parameters as an array of ts.TypeParameterDeclaration nodes.
10347
+ */
10348
+ protected $generics(): ReadonlyArray<ts.TypeParameterDeclaration> | undefined;
10349
+ $render(): ts.Node;
10350
+ }
10351
+ //#endregion
10352
+ //#region src/ts-dsl/method.d.ts
10353
+ declare class MethodTsDsl extends TsDsl<ts.MethodDeclaration> {
10354
+ private modifiers;
10355
+ private name;
10356
+ private _returns?;
10357
+ constructor(name: string, fn?: (m: MethodTsDsl) => void);
10358
+ /** Sets the return type. */
10359
+ returns(type: string | TypeTsDsl): this;
10360
+ /** Builds the `MethodDeclaration` node. */
10361
+ $render(): ts.MethodDeclaration;
10362
+ }
10363
+ interface MethodTsDsl extends AbstractMixin, AsyncMixin, DecoratorMixin, DescribeMixin, DoMixin, OptionalMixin, ParamMixin, PrivateMixin, ProtectedMixin, PublicMixin, StaticMixin, TypeParamsMixin {}
10364
+ //#endregion
10365
+ //#region src/ts-dsl/class.d.ts
10366
+ declare class ClassTsDsl extends TsDsl<ts.ClassDeclaration> {
10367
+ private heritageClauses;
10368
+ private body;
10369
+ private modifiers;
10370
+ private name;
10371
+ constructor(name: string);
10372
+ /** Adds one or more class members (fields, methods, etc.). */
10373
+ do(...items: ReadonlyArray<MaybeTsDsl<ts.ClassElement | ts.Node>>): this;
10374
+ /** Adds a base class to extend from. */
10375
+ extends(base?: WithString | false | null): this;
10376
+ /** Adds a class field. */
10377
+ field(name: string, fn?: (f: FieldTsDsl) => void): this;
10378
+ /** Adds a class constructor. */
10379
+ init(fn?: (i: InitTsDsl) => void): this;
10380
+ /** Adds a class method. */
10381
+ method(name: string, fn?: (m: MethodTsDsl) => void): this;
10382
+ /** Inserts an empty line between members for formatting. */
10383
+ newline(): this;
10384
+ /** Builds the `ClassDeclaration` node. */
10385
+ $render(): ts.ClassDeclaration;
10386
+ }
10387
+ interface ClassTsDsl extends AbstractMixin, DecoratorMixin, DescribeMixin, DefaultMixin, ExportMixin, TypeParamsMixin {}
10388
+ //#endregion
10389
+ //#region src/ts-dsl/decorator.d.ts
10390
+ declare class DecoratorTsDsl extends TsDsl<ts.Decorator> {
10391
+ private name;
10392
+ constructor(name: WithString, ...args: ReadonlyArray<MaybeTsDsl<WithString>>);
10393
+ $render(): ts.Decorator;
10394
+ }
10395
+ interface DecoratorTsDsl extends ArgsMixin {}
10396
+ //#endregion
10397
+ //#region src/ts-dsl/type/attr.d.ts
10398
+ declare class TypeAttrTsDsl extends TsDsl<ts.QualifiedName> {
10399
+ private _base?;
10400
+ private right;
10401
+ constructor(base: WithString<MaybeTsDsl<ts.EntityName>>, right: WithString<ts.Identifier>);
10402
+ constructor(right: WithString<ts.Identifier>);
10403
+ base(base?: WithString<MaybeTsDsl<ts.EntityName>>): this;
10404
+ $render(): ts.QualifiedName;
10405
+ }
10406
+ //#endregion
10407
+ //#region src/ts-dsl/type/expr.d.ts
10408
+ declare class TypeExprTsDsl extends TypeTsDsl<ts.TypeReferenceNode> {
10409
+ private _exprInput?;
10410
+ constructor();
10411
+ constructor(fn: (t: TypeExprTsDsl) => void);
10412
+ constructor(name: string);
10413
+ constructor(name: string, fn?: (t: TypeExprTsDsl) => void);
10414
+ /** Accesses a nested type (e.g. `Foo.Bar`). */
10415
+ attr(right: WithString<ts.Identifier> | TypeAttrTsDsl): this;
10416
+ $render(): ts.TypeReferenceNode;
10417
+ }
10418
+ interface TypeExprTsDsl extends TypeArgsMixin {}
10419
+ //#endregion
10420
+ //#region src/ts-dsl/type/query.d.ts
10421
+ declare class TypeQueryTsDsl extends TypeTsDsl<ts.TypeQueryNode> {
10422
+ private expr;
10423
+ constructor(expr: string | MaybeTsDsl<TsDsl>);
10424
+ $render(): ts.TypeQueryNode;
10425
+ }
10426
+ //#endregion
10427
+ //#region src/ts-dsl/expr.d.ts
10428
+ declare class ExprTsDsl extends TsDsl<ts.Expression> {
10429
+ private _exprInput;
10430
+ constructor(id: MaybeTsDsl<WithString>);
10431
+ typeof(): TypeQueryTsDsl;
10432
+ returnType(): TypeExprTsDsl;
10433
+ $render(): ts.Expression;
10434
+ }
10435
+ interface ExprTsDsl extends AccessMixin, OperatorMixin {}
10436
+ //#endregion
10437
+ //#region src/ts-dsl/func.d.ts
10438
+ type FuncMode = 'arrow' | 'decl' | 'expr';
10439
+ declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends TsDsl<M extends 'decl' ? ts.FunctionDeclaration : M extends 'expr' ? ts.FunctionExpression : ts.ArrowFunction> {
10440
+ private mode;
10441
+ private modifiers;
10442
+ private name?;
10443
+ private _returns?;
10444
+ constructor();
10445
+ constructor(fn: (f: ImplFuncTsDsl<'arrow'>) => void);
10446
+ constructor(name: string);
10447
+ constructor(name: string, fn: (f: ImplFuncTsDsl<'decl'>) => void);
10448
+ arrow(): FuncTsDsl<'arrow'>;
10449
+ decl(): FuncTsDsl<'decl'>;
10450
+ expr(): FuncTsDsl<'expr'>;
10451
+ /** Sets the return type. */
10452
+ returns(type: string | TypeTsDsl): this;
10453
+ $render(): M extends 'decl' ? ts.FunctionDeclaration : M extends 'expr' ? ts.FunctionExpression : ts.ArrowFunction;
10454
+ }
10455
+ interface ImplFuncTsDsl extends AbstractMixin, AsyncMixin, DecoratorMixin, DescribeMixin, DoMixin, OptionalMixin, ParamMixin, PrivateMixin, ProtectedMixin, PublicMixin, StaticMixin, TypeParamsMixin {}
10456
+ declare const FuncTsDsl: {
10457
+ new (): FuncTsDsl<"arrow">;
10458
+ new (fn: (f: FuncTsDsl<"arrow">) => void): FuncTsDsl<"arrow">;
10459
+ new (name: string): FuncTsDsl<"decl">;
10460
+ new (name: string, fn: (f: FuncTsDsl<"decl">) => void): FuncTsDsl<"decl">;
10461
+ } & typeof ImplFuncTsDsl;
10462
+ type FuncTsDsl<M extends FuncMode = 'arrow'> = ImplFuncTsDsl<M>;
10463
+ //#endregion
10464
+ //#region src/ts-dsl/getter.d.ts
10465
+ declare class GetterTsDsl extends TsDsl<ts.GetAccessorDeclaration> {
10466
+ private modifiers;
10467
+ private name;
10468
+ constructor(name: string, fn?: (g: GetterTsDsl) => void);
10469
+ $render(): ts.GetAccessorDeclaration;
10470
+ }
10471
+ interface GetterTsDsl extends AbstractMixin, AsyncMixin, DecoratorMixin, DescribeMixin, DoMixin, ParamMixin, PrivateMixin, ProtectedMixin, PublicMixin, StaticMixin {}
10472
+ //#endregion
10473
+ //#region src/ts-dsl/if.d.ts
10474
+ declare class IfTsDsl extends TsDsl<ts.IfStatement> {
10475
+ private conditionInput?;
10476
+ private elseInput?;
10477
+ constructor(condition?: MaybeTsDsl<WithString>);
10478
+ condition(condition: MaybeTsDsl<WithString>): this;
10479
+ otherwise(...statements: ReadonlyArray<MaybeTsDsl<ts.Statement>>): this;
10480
+ $render(): ts.IfStatement;
10481
+ }
10482
+ interface IfTsDsl extends DoMixin {}
10483
+ //#endregion
10484
+ //#region src/ts-dsl/literal.d.ts
10485
+ declare class LiteralTsDsl extends TsDsl<ts.LiteralTypeNode['literal']> {
10486
+ private value;
10487
+ constructor(value: string | number | boolean);
10488
+ $render(): ts.LiteralTypeNode['literal'];
10489
+ }
10490
+ //#endregion
10491
+ //#region src/ts-dsl/new.d.ts
10492
+ declare class NewTsDsl extends TsDsl<ts.NewExpression> {
10493
+ private classExpr;
10494
+ constructor(classExpr: MaybeTsDsl<WithString>, ...args: ReadonlyArray<MaybeTsDsl<WithString>>);
10495
+ /** Builds the `NewExpression` node. */
10496
+ $render(): ts.NewExpression;
10497
+ }
10498
+ interface NewTsDsl extends AccessMixin, ArgsMixin, TypeArgsMixin {}
10499
+ //#endregion
10500
+ //#region src/ts-dsl/newline.d.ts
10501
+ declare class NewlineTsDsl extends TsDsl<ts.Identifier> {
10502
+ $render(): ts.Identifier;
10503
+ }
10504
+ //#endregion
10505
+ //#region src/ts-dsl/not.d.ts
10506
+ declare class NotTsDsl extends TsDsl<ts.PrefixUnaryExpression> {
10507
+ private _notExpr;
10508
+ constructor(expr: MaybeTsDsl<WithString>);
10509
+ $render(): ts.PrefixUnaryExpression;
10510
+ }
10511
+ //#endregion
10512
+ //#region src/ts-dsl/object.d.ts
10513
+ declare class ObjectTsDsl extends TsDsl<ts.ObjectLiteralExpression> {
10514
+ private static readonly DEFAULT_THRESHOLD;
10515
+ private layout;
10516
+ private props;
10517
+ /** Sets automatic line output with optional threshold (default: 3). */
10518
+ auto(threshold?: number): this;
10519
+ /** Adds a getter property (e.g. `{ get foo() { ... } }`). */
10520
+ getter(name: string, expr: WithString<MaybeTsDsl<ts.Statement>>): this;
10521
+ /** Returns true if object has at least one property or spread. */
10522
+ hasProps(): boolean;
10523
+ /** Sets single line output. */
10524
+ inline(): this;
10525
+ /** Returns true if object has no properties or spreads. */
10526
+ get isEmpty(): boolean;
10527
+ /** Sets multi line output. */
10528
+ pretty(): this;
10529
+ /** Adds a property assignment. */
10530
+ prop(name: string, expr: MaybeTsDsl<WithString>): this;
10531
+ /** Adds a setter property (e.g. `{ set foo(v) { ... } }`). */
10532
+ setter(name: string, expr: WithString<MaybeTsDsl<ts.Statement>>): this;
10533
+ /** Adds a spread property (e.g. `{ ...options }`). */
10534
+ spread(expr: MaybeTsDsl<WithString>): this;
10535
+ /** Builds and returns the object literal expression. */
10536
+ $render(): ts.ObjectLiteralExpression;
10537
+ private safePropertyName;
10538
+ }
10539
+ //#endregion
10540
+ //#region src/ts-dsl/pattern.d.ts
10541
+ /**
10542
+ * Builds binding patterns (e.g. `{ foo, bar }`, `[a, b, ...rest]`).
10543
+ */
10544
+ declare class PatternTsDsl extends TsDsl<ts.BindingName> {
10545
+ private pattern?;
10546
+ private _spread?;
10547
+ /** Defines an array pattern (e.g. `[a, b, c]`). */
10548
+ array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
10549
+ /** Defines an object pattern (e.g. `{ a, b: alias }`). */
10550
+ object(...props: ReadonlyArray<MaybeArray$1<string> | Record<string, string>>): this;
10551
+ /** Adds a spread element (e.g. `...rest`, `...options`, `...args`). */
10552
+ spread(name: string): this;
10553
+ /** Builds and returns a BindingName (ObjectBindingPattern, ArrayBindingPattern, or Identifier). */
10554
+ $render(): ts.BindingName;
10555
+ private createSpread;
10556
+ }
10557
+ //#endregion
10558
+ //#region src/ts-dsl/regexp.d.ts
10559
+ type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u' | 'y';
10560
+ type RegexFlags<Avail extends string = RegexFlag> = '' | { [K in Avail]: `${K}${RegexFlags<Exclude<Avail, K>>}` }[Avail];
10561
+ declare class RegExpTsDsl extends TsDsl<ts.RegularExpressionLiteral> {
10562
+ private pattern;
10563
+ private flags?;
10564
+ constructor(pattern: string, flags?: RegexFlags);
10565
+ /** Emits a RegularExpressionLiteral node. */
10566
+ $render(): ts.RegularExpressionLiteral;
10567
+ }
10568
+ //#endregion
10569
+ //#region src/ts-dsl/setter.d.ts
10570
+ declare class SetterTsDsl extends TsDsl<ts.SetAccessorDeclaration> {
10571
+ private modifiers;
10572
+ private name;
10573
+ constructor(name: string, fn?: (s: SetterTsDsl) => void);
10574
+ $render(): ts.SetAccessorDeclaration;
10575
+ }
10576
+ interface SetterTsDsl extends AbstractMixin, AsyncMixin, DecoratorMixin, DescribeMixin, DoMixin, ParamMixin, PrivateMixin, ProtectedMixin, PublicMixin, StaticMixin {}
10577
+ //#endregion
10578
+ //#region src/ts-dsl/template.d.ts
10579
+ declare class TemplateTsDsl extends TsDsl<ts.TemplateExpression | ts.NoSubstitutionTemplateLiteral> {
10580
+ private parts;
10581
+ constructor(value?: MaybeTsDsl<WithString>);
10582
+ add(value: MaybeTsDsl<WithString>): this;
10583
+ $render(): ts.TemplateExpression | ts.NoSubstitutionTemplateLiteral;
10584
+ }
10585
+ //#endregion
10586
+ //#region src/ts-dsl/throw.d.ts
10587
+ declare class ThrowTsDsl extends TsDsl<ts.ThrowStatement> {
10588
+ private error;
10589
+ private msg?;
10590
+ private useNew;
10591
+ constructor(error: MaybeTsDsl<WithString>, useNew?: boolean);
10592
+ message(value: MaybeTsDsl<WithString>): this;
10593
+ $render(): ts.ThrowStatement;
10594
+ }
10595
+ //#endregion
10596
+ //#region src/ts-dsl/type/alias.d.ts
10597
+ declare class TypeAliasTsDsl extends TsDsl<ts.TypeAliasDeclaration> {
10598
+ private value?;
10599
+ private modifiers;
10600
+ private name;
10601
+ constructor(name: string, fn?: (t: TypeAliasTsDsl) => void);
10602
+ /** Sets the type expression on the right-hand side of `= ...`. */
10603
+ type(node: MaybeTsDsl<ts.TypeNode>): this;
10604
+ /** Renders a `TypeAliasDeclaration` node. */
10605
+ $render(): ts.TypeAliasDeclaration;
10606
+ }
10607
+ interface TypeAliasTsDsl extends ExportMixin, TypeParamsMixin {}
10608
+ //#endregion
10609
+ //#region src/ts-dsl/type/literal.d.ts
10610
+ declare class TypeLiteralTsDsl extends TypeTsDsl<ts.LiteralTypeNode> {
10611
+ private value;
10612
+ constructor(value: string | number | boolean);
10613
+ $render(): ts.LiteralTypeNode;
10614
+ }
10615
+ //#endregion
10616
+ //#region src/ts-dsl/type/object.d.ts
10617
+ declare class TypeObjectTsDsl extends TypeTsDsl<ts.TypeNode> {
10618
+ private props;
10619
+ private merges;
10620
+ /** Adds a property signature (returns property builder). */
10621
+ prop(name: string, fn: (p: TypePropTsDsl) => void): this;
10622
+ /** Adds a type to merge (intersect) with the object literal. */
10623
+ merge(type: WithString<ts.Identifier>): this;
10624
+ $render(): ts.TypeNode;
10625
+ }
10626
+ declare class TypePropTsDsl extends TypeTsDsl<ts.TypeElement> {
10627
+ private name;
10628
+ private typeInput?;
10629
+ constructor(name: string, fn: (p: TypePropTsDsl) => void);
10630
+ /** Sets the property type. */
10631
+ type(type: WithString<ts.TypeNode>): this;
10632
+ /** Builds and returns the property signature. */
10633
+ $render(): ts.TypeElement;
10634
+ }
10635
+ interface TypePropTsDsl extends OptionalMixin {}
10636
+ //#endregion
10637
+ //#region src/ts-dsl/var.d.ts
10638
+ declare class VarTsDsl extends TsDsl<ts.VariableStatement> {
10639
+ private kind;
10640
+ private modifiers;
10641
+ private name?;
10642
+ private _type?;
10643
+ constructor(name?: string);
10644
+ const(): this;
10645
+ let(): this;
10646
+ /** Sets the variable type. */
10647
+ type(type: string | TypeTsDsl): this;
10648
+ var(): this;
10649
+ $render(): ts.VariableStatement;
10650
+ }
10651
+ interface VarTsDsl extends DefaultMixin, DescribeMixin, ExportMixin, PatternMixin, ValueMixin {}
10652
+ //#endregion
10653
+ //#region src/ts-dsl/index.d.ts
10654
+ declare const $: ((id: string | typescript422.Expression | TsDsl<typescript422.Expression>) => ExprTsDsl) & {
10655
+ /** Creates an array literal expression (e.g. `[1, 2, 3]`). */
10656
+ array: () => ArrayTsDsl;
10657
+ /** Creates a property access expression (e.g. `obj.foo`). */
10658
+ attr: (left: string | typescript422.Expression | TsDsl<typescript422.Expression>, right: number | WithString<typescript422.MemberName>) => AttrTsDsl;
10659
+ /** Creates an await expression (e.g. `await promise`). */
10660
+ await: (expr: string | typescript422.Expression | TsDsl<typescript422.Expression>) => AwaitTsDsl;
10661
+ /** Creates a binary expression (e.g. `a + b`). */
10662
+ binary: (left: string | typescript422.Expression | TsDsl<typescript422.Expression>, operator: ("!=" | "!==" | "&&" | "*" | "+" | "-" | "/" | "<" | "<=" | "=" | "==" | "===" | ">" | ">=" | "??" | "||") | typescript422.BinaryOperator, right: string | typescript422.Expression | TsDsl<typescript422.Expression>) => BinaryTsDsl;
10663
+ /** Creates a function or method call expression (e.g. `fn(arg)`). */
10664
+ call: (callee: string | typescript422.Expression | TsDsl<typescript422.Expression>, ...args: (string | typescript422.Expression | TsDsl<typescript422.Expression> | undefined)[]) => CallTsDsl;
10665
+ /** Creates a class declaration or expression. */
10666
+ class: (name: string) => ClassTsDsl;
10667
+ /** Creates a constant variable declaration (`const`). */
10668
+ const: (name?: string | undefined) => VarTsDsl;
10669
+ /** Creates a decorator expression (e.g. `@decorator`). */
10670
+ decorator: (name: WithString, ...args: (string | typescript422.Expression | TsDsl<typescript422.Expression>)[]) => DecoratorTsDsl;
10671
+ /** Creates a describe block (used for tests or descriptions). */
10672
+ describe: (lines?: MaybeArray$1<string> | undefined, fn?: ((d: DescribeTsDsl) => void) | undefined) => DescribeTsDsl;
10673
+ /** Creates a general expression node. */
10674
+ expr: (id: string | typescript422.Expression | TsDsl<typescript422.Expression>) => ExprTsDsl;
10675
+ /** Creates a field declaration in a class or object. */
10676
+ field: (name: string, fn?: ((f: FieldTsDsl) => void) | undefined) => FieldTsDsl;
10677
+ /** Creates a function expression or declaration. */
10678
+ func: {
10679
+ (): FuncTsDsl<"arrow">;
10680
+ (fn: (f: FuncTsDsl<"arrow">) => void): FuncTsDsl<"arrow">;
10681
+ (name: string): FuncTsDsl<"decl">;
10682
+ (name: string, fn: (f: FuncTsDsl<"decl">) => void): FuncTsDsl<"decl">;
10683
+ };
10684
+ /** Creates a getter method declaration. */
10685
+ getter: (name: string, fn?: ((g: GetterTsDsl) => void) | undefined) => GetterTsDsl;
10686
+ /** Creates an if statement. */
10687
+ if: (condition?: string | typescript422.Expression | TsDsl<typescript422.Expression> | undefined) => IfTsDsl;
10688
+ /** Creates an initialization block or statement. */
10689
+ init: (fn?: ((i: InitTsDsl) => void) | undefined) => InitTsDsl;
10690
+ /** Creates a let variable declaration (`let`). */
10691
+ let: (name?: string | undefined) => VarTsDsl;
10692
+ /** Creates a literal value (e.g. string, number, boolean). */
10693
+ literal: (value: string | number | boolean) => LiteralTsDsl;
10694
+ /** Creates a method declaration inside a class or object. */
10695
+ method: (name: string, fn?: ((m: MethodTsDsl) => void) | undefined) => MethodTsDsl;
10696
+ /** Creates a new expression (e.g. `new ClassName()`). */
10697
+ new: (classExpr: string | typescript422.Expression | TsDsl<typescript422.Expression>, ...args: (string | typescript422.Expression | TsDsl<typescript422.Expression>)[]) => NewTsDsl;
10698
+ /** Creates a newline (for formatting purposes). */
10699
+ newline: () => NewlineTsDsl;
10700
+ /** Creates a logical NOT expression (e.g. `!expr`). */
10701
+ not: (expr: string | typescript422.Expression | TsDsl<typescript422.Expression>) => NotTsDsl;
10702
+ /** Creates an object literal expression. */
10703
+ object: () => ObjectTsDsl;
10704
+ /** Creates a parameter declaration for functions or methods. */
10705
+ param: (name: string | ((p: ParamTsDsl) => void), fn?: ((p: ParamTsDsl) => void) | undefined) => ParamTsDsl;
10706
+ /** Creates a pattern for destructuring or matching. */
10707
+ pattern: () => PatternTsDsl;
10708
+ /** Creates a regular expression literal (e.g. `/foo/gi`). */
10709
+ 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;
10710
+ /** Creates a return statement. */
10711
+ return: (expr?: string | typescript422.Expression | TsDsl<typescript422.Expression> | undefined) => ReturnTsDsl;
10712
+ /** Creates a setter method declaration. */
10713
+ setter: (name: string, fn?: ((s: SetterTsDsl) => void) | undefined) => SetterTsDsl;
10714
+ /** Creates a template literal expression. */
10715
+ template: (value?: string | typescript422.Expression | TsDsl<typescript422.Expression> | undefined) => TemplateTsDsl;
10716
+ /** Creates a throw statement. */
10717
+ throw: (error: string | typescript422.Expression | TsDsl<typescript422.Expression>, useNew?: boolean | undefined) => ThrowTsDsl;
10718
+ /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */
10719
+ type: ((name: string, fn?: ((t: TypeExprTsDsl) => void) | undefined) => TypeExprTsDsl) & {
10720
+ /** Creates a type alias declaration (e.g. `type Foo = Bar`). */
10721
+ alias: (name: string, fn?: ((t: TypeAliasTsDsl) => void) | undefined) => TypeAliasTsDsl;
10722
+ /** Creates a qualified type reference (e.g. Foo.Bar). */
10723
+ attr: (right: WithString<typescript422.Identifier>) => TypeAttrTsDsl;
10724
+ /** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */
10725
+ expr: (name: string, fn?: ((t: TypeExprTsDsl) => void) | undefined) => TypeExprTsDsl;
10726
+ /** Creates a literal type node (e.g. 'foo', 42, or true). */
10727
+ literal: (value: string | number | boolean) => TypeLiteralTsDsl;
10728
+ /** Creates a type literal node (e.g. { foo: string }). */
10729
+ object: () => TypeObjectTsDsl;
10730
+ };
10731
+ /** Creates a variable declaration (var). */
10732
+ var: (name?: string | undefined) => VarTsDsl;
10733
+ };
10734
+ type DollarTsDsl = {
10735
+ /**
10736
+ * Entry point to the TypeScript DSL.
10737
+ *
10738
+ * `$` creates a general expression node by default, but also exposes
10739
+ * builders for all other constructs such as `.type()`, `.call()`,
10740
+ * `.object()`, `.func()`, etc.
10741
+ *
10742
+ * Example:
10743
+ * ```ts
10744
+ * const node = $('console').attr('log').call($.literal('Hello'));
10745
+ * ```
10746
+ *
10747
+ * Returns:
10748
+ * - A new `ExprTsDsl` instance when called directly.
10749
+ * - The `base` factory object for constructing more specific nodes.
10750
+ */
10751
+ $: typeof $;
10752
+ };
10753
+ //#endregion
9922
10754
  //#region src/plugins/arktype/shared/types.d.ts
9923
10755
  type ValidatorArgs$2 = {
9924
10756
  operation: IR$1.OperationObject;
@@ -9927,8 +10759,8 @@ type ValidatorArgs$2 = {
9927
10759
  //#endregion
9928
10760
  //#region src/plugins/arktype/api.d.ts
9929
10761
  type IApi$2 = {
9930
- createRequestValidator: (args: ValidatorArgs$2) => ts.ArrowFunction | undefined;
9931
- createResponseValidator: (args: ValidatorArgs$2) => ts.ArrowFunction | undefined;
10762
+ createRequestValidator: (args: ValidatorArgs$2) => TsDsl | undefined;
10763
+ createResponseValidator: (args: ValidatorArgs$2) => TsDsl | undefined;
9932
10764
  };
9933
10765
  //#endregion
9934
10766
  //#region src/plugins/arktype/types.d.ts
@@ -11183,12 +12015,12 @@ type ValidatorArgs$1 = {
11183
12015
  //#endregion
11184
12016
  //#region src/plugins/valibot/api.d.ts
11185
12017
  type IApi$1 = {
11186
- createRequestValidator: (args: ValidatorArgs$1) => ts.ArrowFunction | undefined;
11187
- createResponseValidator: (args: ValidatorArgs$1) => ts.ArrowFunction | undefined;
12018
+ createRequestValidator: (args: ValidatorArgs$1) => TsDsl | undefined;
12019
+ createResponseValidator: (args: ValidatorArgs$1) => TsDsl | undefined;
11188
12020
  };
11189
12021
  //#endregion
11190
12022
  //#region src/plugins/valibot/types.d.ts
11191
- type UserConfig$2 = Plugin.Name<'valibot'> & Plugin.Hooks & {
12023
+ type UserConfig$2 = Plugin.Name<'valibot'> & Plugin.Hooks & Resolvers$1 & {
11192
12024
  /**
11193
12025
  * The casing convention to use for generated names.
11194
12026
  *
@@ -11346,7 +12178,7 @@ type UserConfig$2 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11346
12178
  name?: StringName;
11347
12179
  };
11348
12180
  };
11349
- type Config$2 = Plugin.Name<'valibot'> & Plugin.Hooks & {
12181
+ type Config$2 = Plugin.Name<'valibot'> & Plugin.Hooks & Resolvers$1 & {
11350
12182
  /**
11351
12183
  * The casing convention to use for generated names.
11352
12184
  *
@@ -11482,6 +12314,73 @@ type Config$2 = Plugin.Name<'valibot'> & Plugin.Hooks & {
11482
12314
  name: StringName;
11483
12315
  };
11484
12316
  };
12317
+ type SharedResolverArgs$1 = DollarTsDsl & {
12318
+ /**
12319
+ * The current builder state being processed by this resolver.
12320
+ *
12321
+ * In Valibot, this represents the current list of call expressions ("pipes")
12322
+ * being assembled to form a schema definition.
12323
+ *
12324
+ * Each pipe can be extended, modified, or replaced to customize how the
12325
+ * resulting schema is constructed. Returning `undefined` from a resolver will
12326
+ * use the default generation behavior.
12327
+ */
12328
+ pipes: Array<CallTsDsl>;
12329
+ plugin: ValibotPlugin['Instance'];
12330
+ };
12331
+ type FormatResolverArgs$1 = SharedResolverArgs$1 & {
12332
+ schema: IR$1.SchemaObject;
12333
+ };
12334
+ type ObjectBaseResolverArgs$1 = SharedResolverArgs$1 & {
12335
+ /** Null = never */
12336
+ additional?: ts.Expression | null;
12337
+ schema: IR$1.SchemaObject;
12338
+ shape: ObjectTsDsl;
12339
+ };
12340
+ type Resolvers$1 = Plugin.Resolvers<{
12341
+ /**
12342
+ * Resolvers for object schemas.
12343
+ *
12344
+ * Allows customization of how object types are rendered.
12345
+ *
12346
+ * Example path: `~resolvers.object.base`
12347
+ *
12348
+ * Returning `undefined` from a resolver will apply the default
12349
+ * generation behavior for the object schema.
12350
+ */
12351
+ object?: {
12352
+ /**
12353
+ * Controls how object schemas are constructed.
12354
+ *
12355
+ * Called with the fully assembled shape (properties) and any additional
12356
+ * property schema, allowing the resolver to choose the correct Valibot
12357
+ * base constructor and modify the schema chain if needed.
12358
+ *
12359
+ * Returning `undefined` will execute the default resolver logic.
12360
+ */
12361
+ base?: (args: ObjectBaseResolverArgs$1) => CallTsDsl | undefined;
12362
+ };
12363
+ /**
12364
+ * Resolvers for string schemas.
12365
+ *
12366
+ * Allows customization of how string types are rendered, including
12367
+ * per-format handling.
12368
+ */
12369
+ string?: {
12370
+ /**
12371
+ * Resolvers for string formats (e.g., `uuid`, `email`, `date-time`).
12372
+ *
12373
+ * Each key represents a specific format name with a custom
12374
+ * resolver function that controls how that format is rendered.
12375
+ *
12376
+ * Example path: `~resolvers.string.formats.uuid`
12377
+ *
12378
+ * Returning `undefined` from a resolver will apply the default
12379
+ * generation behavior for that format.
12380
+ */
12381
+ formats?: Record<string, (args: FormatResolverArgs$1) => boolean | number | undefined>;
12382
+ };
12383
+ }>;
11485
12384
  type ValibotPlugin = DefinePlugin<UserConfig$2, Config$2, IApi$1>;
11486
12385
  //#endregion
11487
12386
  //#region src/plugins/zod/shared/types.d.ts
@@ -11492,12 +12391,12 @@ type ValidatorArgs = {
11492
12391
  //#endregion
11493
12392
  //#region src/plugins/zod/api.d.ts
11494
12393
  type IApi = {
11495
- createRequestValidator: (args: ValidatorArgs) => ts.ArrowFunction | undefined;
11496
- createResponseValidator: (args: ValidatorArgs) => ts.ArrowFunction | undefined;
12394
+ createRequestValidator: (args: ValidatorArgs) => TsDsl | undefined;
12395
+ createResponseValidator: (args: ValidatorArgs) => TsDsl | undefined;
11497
12396
  };
11498
12397
  //#endregion
11499
12398
  //#region src/plugins/zod/types.d.ts
11500
- type UserConfig$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
12399
+ type UserConfig$1 = Plugin.Name<'zod'> & Plugin.Hooks & Resolvers & {
11501
12400
  /**
11502
12401
  * The casing convention to use for generated names.
11503
12402
  *
@@ -11881,7 +12780,7 @@ type UserConfig$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
11881
12780
  };
11882
12781
  };
11883
12782
  };
11884
- type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
12783
+ type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & Resolvers & {
11885
12784
  /**
11886
12785
  * The casing convention to use for generated names.
11887
12786
  *
@@ -12202,6 +13101,72 @@ type Config$1 = Plugin.Name<'zod'> & Plugin.Hooks & {
12202
13101
  };
12203
13102
  };
12204
13103
  };
13104
+ type SharedResolverArgs = DollarTsDsl & {
13105
+ /**
13106
+ * The current fluent builder chain under construction for this resolver.
13107
+ *
13108
+ * Represents the in-progress call sequence (e.g., a Zod or DSL chain)
13109
+ * that defines the current schema or expression being generated.
13110
+ *
13111
+ * This chain can be extended, transformed, or replaced entirely to customize
13112
+ * the resulting output of the resolver.
13113
+ */
13114
+ chain?: CallTsDsl;
13115
+ plugin: ZodPlugin['Instance'];
13116
+ };
13117
+ type FormatResolverArgs = Required<SharedResolverArgs> & {
13118
+ schema: IR$1.SchemaObject;
13119
+ };
13120
+ type ObjectBaseResolverArgs = SharedResolverArgs & {
13121
+ /** Null = never */
13122
+ additional?: ts.Expression | null;
13123
+ schema: IR$1.SchemaObject;
13124
+ shape: ObjectTsDsl;
13125
+ };
13126
+ type Resolvers = Plugin.Resolvers<{
13127
+ /**
13128
+ * Resolvers for object schemas.
13129
+ *
13130
+ * Allows customization of how object types are rendered.
13131
+ *
13132
+ * Example path: `~resolvers.object.base`
13133
+ *
13134
+ * Returning `undefined` from a resolver will apply the default
13135
+ * generation behavior for the object schema.
13136
+ */
13137
+ object?: {
13138
+ /**
13139
+ * Controls how object schemas are constructed.
13140
+ *
13141
+ * Called with the fully assembled shape (properties) and any additional
13142
+ * property schema, allowing the resolver to choose the correct Zod
13143
+ * base constructor and modify the schema chain if needed.
13144
+ *
13145
+ * Returning `undefined` will execute the default resolver logic.
13146
+ */
13147
+ base?: (args: ObjectBaseResolverArgs) => CallTsDsl | undefined;
13148
+ };
13149
+ /**
13150
+ * Resolvers for string schemas.
13151
+ *
13152
+ * Allows customization of how string types are rendered, including
13153
+ * per-format handling.
13154
+ */
13155
+ string?: {
13156
+ /**
13157
+ * Resolvers for string formats (e.g., `uuid`, `email`, `date-time`).
13158
+ *
13159
+ * Each key represents a specific format name with a custom
13160
+ * resolver function that controls how that format is rendered.
13161
+ *
13162
+ * Example path: `~resolvers.string.formats.uuid`
13163
+ *
13164
+ * Returning `undefined` from a resolver will apply the default
13165
+ * generation logic for that format.
13166
+ */
13167
+ formats?: Record<string, (args: FormatResolverArgs) => CallTsDsl | undefined>;
13168
+ };
13169
+ }>;
12205
13170
  type ZodPlugin = DefinePlugin<UserConfig$1, Config$1, IApi>;
12206
13171
  //#endregion
12207
13172
  //#region src/plugins/config.d.ts
@@ -12210,6 +13175,7 @@ interface PluginConfigMap {
12210
13175
  '@hey-api/client-angular': HeyApiClientAngularPlugin['Types'];
12211
13176
  '@hey-api/client-axios': HeyApiClientAxiosPlugin['Types'];
12212
13177
  '@hey-api/client-fetch': HeyApiClientFetchPlugin['Types'];
13178
+ '@hey-api/client-ky': HeyApiClientKyPlugin['Types'];
12213
13179
  '@hey-api/client-next': HeyApiClientNextPlugin['Types'];
12214
13180
  '@hey-api/client-nuxt': HeyApiClientNuxtPlugin['Types'];
12215
13181
  '@hey-api/client-ofetch': HeyApiClientOfetchPlugin['Types'];
@@ -12683,7 +13649,7 @@ type Hooks = {
12683
13649
  };
12684
13650
  //#endregion
12685
13651
  //#region src/plugins/types.d.ts
12686
- type PluginClientNames = '@hey-api/client-angular' | '@hey-api/client-axios' | '@hey-api/client-fetch' | '@hey-api/client-next' | '@hey-api/client-nuxt' | '@hey-api/client-ofetch';
13652
+ type PluginClientNames = '@hey-api/client-angular' | '@hey-api/client-axios' | '@hey-api/client-fetch' | '@hey-api/client-ky' | '@hey-api/client-next' | '@hey-api/client-nuxt' | '@hey-api/client-ofetch';
12687
13653
  type PluginValidatorNames = 'arktype' | 'valibot' | 'zod';
12688
13654
  type PluginNames = PluginClientNames | '@angular/common' | '@hey-api/schemas' | '@hey-api/sdk' | '@hey-api/transformers' | '@hey-api/typescript' | '@pinia/colada' | '@tanstack/angular-query-experimental' | '@tanstack/react-query' | '@tanstack/solid-query' | '@tanstack/svelte-query' | '@tanstack/vue-query' | 'fastify' | 'swr' | PluginValidatorNames;
12689
13655
  type AnyPluginName = PluginNames | (string & {});
@@ -12748,6 +13714,23 @@ declare namespace Plugin {
12748
13714
  export interface Name<Name extends PluginNames> {
12749
13715
  name: Name;
12750
13716
  }
13717
+
13718
+ /**
13719
+ * Generic wrapper for plugin resolvers.
13720
+ *
13721
+ * Provides a namespaced configuration entry (`~resolvers`)
13722
+ * where plugins can define how specific schema constructs
13723
+ * should be resolved or overridden.
13724
+ */
13725
+ export type Resolvers<T extends Record<string, unknown> = Record<string, unknown>> = {
13726
+ /**
13727
+ * Custom behavior resolvers for a plugin.
13728
+ *
13729
+ * Used to define how specific schema constructs are
13730
+ * resolved into AST or runtime logic.
13731
+ */
13732
+ '~resolvers'?: T;
13733
+ };
12751
13734
  export type Types<Config$15 extends BaseConfig = BaseConfig, ResolvedConfig extends BaseConfig = Config$15, Api extends BaseApi = never> = ([Api] extends [never] ? {
12752
13735
  api?: BaseApi;
12753
13736
  } : {
@@ -13819,5 +14802,5 @@ type Config = Omit<Required<UserConfig>, 'input' | 'logs' | 'output' | 'parser'
13819
14802
  plugins: { [K in PluginNames]?: Plugin.Config<PluginConfigMap[K]> };
13820
14803
  };
13821
14804
  //#endregion
13822
- export { MaybeArray as S, Client as _, Plugin as a, IR$1 as b, OpenApiOperationObject as c, OpenApiResponseObject as d, OpenApiSchemaObject as f, ExpressionTransformer as g, TypeTransformer as h, DefinePlugin as i, OpenApiParameterObject as l, Logger as m, UserConfig as n, OpenApi as o, Context as p, Input as r, OpenApiMetaObject as s, Config as t, OpenApiRequestBodyObject as u, PluginHandler as v, LazyOrAsync as x, StringCase as y };
13823
- //# sourceMappingURL=config-PWeoedFF.d.cts.map
14805
+ export { Client as $, LiteralTsDsl as A, InitTsDsl as B, SetterTsDsl as C, NotTsDsl as D, ObjectTsDsl as E, TypeExprTsDsl as F, BinaryTsDsl as G, FieldTsDsl as H, TypeAttrTsDsl as I, AwaitTsDsl as J, ReturnTsDsl as K, DecoratorTsDsl as L, GetterTsDsl as M, FuncTsDsl as N, NewlineTsDsl as O, ExprTsDsl as P, ExpressionTransformer as Q, ClassTsDsl as R, TemplateTsDsl as S, PatternTsDsl as T, DescribeTsDsl as U, ParamTsDsl as V, AttrTsDsl as W, TsDsl as X, ArrayTsDsl as Y, TypeTransformer as Z, VarTsDsl as _, Plugin as a, TypeAliasTsDsl as b, OpenApiOperationObject as c, OpenApiResponseObject as d, PluginHandler as et, OpenApiSchemaObject as f, DollarTsDsl as g, $ as h, DefinePlugin as i, MaybeArray as it, IfTsDsl as j, NewTsDsl as k, OpenApiParameterObject as l, Logger as m, UserConfig as n, IR$1 as nt, OpenApi as o, Context as p, CallTsDsl as q, Input as r, LazyOrAsync as rt, OpenApiMetaObject as s, Config as t, StringCase as tt, OpenApiRequestBodyObject as u, TypeObjectTsDsl as v, RegExpTsDsl as w, ThrowTsDsl as x, TypeLiteralTsDsl as y, MethodTsDsl as z };
14806
+ //# sourceMappingURL=config-BI0uP8YS.d.cts.map