@hey-api/openapi-ts 0.88.1 → 0.89.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/clients/core/serverSentEvents.ts +2 -0
- package/dist/{config-C5xWXzTz.d.cts → config-CBa-XLy8.d.cts} +1007 -839
- package/dist/{config-eqVtXEeO.d.mts → config-uoaRJc6A.d.mts} +1008 -840
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/internal.cjs +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.mts +1 -1
- package/dist/internal.mjs +1 -1
- package/dist/openApi-AbaojA3X.mjs +13 -0
- package/dist/openApi-AbaojA3X.mjs.map +1 -0
- package/dist/openApi-CSMCX27Y.cjs +13 -0
- package/dist/openApi-CSMCX27Y.cjs.map +1 -0
- package/dist/run.cjs +1 -1
- package/dist/run.cjs.map +1 -1
- package/dist/run.mjs +1 -1
- package/dist/run.mjs.map +1 -1
- package/dist/src-CmkI6L90.mjs +11 -0
- package/dist/src-CmkI6L90.mjs.map +1 -0
- package/dist/src-odo5Y_R2.cjs +19 -0
- package/dist/src-odo5Y_R2.cjs.map +1 -0
- package/package.json +2 -2
- package/dist/openApi-DlyxIg9f.mjs +0 -17
- package/dist/openApi-DlyxIg9f.mjs.map +0 -1
- package/dist/openApi-DszQAwQH.cjs +0 -17
- package/dist/openApi-DszQAwQH.cjs.map +0 -1
- package/dist/src-9qIIwEzI.cjs +0 -19
- package/dist/src-9qIIwEzI.cjs.map +0 -1
- package/dist/src-BNSjnWaN.mjs +0 -11
- package/dist/src-BNSjnWaN.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IProject, Project, Symbol, SymbolIdentifier, SymbolIn, SymbolMeta } from "@hey-api/codegen-core";
|
|
1
|
+
import { AnalysisContext, File, FromRef, IProject, Language, NameConflictResolver, Node, Project, Ref, Refs, RenderContext, Renderer, Symbol, SymbolIdentifier, SymbolIn, SymbolMeta } from "@hey-api/codegen-core";
|
|
2
2
|
import * as typescript0 from "typescript";
|
|
3
3
|
import ts from "typescript";
|
|
4
4
|
import { RangeOptions, SemVer } from "semver";
|
|
@@ -6,46 +6,9 @@ import { HttpClient, HttpErrorResponse, HttpHeaders, HttpRequest, HttpResponse }
|
|
|
6
6
|
import { Injector } from "@angular/core";
|
|
7
7
|
import { AxiosError, AxiosInstance, AxiosRequestHeaders, AxiosResponse, AxiosStatic, CreateAxiosDefaults } from "axios";
|
|
8
8
|
import { AsyncDataOptions, UseFetchOptions, useAsyncData, useFetch, useLazyAsyncData, useLazyFetch } from "nuxt/app";
|
|
9
|
-
import { Ref } from "vue";
|
|
9
|
+
import { Ref as Ref$1 } from "vue";
|
|
10
10
|
import { FetchOptions, ResponseType, ofetch } from "ofetch";
|
|
11
11
|
|
|
12
|
-
//#region src/plugins/shared/types/refs.d.ts
|
|
13
|
-
/**
|
|
14
|
-
* Ref wrapper which ensures a stable reference for a value.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```ts
|
|
18
|
-
* type NumRef = Ref<number>; // { value: number }
|
|
19
|
-
* const num: NumRef = { value: 42 };
|
|
20
|
-
* console.log(num.value); // 42
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
type Ref$1<T> = {
|
|
24
|
-
value: T;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Utility type: wraps a value in a Ref.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* ```ts
|
|
32
|
-
* type R = ToRef<number>; // { value: number }
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Maps every property of `T` to a `Ref` of that property.
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* ```ts
|
|
41
|
-
* type Foo = { a: number; b: string };
|
|
42
|
-
* type Refs = ToRefs<Foo>; // { a: Ref<number>; b: Ref<string> }
|
|
43
|
-
* const refs: Refs = { a: { value: 1 }, b: { value: 'x' } };
|
|
44
|
-
* console.log(refs.a.value, refs.b.value); // 1 'x'
|
|
45
|
-
* ```
|
|
46
|
-
*/
|
|
47
|
-
type ToRefs<T> = { [K in keyof T]: Ref$1<T[K]> };
|
|
48
|
-
//#endregion
|
|
49
12
|
//#region src/openApi/shared/types/openapi-spec-extensions.d.ts
|
|
50
13
|
interface EnumExtensions {
|
|
51
14
|
/**
|
|
@@ -2609,6 +2572,10 @@ interface IRSchemaObject extends Pick<JsonSchemaDraft2020_12, '$ref' | 'const' |
|
|
|
2609
2572
|
* follow a specific convention.
|
|
2610
2573
|
*/
|
|
2611
2574
|
propertyNames?: IRSchemaObject;
|
|
2575
|
+
/**
|
|
2576
|
+
* Reference to symbol instead of `$ref` string.
|
|
2577
|
+
*/
|
|
2578
|
+
symbolRef?: Symbol;
|
|
2612
2579
|
/**
|
|
2613
2580
|
* Each schema eventually resolves into `type`.
|
|
2614
2581
|
*/
|
|
@@ -3583,7 +3550,7 @@ type HeyApiClientNextPlugin = DefinePlugin<UserConfig$20, UserConfig$20>;
|
|
|
3583
3550
|
//#endregion
|
|
3584
3551
|
//#region src/plugins/@hey-api/client-nuxt/bundle/types.d.ts
|
|
3585
3552
|
type QuerySerializer = (query: Parameters<Client$3['buildUrl']>[0]['query']) => string;
|
|
3586
|
-
type WithRefs<TData> = { [K in keyof TData]: NonNullable<TData[K]> extends object ? WithRefs<NonNullable<TData[K]>> | Ref<NonNullable<TData[K]>> : NonNullable<TData[K]> | Ref<NonNullable<TData[K]>> };
|
|
3553
|
+
type WithRefs<TData> = { [K in keyof TData]: NonNullable<TData[K]> extends object ? WithRefs<NonNullable<TData[K]>> | Ref$1<NonNullable<TData[K]>> : NonNullable<TData[K]> | Ref$1<NonNullable<TData[K]>> };
|
|
3587
3554
|
type KeysOf<T> = Array<T extends T ? (keyof T extends string ? keyof T : never) : never>;
|
|
3588
3555
|
interface Config$16<T extends ClientOptions$1 = ClientOptions$1> extends Omit<FetchOptions$1<unknown>, 'baseURL' | 'body' | 'headers' | 'method' | 'query'>, WithRefs<Pick<FetchOptions$1<unknown>, 'query'>>, Omit<Config$14, 'querySerializer'> {
|
|
3589
3556
|
/**
|
|
@@ -7249,597 +7216,722 @@ type HeyApiSdkPlugin = DefinePlugin<UserConfig$14, Config$13>;
|
|
|
7249
7216
|
//#endregion
|
|
7250
7217
|
//#region src/ts-dsl/base.d.ts
|
|
7251
7218
|
type MaybeArray$1<T> = T | ReadonlyArray<T>;
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7219
|
+
declare abstract class TsDsl<T extends ts.Node = ts.Node> implements Node<T> {
|
|
7220
|
+
analyze(_: AnalysisContext): void;
|
|
7221
|
+
exported?: boolean;
|
|
7222
|
+
file?: File;
|
|
7223
|
+
language: Language;
|
|
7224
|
+
parent?: Node;
|
|
7225
|
+
root?: Node;
|
|
7226
|
+
symbol?: Symbol;
|
|
7227
|
+
toAst(): T;
|
|
7228
|
+
readonly '~brand': any;
|
|
7229
|
+
/** Branding property to identify the DSL class at runtime. */
|
|
7230
|
+
abstract readonly '~dsl': string;
|
|
7257
7231
|
/** Conditionally applies a callback to this builder. */
|
|
7258
|
-
$if<T extends TsDsl, V
|
|
7259
|
-
$if<T extends TsDsl, V
|
|
7260
|
-
$if<T extends TsDsl, V
|
|
7232
|
+
$if<T extends TsDsl, V, R extends TsDsl = T>(this: T, value: V, ifTrue: (self: T, v: Exclude<V, false | null | undefined>) => R | void, ifFalse?: (self: T, v: Extract<V, false | null | undefined>) => R | void): R | T;
|
|
7233
|
+
$if<T extends TsDsl, V, R extends TsDsl = T>(this: T, value: V, ifTrue: (v: Exclude<V, false | null | undefined>) => R | void, ifFalse?: (v: Extract<V, false | null | undefined>) => R | void): R | T;
|
|
7234
|
+
$if<T extends TsDsl, V, R extends TsDsl = T>(this: T, value: V, ifTrue: () => R | void, ifFalse?: () => R | void): R | T;
|
|
7261
7235
|
protected $maybeId<T extends string | ts.Expression>(expr: T): T extends string ? ts.Identifier : T;
|
|
7262
7236
|
protected $node<I>(value: I): NodeOfMaybe<I>;
|
|
7263
7237
|
protected $type<I>(value: I, args?: ReadonlyArray<ts.TypeNode>): TypeOfMaybe<I>;
|
|
7264
|
-
|
|
7238
|
+
/** Unwraps nested nodes into raw TypeScript AST. */
|
|
7239
|
+
private unwrap;
|
|
7265
7240
|
}
|
|
7266
|
-
type NodeOfMaybe<I> = undefined extends I ? NodeOf<NonNullable<I
|
|
7241
|
+
type NodeOfMaybe<I> = undefined extends I ? NodeOf<NonNullable<FromRef<I>>> | undefined : NodeOf<FromRef<I>>;
|
|
7267
7242
|
type NodeOf<I> = I extends ReadonlyArray<infer U> ? ReadonlyArray<U extends TsDsl<infer N> ? N : U> : I extends string ? ts.Expression : I extends TsDsl<infer N> ? N : I extends ts.Node ? I : never;
|
|
7268
7243
|
type MaybeTsDsl<T> = T extends TsDsl<infer U> ? U | TsDsl<U> : T extends ts.Node ? T | TsDsl<T> : never;
|
|
7269
7244
|
declare abstract class TypeTsDsl<T extends ts.LiteralTypeNode | ts.QualifiedName | ts.TypeElement | ts.TypeNode | ts.TypeParameterDeclaration = ts.TypeNode> extends TsDsl<T> {}
|
|
7270
|
-
type TypeOfMaybe<I> = undefined extends I ? TypeOf<NonNullable<I
|
|
7245
|
+
type TypeOfMaybe<I> = undefined extends I ? TypeOf<NonNullable<FromRef<I>>> | undefined : TypeOf<FromRef<I>>;
|
|
7271
7246
|
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;
|
|
7272
7247
|
//#endregion
|
|
7273
|
-
//#region src/ts-dsl/
|
|
7274
|
-
|
|
7275
|
-
|
|
7248
|
+
//#region src/ts-dsl/mixins/types.d.ts
|
|
7249
|
+
type BaseCtor<T> = abstract new (...args: any[]) => TsDsl<T>;
|
|
7250
|
+
type MixinCtor<T extends BaseCtor<any>, K$1> = abstract new (...args: any[]) => InstanceType<T> & K$1;
|
|
7251
|
+
//#endregion
|
|
7252
|
+
//#region src/ts-dsl/mixins/type-args.d.ts
|
|
7253
|
+
type Arg$1 = Symbol | string | MaybeTsDsl<TypeTsDsl>;
|
|
7254
|
+
interface TypeArgsMethods extends Node {
|
|
7255
|
+
/** Returns the type arguments as an array of ts.TypeNode nodes. */
|
|
7256
|
+
$generics(): ReadonlyArray<ts.TypeNode> | undefined;
|
|
7257
|
+
/** Adds a single type argument (e.g. `string` in `Foo<string>`). */
|
|
7258
|
+
generic(arg: Arg$1): this;
|
|
7259
|
+
/** Adds type arguments (e.g. `Map<string, number>`). */
|
|
7260
|
+
generics(...args: ReadonlyArray<Arg$1>): this;
|
|
7276
7261
|
}
|
|
7277
7262
|
//#endregion
|
|
7278
|
-
//#region src/ts-dsl/mixins/
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
*/
|
|
7282
|
-
|
|
7283
|
-
|
|
7284
|
-
|
|
7285
|
-
arg(arg: string | MaybeTsDsl<ts.Expression>): this;
|
|
7286
|
-
/** Adds one or more expression arguments. */
|
|
7287
|
-
args(...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>): this;
|
|
7288
|
-
/** Renders the arguments into an array of `Expression`s. */
|
|
7289
|
-
protected $args(): ReadonlyArray<ts.Expression>;
|
|
7290
|
-
$render(): ts.Node;
|
|
7263
|
+
//#region src/ts-dsl/mixins/optional.d.ts
|
|
7264
|
+
interface OptionalMethods extends Node {
|
|
7265
|
+
_optional?: boolean;
|
|
7266
|
+
/** Marks the node as optional when the condition is true. */
|
|
7267
|
+
optional(condition?: boolean): this;
|
|
7268
|
+
/** Marks the node as required when the condition is true. */
|
|
7269
|
+
required(condition?: boolean): this;
|
|
7291
7270
|
}
|
|
7292
7271
|
//#endregion
|
|
7293
|
-
//#region src/ts-dsl/
|
|
7294
|
-
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7272
|
+
//#region src/ts-dsl/expr/as.d.ts
|
|
7273
|
+
type AsExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7274
|
+
type AsType = Symbol | string | TypeTsDsl;
|
|
7275
|
+
declare const Mixed$52: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.AsExpression>, ExprMethods>, AsMethods>;
|
|
7276
|
+
declare class AsTsDsl extends Mixed$52 {
|
|
7277
|
+
readonly '~dsl' = "AsTsDsl";
|
|
7278
|
+
protected expr: Ref<AsExpr>;
|
|
7279
|
+
protected type: Ref<AsType>;
|
|
7280
|
+
constructor(expr: AsExpr, type: AsType);
|
|
7281
|
+
analyze(ctx: AnalysisContext): void;
|
|
7282
|
+
toAst(): ts.AsExpression;
|
|
7298
7283
|
}
|
|
7299
|
-
interface DecoratorTsDsl extends ArgsMixin {}
|
|
7300
7284
|
//#endregion
|
|
7301
|
-
//#region src/ts-dsl/mixins/
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
decorator(name: string | ts.Expression, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>): this;
|
|
7306
|
-
/** Renders the decorators into an array of `ts.Decorator`s. */
|
|
7307
|
-
protected $decorators(): ReadonlyArray<ts.Decorator>;
|
|
7308
|
-
$render(): ts.Node;
|
|
7285
|
+
//#region src/ts-dsl/mixins/as.d.ts
|
|
7286
|
+
interface AsMethods extends Node {
|
|
7287
|
+
/** Creates an `as` type assertion expression (e.g. `value as Type`). */
|
|
7288
|
+
as(type: AsType): AsTsDsl;
|
|
7309
7289
|
}
|
|
7310
7290
|
//#endregion
|
|
7311
|
-
//#region src/ts-dsl/
|
|
7312
|
-
|
|
7313
|
-
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7291
|
+
//#region src/ts-dsl/expr/binary.d.ts
|
|
7292
|
+
type Expr$3 = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7293
|
+
type Op$1 = Operator | ts.BinaryOperator;
|
|
7294
|
+
type Operator = '!=' | '!==' | '&&' | '*' | '+' | '-' | '/' | '<' | '<=' | '=' | '==' | '===' | '>' | '>=' | '??' | '||';
|
|
7295
|
+
declare const Mixed$51: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.BinaryExpression>, ExprMethods>, AsMethods>;
|
|
7296
|
+
declare class BinaryTsDsl extends Mixed$51 {
|
|
7297
|
+
readonly '~dsl' = "BinaryTsDsl";
|
|
7298
|
+
protected _base: Ref<Expr$3>;
|
|
7299
|
+
protected _expr?: Ref<Expr$3>;
|
|
7300
|
+
protected _op?: Op$1;
|
|
7301
|
+
constructor(base: Expr$3, op?: Op$1, expr?: Expr$3);
|
|
7302
|
+
analyze(ctx: AnalysisContext): void;
|
|
7303
|
+
/** Logical AND — `this && expr` */
|
|
7304
|
+
and(expr: Expr$3): this;
|
|
7305
|
+
/** Creates an assignment expression (e.g. `this = expr`). */
|
|
7306
|
+
assign(expr: Expr$3): this;
|
|
7307
|
+
/** Nullish coalescing — `this ?? expr` */
|
|
7308
|
+
coalesce(expr: Expr$3): this;
|
|
7309
|
+
/** Division — `this / expr` */
|
|
7310
|
+
div(expr: Expr$3): this;
|
|
7311
|
+
/** Strict equality — `this === expr` */
|
|
7312
|
+
eq(expr: Expr$3): this;
|
|
7313
|
+
/** Greater than — `this > expr` */
|
|
7314
|
+
gt(expr: Expr$3): this;
|
|
7315
|
+
/** Greater than or equal — `this >= expr` */
|
|
7316
|
+
gte(expr: Expr$3): this;
|
|
7317
|
+
/** Loose equality — `this == expr` */
|
|
7318
|
+
looseEq(expr: Expr$3): this;
|
|
7319
|
+
/** Loose inequality — `this != expr` */
|
|
7320
|
+
looseNeq(expr: Expr$3): this;
|
|
7321
|
+
/** Less than — `this < expr` */
|
|
7322
|
+
lt(expr: Expr$3): this;
|
|
7323
|
+
/** Less than or equal — `this <= expr` */
|
|
7324
|
+
lte(expr: Expr$3): this;
|
|
7325
|
+
/** Subtraction — `this - expr` */
|
|
7326
|
+
minus(expr: Expr$3): this;
|
|
7327
|
+
/** Strict inequality — `this !== expr` */
|
|
7328
|
+
neq(expr: Expr$3): this;
|
|
7329
|
+
/** Logical OR — `this || expr` */
|
|
7330
|
+
or(expr: Expr$3): this;
|
|
7331
|
+
/** Addition — `this + expr` */
|
|
7332
|
+
plus(expr: Expr$3): this;
|
|
7333
|
+
/** Multiplication — `this * expr` */
|
|
7334
|
+
times(expr: Expr$3): this;
|
|
7335
|
+
toAst(): ts.BinaryExpression;
|
|
7336
|
+
/** Sets the binary operator and right-hand operand for this expression. */
|
|
7337
|
+
private opAndExpr;
|
|
7338
|
+
private opToToken;
|
|
7318
7339
|
}
|
|
7319
7340
|
//#endregion
|
|
7320
|
-
//#region src/ts-dsl/mixins/
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7341
|
+
//#region src/ts-dsl/mixins/operator.d.ts
|
|
7342
|
+
type Expr$2 = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7343
|
+
interface OperatorMethods extends Node {
|
|
7344
|
+
/** Logical AND — `this && expr` */
|
|
7345
|
+
and(expr: Expr$2): BinaryTsDsl;
|
|
7346
|
+
/** Creates an assignment expression (e.g. `this = expr`). */
|
|
7347
|
+
assign(expr: Expr$2): BinaryTsDsl;
|
|
7348
|
+
/** Nullish coalescing — `this ?? expr` */
|
|
7349
|
+
coalesce(expr: Expr$2): BinaryTsDsl;
|
|
7350
|
+
/** Division — `this / expr` */
|
|
7351
|
+
div(expr: Expr$2): BinaryTsDsl;
|
|
7352
|
+
/** Strict equality — `this === expr` */
|
|
7353
|
+
eq(expr: Expr$2): BinaryTsDsl;
|
|
7354
|
+
/** Greater than — `this > expr` */
|
|
7355
|
+
gt(expr: Expr$2): BinaryTsDsl;
|
|
7356
|
+
/** Greater than or equal — `this >= expr` */
|
|
7357
|
+
gte(expr: Expr$2): BinaryTsDsl;
|
|
7358
|
+
/** Loose equality — `this == expr` */
|
|
7359
|
+
looseEq(expr: Expr$2): BinaryTsDsl;
|
|
7360
|
+
/** Loose inequality — `this != expr` */
|
|
7361
|
+
looseNeq(expr: Expr$2): BinaryTsDsl;
|
|
7362
|
+
/** Less than — `this < expr` */
|
|
7363
|
+
lt(expr: Expr$2): BinaryTsDsl;
|
|
7364
|
+
/** Less than or equal — `this <= expr` */
|
|
7365
|
+
lte(expr: Expr$2): BinaryTsDsl;
|
|
7366
|
+
/** Subtraction — `this - expr` */
|
|
7367
|
+
minus(expr: Expr$2): BinaryTsDsl;
|
|
7368
|
+
/** Strict inequality — `this !== expr` */
|
|
7369
|
+
neq(expr: Expr$2): BinaryTsDsl;
|
|
7370
|
+
/** Logical OR — `this || expr` */
|
|
7371
|
+
or(expr: Expr$2): BinaryTsDsl;
|
|
7372
|
+
/** Addition — `this + expr` */
|
|
7373
|
+
plus(expr: Expr$2): BinaryTsDsl;
|
|
7374
|
+
/** Multiplication — `this * expr` */
|
|
7375
|
+
times(expr: Expr$2): BinaryTsDsl;
|
|
7376
|
+
}
|
|
7377
|
+
//#endregion
|
|
7378
|
+
//#region src/ts-dsl/expr/attr.d.ts
|
|
7379
|
+
type AttrLeft = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7380
|
+
type AttrRight = Symbol | string | ts.MemberName | number;
|
|
7381
|
+
declare const Mixed$50: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyAccessExpression | ts.ElementAccessExpression>, OptionalMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
|
|
7382
|
+
declare class AttrTsDsl extends Mixed$50 {
|
|
7383
|
+
readonly '~dsl' = "AttrTsDsl";
|
|
7384
|
+
protected left: Ref<AttrLeft>;
|
|
7385
|
+
protected right: Ref<AttrRight>;
|
|
7386
|
+
constructor(left: AttrLeft, right: AttrRight);
|
|
7387
|
+
analyze(ctx: AnalysisContext): void;
|
|
7388
|
+
toAst(): ts.PropertyAccessExpression | ts.ElementAccessExpression;
|
|
7389
|
+
}
|
|
7390
|
+
//#endregion
|
|
7391
|
+
//#region src/ts-dsl/expr/await.d.ts
|
|
7392
|
+
type AwaitExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7393
|
+
declare const Mixed$49: MixinCtor<abstract new () => TsDsl<ts.AwaitExpression>, ExprMethods>;
|
|
7394
|
+
declare class AwaitTsDsl extends Mixed$49 {
|
|
7395
|
+
readonly '~dsl' = "AwaitTsDsl";
|
|
7396
|
+
protected _awaitExpr: Ref<AwaitExpr>;
|
|
7397
|
+
constructor(expr: AwaitExpr);
|
|
7398
|
+
analyze(ctx: AnalysisContext): void;
|
|
7399
|
+
toAst(): ts.AwaitExpression;
|
|
7400
|
+
}
|
|
7401
|
+
//#endregion
|
|
7402
|
+
//#region src/ts-dsl/stmt/return.d.ts
|
|
7403
|
+
type ReturnExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7404
|
+
declare const Mixed$48: abstract new () => TsDsl<ts.ReturnStatement>;
|
|
7405
|
+
declare class ReturnTsDsl extends Mixed$48 {
|
|
7406
|
+
readonly '~dsl' = "ReturnTsDsl";
|
|
7407
|
+
protected _returnExpr?: Ref<ReturnExpr>;
|
|
7408
|
+
constructor(expr?: ReturnExpr);
|
|
7409
|
+
analyze(ctx: AnalysisContext): void;
|
|
7410
|
+
toAst(): ts.ReturnStatement;
|
|
7411
|
+
}
|
|
7412
|
+
//#endregion
|
|
7413
|
+
//#region src/ts-dsl/mixins/expr.d.ts
|
|
7414
|
+
interface ExprMethods extends Node {
|
|
7415
|
+
/** Accesses a property on the current expression (e.g. `this.foo`). */
|
|
7416
|
+
attr(name: AttrRight): AttrTsDsl;
|
|
7417
|
+
/** Awaits the current expression (e.g. `await expr`). */
|
|
7418
|
+
await(): AwaitTsDsl;
|
|
7419
|
+
/** Calls the current expression (e.g. `fn(arg1, arg2)`). */
|
|
7420
|
+
call(...args: CallArgs): CallTsDsl;
|
|
7421
|
+
/** Produces a `return` statement returning the current expression. */
|
|
7422
|
+
return(): ReturnTsDsl;
|
|
7423
|
+
}
|
|
7424
|
+
//#endregion
|
|
7425
|
+
//#region src/ts-dsl/mixins/args.d.ts
|
|
7426
|
+
type Arg = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7427
|
+
interface ArgsMethods extends Node {
|
|
7428
|
+
/** Renders the arguments into an array of `Expression`s. */
|
|
7429
|
+
$args(): ReadonlyArray<ts.Expression>;
|
|
7430
|
+
/** Adds a single expression argument. */
|
|
7431
|
+
arg(arg: Arg | undefined): this;
|
|
7432
|
+
/** Adds one or more expression arguments. */
|
|
7433
|
+
args(...args: ReadonlyArray<Arg | undefined>): this;
|
|
7434
|
+
}
|
|
7435
|
+
//#endregion
|
|
7436
|
+
//#region src/ts-dsl/expr/call.d.ts
|
|
7437
|
+
type CallCallee = string | MaybeTsDsl<ts.Expression>;
|
|
7438
|
+
type CallArg = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7439
|
+
type CallArgs = ReadonlyArray<CallArg | undefined>;
|
|
7440
|
+
declare const Mixed$47: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.CallExpression>, TypeArgsMethods>, ExprMethods>, AsMethods>, ArgsMethods>;
|
|
7441
|
+
declare class CallTsDsl extends Mixed$47 {
|
|
7442
|
+
readonly '~dsl' = "CallTsDsl";
|
|
7443
|
+
protected _callee: CallCallee;
|
|
7444
|
+
constructor(callee: CallCallee, ...args: CallArgs);
|
|
7445
|
+
analyze(ctx: AnalysisContext): void;
|
|
7446
|
+
toAst(): ts.CallExpression;
|
|
7447
|
+
}
|
|
7329
7448
|
//#endregion
|
|
7330
7449
|
//#region src/ts-dsl/mixins/modifiers.d.ts
|
|
7331
|
-
type
|
|
7332
|
-
|
|
7450
|
+
type Modifiers = {
|
|
7451
|
+
modifiers: Array<ts.Modifier>;
|
|
7333
7452
|
};
|
|
7334
|
-
|
|
7335
|
-
* Mixin that adds an `abstract` modifier to a node.
|
|
7336
|
-
*/
|
|
7337
|
-
declare class AbstractMixin {
|
|
7453
|
+
interface AbstractMethods extends Modifiers {
|
|
7338
7454
|
/**
|
|
7339
7455
|
* Adds the `abstract` keyword modifier if the condition is true.
|
|
7340
7456
|
*
|
|
7341
7457
|
* @param condition - Whether to add the modifier (default: true).
|
|
7342
7458
|
* @returns The target object for chaining.
|
|
7343
7459
|
*/
|
|
7344
|
-
abstract
|
|
7460
|
+
abstract(condition?: boolean): this;
|
|
7345
7461
|
}
|
|
7346
|
-
|
|
7347
|
-
* Mixin that adds an `async` modifier to a node.
|
|
7348
|
-
*/
|
|
7349
|
-
declare class AsyncMixin {
|
|
7462
|
+
interface AsyncMethods extends Modifiers {
|
|
7350
7463
|
/**
|
|
7351
7464
|
* Adds the `async` keyword modifier if the condition is true.
|
|
7352
7465
|
*
|
|
7353
7466
|
* @param condition - Whether to add the modifier (default: true).
|
|
7354
7467
|
* @returns The target object for chaining.
|
|
7355
7468
|
*/
|
|
7356
|
-
async
|
|
7469
|
+
async(condition?: boolean): this;
|
|
7357
7470
|
}
|
|
7358
|
-
|
|
7359
|
-
* Mixin that adds a `const` modifier to a node.
|
|
7360
|
-
*/
|
|
7361
|
-
declare class ConstMixin {
|
|
7471
|
+
interface ConstMethods extends Modifiers {
|
|
7362
7472
|
/**
|
|
7363
7473
|
* Adds the `const` keyword modifier if the condition is true.
|
|
7364
7474
|
*
|
|
7365
7475
|
* @param condition - Whether to add the modifier (default: true).
|
|
7366
7476
|
* @returns The target object for chaining.
|
|
7367
7477
|
*/
|
|
7368
|
-
const
|
|
7478
|
+
const(condition?: boolean): this;
|
|
7369
7479
|
}
|
|
7370
|
-
|
|
7371
|
-
* Mixin that adds a `default` modifier to a node.
|
|
7372
|
-
*/
|
|
7373
|
-
declare class DefaultMixin {
|
|
7480
|
+
interface DefaultMethods extends Modifiers {
|
|
7374
7481
|
/**
|
|
7375
7482
|
* Adds the `default` keyword modifier if the condition is true.
|
|
7376
7483
|
*
|
|
7377
7484
|
* @param condition - Whether to add the modifier (default: true).
|
|
7378
7485
|
* @returns The target object for chaining.
|
|
7379
7486
|
*/
|
|
7380
|
-
default
|
|
7487
|
+
default(condition?: boolean): this;
|
|
7381
7488
|
}
|
|
7382
|
-
|
|
7383
|
-
* Mixin that adds an `export` modifier to a node.
|
|
7384
|
-
*/
|
|
7385
|
-
declare class ExportMixin {
|
|
7489
|
+
interface ExportMethods extends Modifiers {
|
|
7386
7490
|
/**
|
|
7387
7491
|
* Adds the `export` keyword modifier if the condition is true.
|
|
7388
7492
|
*
|
|
7389
7493
|
* @param condition - Whether to add the modifier (default: true).
|
|
7390
7494
|
* @returns The target object for chaining.
|
|
7391
7495
|
*/
|
|
7392
|
-
export
|
|
7496
|
+
export(condition?: boolean): this;
|
|
7393
7497
|
}
|
|
7394
|
-
|
|
7395
|
-
* Mixin that adds a `private` modifier to a node.
|
|
7396
|
-
*/
|
|
7397
|
-
declare class PrivateMixin {
|
|
7498
|
+
interface PrivateMethods extends Modifiers {
|
|
7398
7499
|
/**
|
|
7399
7500
|
* Adds the `private` keyword modifier if the condition is true.
|
|
7400
7501
|
*
|
|
7401
7502
|
* @param condition - Whether to add the modifier (default: true).
|
|
7402
7503
|
* @returns The target object for chaining.
|
|
7403
7504
|
*/
|
|
7404
|
-
private
|
|
7505
|
+
private(condition?: boolean): this;
|
|
7405
7506
|
}
|
|
7406
|
-
|
|
7407
|
-
* Mixin that adds a `protected` modifier to a node.
|
|
7408
|
-
*/
|
|
7409
|
-
declare class ProtectedMixin {
|
|
7507
|
+
interface ProtectedMethods extends Modifiers {
|
|
7410
7508
|
/**
|
|
7411
7509
|
* Adds the `protected` keyword modifier if the condition is true.
|
|
7412
7510
|
*
|
|
7413
7511
|
* @param condition - Whether to add the modifier (default: true).
|
|
7414
7512
|
* @returns The target object for chaining.
|
|
7415
7513
|
*/
|
|
7416
|
-
protected
|
|
7514
|
+
protected(condition?: boolean): this;
|
|
7417
7515
|
}
|
|
7418
|
-
|
|
7419
|
-
* Mixin that adds a `public` modifier to a node.
|
|
7420
|
-
*/
|
|
7421
|
-
declare class PublicMixin {
|
|
7516
|
+
interface PublicMethods extends Modifiers {
|
|
7422
7517
|
/**
|
|
7423
7518
|
* Adds the `public` keyword modifier if the condition is true.
|
|
7424
7519
|
*
|
|
7425
7520
|
* @param condition - Whether to add the modifier (default: true).
|
|
7426
7521
|
* @returns The target object for chaining.
|
|
7427
7522
|
*/
|
|
7428
|
-
public
|
|
7523
|
+
public(condition?: boolean): this;
|
|
7429
7524
|
}
|
|
7430
|
-
|
|
7431
|
-
* Mixin that adds a `readonly` modifier to a node.
|
|
7432
|
-
*/
|
|
7433
|
-
declare class ReadonlyMixin {
|
|
7525
|
+
interface ReadonlyMethods extends Modifiers {
|
|
7434
7526
|
/**
|
|
7435
7527
|
* Adds the `readonly` keyword modifier if the condition is true.
|
|
7436
7528
|
*
|
|
7437
7529
|
* @param condition - Whether to add the modifier (default: true).
|
|
7438
7530
|
* @returns The target object for chaining.
|
|
7439
7531
|
*/
|
|
7440
|
-
readonly
|
|
7532
|
+
readonly(condition?: boolean): this;
|
|
7441
7533
|
}
|
|
7442
|
-
|
|
7443
|
-
* Mixin that adds a `static` modifier to a node.
|
|
7444
|
-
*/
|
|
7445
|
-
declare class StaticMixin {
|
|
7534
|
+
interface StaticMethods extends Modifiers {
|
|
7446
7535
|
/**
|
|
7447
7536
|
* Adds the `static` keyword modifier if the condition is true.
|
|
7448
7537
|
*
|
|
7449
7538
|
* @param condition - Whether to add the modifier (default: true).
|
|
7450
7539
|
* @returns The target object for chaining.
|
|
7451
7540
|
*/
|
|
7452
|
-
static
|
|
7453
|
-
}
|
|
7454
|
-
//#endregion
|
|
7455
|
-
//#region src/ts-dsl/type/param.d.ts
|
|
7456
|
-
declare class TypeParamTsDsl extends TypeTsDsl<ts.TypeParameterDeclaration> {
|
|
7457
|
-
protected name?: string | ts.Identifier;
|
|
7458
|
-
protected constraint?: string | MaybeTsDsl<TypeTsDsl> | boolean;
|
|
7459
|
-
protected defaultValue?: string | MaybeTsDsl<TypeTsDsl> | boolean;
|
|
7460
|
-
constructor(name?: string | ts.Identifier, fn?: (name: TypeParamTsDsl) => void);
|
|
7461
|
-
default(value: string | MaybeTsDsl<TypeTsDsl> | boolean): this;
|
|
7462
|
-
extends(constraint: string | MaybeTsDsl<TypeTsDsl> | boolean): this;
|
|
7463
|
-
$render(): ts.TypeParameterDeclaration;
|
|
7464
|
-
}
|
|
7465
|
-
//#endregion
|
|
7466
|
-
//#region src/ts-dsl/mixins/type-params.d.ts
|
|
7467
|
-
declare class TypeParamsMixin extends TsDsl {
|
|
7468
|
-
protected _generics?: Array<string | MaybeTsDsl<TypeParamTsDsl>>;
|
|
7469
|
-
/** Adds a single type parameter (e.g. `T` in `Array<T>`). */
|
|
7470
|
-
generic(...args: ConstructorParameters<typeof TypeParamTsDsl>): this;
|
|
7471
|
-
/** Adds type parameters (e.g. `Map<string, T>`). */
|
|
7472
|
-
generics(...args: ReadonlyArray<string | MaybeTsDsl<TypeParamTsDsl>>): this;
|
|
7473
|
-
/** Returns the type parameters as an array of ts.TypeParameterDeclaration nodes. */
|
|
7474
|
-
protected $generics(): ReadonlyArray<ts.TypeParameterDeclaration> | undefined;
|
|
7475
|
-
$render(): ts.Node;
|
|
7541
|
+
static(condition?: boolean): this;
|
|
7476
7542
|
}
|
|
7477
7543
|
//#endregion
|
|
7478
7544
|
//#region src/ts-dsl/mixins/value.d.ts
|
|
7479
|
-
|
|
7480
|
-
|
|
7545
|
+
type ValueExpr = string | MaybeTsDsl<ts.Expression>;
|
|
7546
|
+
interface ValueMethods extends Node {
|
|
7547
|
+
$value(): ts.Expression | undefined;
|
|
7481
7548
|
/** Sets the initializer expression (e.g. `= expr`). */
|
|
7482
|
-
assign
|
|
7483
|
-
protected $value(): ts.Expression | undefined;
|
|
7484
|
-
$render(): ts.Node;
|
|
7485
|
-
}
|
|
7486
|
-
//#endregion
|
|
7487
|
-
//#region src/ts-dsl/decl/field.d.ts
|
|
7488
|
-
declare class FieldTsDsl extends TsDsl<ts.PropertyDeclaration> {
|
|
7489
|
-
protected modifiers: {
|
|
7490
|
-
list: () => ts.Modifier[];
|
|
7491
|
-
};
|
|
7492
|
-
protected name: string;
|
|
7493
|
-
protected _type?: TypeTsDsl;
|
|
7494
|
-
constructor(name: string, fn?: (f: FieldTsDsl) => void);
|
|
7495
|
-
/** Sets the field type. */
|
|
7496
|
-
type(type: string | TypeTsDsl): this;
|
|
7497
|
-
/** Builds the `PropertyDeclaration` node. */
|
|
7498
|
-
$render(): ts.PropertyDeclaration;
|
|
7499
|
-
}
|
|
7500
|
-
interface FieldTsDsl extends DecoratorMixin, DocMixin, PrivateMixin, ProtectedMixin, PublicMixin, ReadonlyMixin, StaticMixin, ValueMixin {}
|
|
7501
|
-
//#endregion
|
|
7502
|
-
//#region src/ts-dsl/mixins/do.d.ts
|
|
7503
|
-
/**
|
|
7504
|
-
* Adds `.do()` for appending statements or expressions to a body.
|
|
7505
|
-
*/
|
|
7506
|
-
declare class DoMixin extends TsDsl {
|
|
7507
|
-
protected _do?: Array<MaybeTsDsl<ts.Expression | ts.Statement>>;
|
|
7508
|
-
/** Adds one or more expressions/statements to the body. */
|
|
7509
|
-
do(...items: ReadonlyArray<MaybeTsDsl<ts.Expression | ts.Statement>>): this;
|
|
7510
|
-
/** Renders the collected `.do()` calls into an array of `Statement` nodes. */
|
|
7511
|
-
protected $do(): ReadonlyArray<ts.Statement>;
|
|
7512
|
-
$render(): ts.Node;
|
|
7513
|
-
}
|
|
7514
|
-
//#endregion
|
|
7515
|
-
//#region src/ts-dsl/mixins/optional.d.ts
|
|
7516
|
-
declare class OptionalMixin {
|
|
7517
|
-
protected _optional?: boolean;
|
|
7518
|
-
/** Marks the node as optional when the condition is true. */
|
|
7519
|
-
optional<T extends this>(this: T, condition?: boolean): T;
|
|
7520
|
-
/** Marks the node as required when the condition is true. */
|
|
7521
|
-
required<T extends this>(this: T, condition?: boolean): T;
|
|
7522
|
-
}
|
|
7523
|
-
//#endregion
|
|
7524
|
-
//#region src/ts-dsl/decl/pattern.d.ts
|
|
7525
|
-
/**
|
|
7526
|
-
* Builds binding patterns (e.g. `{ foo, bar }`, `[a, b, ...rest]`).
|
|
7527
|
-
*/
|
|
7528
|
-
declare class PatternTsDsl extends TsDsl<ts.BindingName> {
|
|
7529
|
-
protected pattern?: {
|
|
7530
|
-
kind: 'array';
|
|
7531
|
-
values: ReadonlyArray<string>;
|
|
7532
|
-
} | {
|
|
7533
|
-
kind: 'object';
|
|
7534
|
-
values: Record<string, string>;
|
|
7535
|
-
};
|
|
7536
|
-
protected _spread?: string;
|
|
7537
|
-
/** Defines an array pattern (e.g. `[a, b, c]`). */
|
|
7538
|
-
array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
|
|
7539
|
-
/** Defines an object pattern (e.g. `{ a, b: alias }`). */
|
|
7540
|
-
object(...props: ReadonlyArray<MaybeArray$1<string> | Record<string, string>>): this;
|
|
7541
|
-
/** Adds a spread element (e.g. `...rest`, `...options`, `...args`). */
|
|
7542
|
-
spread(name: string): this;
|
|
7543
|
-
/** Builds and returns a BindingName (ObjectBindingPattern, ArrayBindingPattern, or Identifier). */
|
|
7544
|
-
$render(): ts.BindingName;
|
|
7545
|
-
private createSpread;
|
|
7549
|
+
assign(expr: ValueExpr): this;
|
|
7546
7550
|
}
|
|
7547
7551
|
//#endregion
|
|
7548
7552
|
//#region src/ts-dsl/mixins/pattern.d.ts
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
declare class PatternMixin extends TsDsl {
|
|
7553
|
-
protected pattern?: PatternTsDsl;
|
|
7553
|
+
interface PatternMethods extends Node {
|
|
7554
|
+
/** Renders the pattern into a `BindingName`. */
|
|
7555
|
+
$pattern(): ts.BindingName | undefined;
|
|
7554
7556
|
/** Defines an array binding pattern. */
|
|
7555
7557
|
array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
|
|
7556
7558
|
/** Defines an object binding pattern. */
|
|
7557
7559
|
object(...props: ReadonlyArray<MaybeArray$1<string> | Record<string, string>>): this;
|
|
7558
7560
|
/** Adds a spread element (e.g. `...args`, `...options`) to the pattern. */
|
|
7559
7561
|
spread(name: string): this;
|
|
7560
|
-
|
|
7561
|
-
|
|
7562
|
-
|
|
7562
|
+
}
|
|
7563
|
+
//#endregion
|
|
7564
|
+
//#region src/ts-dsl/mixins/decorator.d.ts
|
|
7565
|
+
interface DecoratorMethods extends Node {
|
|
7566
|
+
/** Renders the decorators into an array of `ts.Decorator`s. */
|
|
7567
|
+
$decorators(): ReadonlyArray<ts.Decorator>;
|
|
7568
|
+
/** Adds a decorator (e.g. `@sealed({ in: 'root' })`). */
|
|
7569
|
+
decorator(name: Symbol | string | MaybeTsDsl<ts.Expression>, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>): this;
|
|
7563
7570
|
}
|
|
7564
7571
|
//#endregion
|
|
7565
7572
|
//#region src/ts-dsl/decl/param.d.ts
|
|
7566
|
-
|
|
7567
|
-
|
|
7573
|
+
type ParamName = Symbol | string;
|
|
7574
|
+
type ParamCtor = (name: ParamName | ((p: ParamTsDsl) => void), fn?: (p: ParamTsDsl) => void) => ParamTsDsl;
|
|
7575
|
+
declare const Mixed$46: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ParameterDeclaration>, ValueMethods>, PatternMethods>, OptionalMethods>, DecoratorMethods>;
|
|
7576
|
+
declare class ParamTsDsl extends Mixed$46 {
|
|
7577
|
+
readonly '~dsl' = "ParamTsDsl";
|
|
7578
|
+
protected name?: Ref<ParamName>;
|
|
7568
7579
|
protected _type?: TypeTsDsl;
|
|
7569
|
-
constructor(name:
|
|
7580
|
+
constructor(name: ParamName | ((p: ParamTsDsl) => void), fn?: (p: ParamTsDsl) => void);
|
|
7581
|
+
analyze(ctx: AnalysisContext): void;
|
|
7570
7582
|
/** Sets the parameter type. */
|
|
7571
7583
|
type(type: string | TypeTsDsl): this;
|
|
7572
|
-
|
|
7584
|
+
toAst(): ts.ParameterDeclaration;
|
|
7573
7585
|
}
|
|
7574
|
-
interface ParamTsDsl extends DecoratorMixin, OptionalMixin, PatternMixin, ValueMixin {}
|
|
7575
7586
|
//#endregion
|
|
7576
7587
|
//#region src/ts-dsl/mixins/param.d.ts
|
|
7577
|
-
|
|
7578
|
-
|
|
7588
|
+
interface ParamMethods extends Node {
|
|
7589
|
+
/** Renders the parameters into an array of `ParameterDeclaration`s. */
|
|
7590
|
+
$params(): ReadonlyArray<ts.ParameterDeclaration>;
|
|
7579
7591
|
/** Adds a parameter. */
|
|
7580
|
-
param(
|
|
7592
|
+
param(...args: Parameters<ParamCtor>): this;
|
|
7581
7593
|
/** Adds multiple parameters. */
|
|
7582
7594
|
params(...params: ReadonlyArray<MaybeTsDsl<ts.ParameterDeclaration>>): this;
|
|
7583
|
-
/** Renders the parameters into an array of `ParameterDeclaration`s. */
|
|
7584
|
-
protected $params(): ReadonlyArray<ts.ParameterDeclaration>;
|
|
7585
|
-
$render(): ts.Node;
|
|
7586
7595
|
}
|
|
7587
7596
|
//#endregion
|
|
7588
|
-
//#region src/ts-dsl/
|
|
7589
|
-
declare class
|
|
7590
|
-
|
|
7591
|
-
|
|
7592
|
-
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7597
|
+
//#region src/ts-dsl/layout/doc.d.ts
|
|
7598
|
+
declare class DocTsDsl extends TsDsl<ts.Node> {
|
|
7599
|
+
readonly '~dsl' = "DocTsDsl";
|
|
7600
|
+
protected _lines: Array<string>;
|
|
7601
|
+
constructor(lines?: MaybeArray$1<string>, fn?: (d: DocTsDsl) => void);
|
|
7602
|
+
analyze(ctx: AnalysisContext): void;
|
|
7603
|
+
add(...lines: ReadonlyArray<string>): this;
|
|
7604
|
+
apply<T extends ts.Node>(node: T): T;
|
|
7605
|
+
toAst(): ts.Node;
|
|
7596
7606
|
}
|
|
7597
|
-
interface InitTsDsl extends DecoratorMixin, DoMixin, DocMixin, ParamMixin, PrivateMixin, ProtectedMixin, PublicMixin {}
|
|
7598
7607
|
//#endregion
|
|
7599
|
-
//#region src/ts-dsl/
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
};
|
|
7604
|
-
protected name: string;
|
|
7605
|
-
protected _returns?: TypeTsDsl;
|
|
7606
|
-
constructor(name: string, fn?: (m: MethodTsDsl) => void);
|
|
7607
|
-
/** Sets the return type. */
|
|
7608
|
-
returns(type: string | TypeTsDsl): this;
|
|
7609
|
-
/** Builds the `MethodDeclaration` node. */
|
|
7610
|
-
$render(): ts.MethodDeclaration;
|
|
7608
|
+
//#region src/ts-dsl/mixins/doc.d.ts
|
|
7609
|
+
interface DocMethods extends Node {
|
|
7610
|
+
$docs<T extends ts.Node>(node: T): T;
|
|
7611
|
+
doc(lines?: MaybeArray$1<string>, fn?: (d: DocTsDsl) => void): this;
|
|
7611
7612
|
}
|
|
7612
|
-
interface MethodTsDsl extends AbstractMixin, AsyncMixin, DecoratorMixin, DoMixin, DocMixin, OptionalMixin, ParamMixin, PrivateMixin, ProtectedMixin, PublicMixin, StaticMixin, TypeParamsMixin {}
|
|
7613
7613
|
//#endregion
|
|
7614
|
-
//#region src/ts-dsl/
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
constructor(name: string);
|
|
7623
|
-
/** Adds one or more class members (fields, methods, etc.). */
|
|
7624
|
-
do(...items: ReadonlyArray<MaybeTsDsl<ts.ClassElement | ts.Node>>): this;
|
|
7625
|
-
/** Adds a base class to extend from. */
|
|
7626
|
-
extends(base?: string | ts.Expression | false | null): this;
|
|
7627
|
-
/** Adds a class field. */
|
|
7628
|
-
field(name: string, fn?: (f: FieldTsDsl) => void): this;
|
|
7629
|
-
/** Adds a class constructor. */
|
|
7630
|
-
init(fn?: (i: InitTsDsl) => void): this;
|
|
7631
|
-
/** Adds a class method. */
|
|
7632
|
-
method(name: string, fn?: (m: MethodTsDsl) => void): this;
|
|
7633
|
-
/** Inserts an empty line between members for formatting. */
|
|
7634
|
-
newline(): this;
|
|
7635
|
-
/** Builds the `ClassDeclaration` node. */
|
|
7636
|
-
$render(): ts.ClassDeclaration;
|
|
7614
|
+
//#region src/ts-dsl/mixins/do.d.ts
|
|
7615
|
+
type DoExpr = MaybeTsDsl<ts.Expression | ts.Statement>;
|
|
7616
|
+
interface DoMethods extends Node {
|
|
7617
|
+
/** Renders the collected `.do()` calls into an array of `Statement` nodes. */
|
|
7618
|
+
$do(): ReadonlyArray<ts.Statement>;
|
|
7619
|
+
_do: Array<DoExpr>;
|
|
7620
|
+
/** Adds one or more expressions/statements to the body. */
|
|
7621
|
+
do(...items: ReadonlyArray<DoExpr>): this;
|
|
7637
7622
|
}
|
|
7638
|
-
interface ClassTsDsl extends AbstractMixin, DecoratorMixin, DefaultMixin, DocMixin, ExportMixin, TypeParamsMixin {}
|
|
7639
7623
|
//#endregion
|
|
7640
|
-
//#region src/ts-dsl/decl/
|
|
7641
|
-
type
|
|
7642
|
-
|
|
7643
|
-
declare class
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
constructor(name:
|
|
7647
|
-
|
|
7648
|
-
|
|
7649
|
-
$render(): ts.EnumMember;
|
|
7624
|
+
//#region src/ts-dsl/decl/getter.d.ts
|
|
7625
|
+
type GetterName = string | ts.PropertyName;
|
|
7626
|
+
declare const Mixed$45: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.GetAccessorDeclaration>, StaticMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AbstractMethods>;
|
|
7627
|
+
declare class GetterTsDsl extends Mixed$45 {
|
|
7628
|
+
readonly '~dsl' = "GetterTsDsl";
|
|
7629
|
+
protected name: GetterName;
|
|
7630
|
+
constructor(name: GetterName, fn?: (g: GetterTsDsl) => void);
|
|
7631
|
+
analyze(ctx: AnalysisContext): void;
|
|
7632
|
+
toAst(): ts.GetAccessorDeclaration;
|
|
7650
7633
|
}
|
|
7651
|
-
interface EnumMemberTsDsl extends DocMixin {}
|
|
7652
7634
|
//#endregion
|
|
7653
|
-
//#region src/ts-dsl/
|
|
7654
|
-
type
|
|
7655
|
-
|
|
7656
|
-
declare class
|
|
7657
|
-
|
|
7658
|
-
|
|
7659
|
-
protected
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
|
|
7663
|
-
|
|
7664
|
-
|
|
7665
|
-
/** Adds multiple enum members. */
|
|
7666
|
-
members(...members: ReadonlyArray<EnumMemberTsDsl>): this;
|
|
7667
|
-
/** Renders the enum declaration. */
|
|
7668
|
-
$render(): ts.EnumDeclaration;
|
|
7635
|
+
//#region src/ts-dsl/stmt/if.d.ts
|
|
7636
|
+
type IfCondition = string | MaybeTsDsl<ts.Expression>;
|
|
7637
|
+
declare const Mixed$44: MixinCtor<abstract new () => TsDsl<ts.IfStatement>, DoMethods>;
|
|
7638
|
+
declare class IfTsDsl extends Mixed$44 {
|
|
7639
|
+
readonly '~dsl' = "IfTsDsl";
|
|
7640
|
+
protected _condition?: IfCondition;
|
|
7641
|
+
protected _else?: Array<DoExpr>;
|
|
7642
|
+
constructor(condition?: IfCondition);
|
|
7643
|
+
analyze(ctx: AnalysisContext): void;
|
|
7644
|
+
condition(condition: IfCondition): this;
|
|
7645
|
+
otherwise(...items: Array<DoExpr>): this;
|
|
7646
|
+
toAst(): ts.IfStatement;
|
|
7669
7647
|
}
|
|
7670
|
-
interface EnumTsDsl extends ConstMixin, DocMixin, ExportMixin {}
|
|
7671
7648
|
//#endregion
|
|
7672
|
-
//#region src/ts-dsl/
|
|
7673
|
-
type
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
protected
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
/** Logical AND — `this && expr` */
|
|
7682
|
-
and(expr: Expr$3): this;
|
|
7683
|
-
/** Creates an assignment expression (e.g. `this = expr`). */
|
|
7684
|
-
assign(expr: Expr$3): this;
|
|
7685
|
-
/** Nullish coalescing — `this ?? expr` */
|
|
7686
|
-
coalesce(expr: Expr$3): this;
|
|
7687
|
-
/** Division — `this / expr` */
|
|
7688
|
-
div(expr: Expr$3): this;
|
|
7689
|
-
/** Strict equality — `this === expr` */
|
|
7690
|
-
eq(expr: Expr$3): this;
|
|
7691
|
-
/** Greater than — `this > expr` */
|
|
7692
|
-
gt(expr: Expr$3): this;
|
|
7693
|
-
/** Greater than or equal — `this >= expr` */
|
|
7694
|
-
gte(expr: Expr$3): this;
|
|
7695
|
-
/** Loose equality — `this == expr` */
|
|
7696
|
-
looseEq(expr: Expr$3): this;
|
|
7697
|
-
/** Loose inequality — `this != expr` */
|
|
7698
|
-
looseNeq(expr: Expr$3): this;
|
|
7699
|
-
/** Less than — `this < expr` */
|
|
7700
|
-
lt(expr: Expr$3): this;
|
|
7701
|
-
/** Less than or equal — `this <= expr` */
|
|
7702
|
-
lte(expr: Expr$3): this;
|
|
7703
|
-
/** Subtraction — `this - expr` */
|
|
7704
|
-
minus(expr: Expr$3): this;
|
|
7705
|
-
/** Strict inequality — `this !== expr` */
|
|
7706
|
-
neq(expr: Expr$3): this;
|
|
7707
|
-
/** Logical OR — `this || expr` */
|
|
7708
|
-
or(expr: Expr$3): this;
|
|
7709
|
-
/** Addition — `this + expr` */
|
|
7710
|
-
plus(expr: Expr$3): this;
|
|
7711
|
-
/** Multiplication — `this * expr` */
|
|
7712
|
-
times(expr: Expr$3): this;
|
|
7713
|
-
$render(): ts.BinaryExpression;
|
|
7714
|
-
/** Sets the binary operator and right-hand operand for this expression. */
|
|
7715
|
-
private opAndExpr;
|
|
7716
|
-
private opToToken;
|
|
7649
|
+
//#region src/ts-dsl/decl/setter.d.ts
|
|
7650
|
+
type SetterName = string | ts.PropertyName;
|
|
7651
|
+
declare const Mixed$43: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.SetAccessorDeclaration>, StaticMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AbstractMethods>;
|
|
7652
|
+
declare class SetterTsDsl extends Mixed$43 {
|
|
7653
|
+
readonly '~dsl' = "SetterTsDsl";
|
|
7654
|
+
protected name: SetterName;
|
|
7655
|
+
constructor(name: SetterName, fn?: (s: SetterTsDsl) => void);
|
|
7656
|
+
analyze(ctx: AnalysisContext): void;
|
|
7657
|
+
toAst(): ts.SetAccessorDeclaration;
|
|
7717
7658
|
}
|
|
7718
|
-
interface BinaryTsDsl extends AsMixin, ExprMixin {}
|
|
7719
7659
|
//#endregion
|
|
7720
|
-
//#region src/ts-dsl/
|
|
7721
|
-
type
|
|
7722
|
-
type
|
|
7723
|
-
declare
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
/** Greater than — `this > expr` */
|
|
7735
|
-
gt(this: This, expr: Expr$2): BinaryTsDsl;
|
|
7736
|
-
/** Greater than or equal — `this >= expr` */
|
|
7737
|
-
gte(this: This, expr: Expr$2): BinaryTsDsl;
|
|
7738
|
-
/** Loose equality — `this == expr` */
|
|
7739
|
-
looseEq(this: This, expr: Expr$2): BinaryTsDsl;
|
|
7740
|
-
/** Loose inequality — `this != expr` */
|
|
7741
|
-
looseNeq(this: This, expr: Expr$2): BinaryTsDsl;
|
|
7742
|
-
/** Less than — `this < expr` */
|
|
7743
|
-
lt(this: This, expr: Expr$2): BinaryTsDsl;
|
|
7744
|
-
/** Less than or equal — `this <= expr` */
|
|
7745
|
-
lte(this: This, expr: Expr$2): BinaryTsDsl;
|
|
7746
|
-
/** Subtraction — `this - expr` */
|
|
7747
|
-
minus(this: This, expr: Expr$2): BinaryTsDsl;
|
|
7748
|
-
/** Strict inequality — `this !== expr` */
|
|
7749
|
-
neq(this: This, expr: Expr$2): BinaryTsDsl;
|
|
7750
|
-
/** Logical OR — `this || expr` */
|
|
7751
|
-
or(this: This, expr: Expr$2): BinaryTsDsl;
|
|
7752
|
-
/** Addition — `this + expr` */
|
|
7753
|
-
plus(this: This, expr: Expr$2): BinaryTsDsl;
|
|
7754
|
-
/** Multiplication — `this * expr` */
|
|
7755
|
-
times(this: This, expr: Expr$2): BinaryTsDsl;
|
|
7660
|
+
//#region src/ts-dsl/type/param.d.ts
|
|
7661
|
+
type TypeParamName = Symbol | string;
|
|
7662
|
+
type TypeParamExpr = Symbol | string | boolean | MaybeTsDsl<TypeTsDsl>;
|
|
7663
|
+
declare const Mixed$42: abstract new () => TypeTsDsl<ts.TypeParameterDeclaration>;
|
|
7664
|
+
declare class TypeParamTsDsl extends Mixed$42 {
|
|
7665
|
+
readonly '~dsl' = "TypeParamTsDsl";
|
|
7666
|
+
protected constraint?: Ref<TypeParamExpr>;
|
|
7667
|
+
protected defaultValue?: Ref<TypeParamExpr>;
|
|
7668
|
+
protected name?: Ref<TypeParamName>;
|
|
7669
|
+
constructor(name?: TypeParamName, fn?: (name: TypeParamTsDsl) => void);
|
|
7670
|
+
analyze(ctx: AnalysisContext): void;
|
|
7671
|
+
default(value: TypeParamExpr): this;
|
|
7672
|
+
extends(constraint: TypeParamExpr): this;
|
|
7673
|
+
toAst(): ts.TypeParameterDeclaration;
|
|
7756
7674
|
}
|
|
7757
7675
|
//#endregion
|
|
7758
|
-
//#region src/ts-dsl/
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7763
|
-
|
|
7676
|
+
//#region src/ts-dsl/mixins/type-params.d.ts
|
|
7677
|
+
interface TypeParamsMethods extends Node {
|
|
7678
|
+
/** Returns the type parameters as an array of ts.TypeParameterDeclaration nodes. */
|
|
7679
|
+
$generics(): ReadonlyArray<ts.TypeParameterDeclaration> | undefined;
|
|
7680
|
+
/** Adds a single type parameter (e.g. `T` in `Array<T>`). */
|
|
7681
|
+
generic(...args: ConstructorParameters<typeof TypeParamTsDsl>): this;
|
|
7682
|
+
/** Adds type parameters (e.g. `Map<string, T>`). */
|
|
7683
|
+
generics(...args: ReadonlyArray<Symbol | string | MaybeTsDsl<TypeParamTsDsl>>): this;
|
|
7764
7684
|
}
|
|
7765
|
-
interface AttrTsDsl extends AsMixin, ExprMixin, OperatorMixin, OptionalMixin {}
|
|
7766
7685
|
//#endregion
|
|
7767
|
-
//#region src/ts-dsl/expr/
|
|
7768
|
-
declare
|
|
7769
|
-
|
|
7686
|
+
//#region src/ts-dsl/expr/typeof.d.ts
|
|
7687
|
+
declare const Mixed$41: MixinCtor<abstract new () => TsDsl<ts.TypeOfExpression>, OperatorMethods>;
|
|
7688
|
+
declare class TypeOfExprTsDsl extends Mixed$41 {
|
|
7689
|
+
readonly '~dsl' = "TypeOfExprTsDsl";
|
|
7690
|
+
protected _expr: string | MaybeTsDsl<ts.Expression>;
|
|
7770
7691
|
constructor(expr: string | MaybeTsDsl<ts.Expression>);
|
|
7771
|
-
|
|
7692
|
+
analyze(ctx: AnalysisContext): void;
|
|
7693
|
+
toAst(): ts.TypeOfExpression;
|
|
7772
7694
|
}
|
|
7773
|
-
interface AwaitTsDsl extends ExprMixin {}
|
|
7774
7695
|
//#endregion
|
|
7775
|
-
//#region src/ts-dsl/
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
|
|
7779
|
-
|
|
7780
|
-
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
|
|
7696
|
+
//#region src/ts-dsl/type/idx.d.ts
|
|
7697
|
+
type Base$2 = string | MaybeTsDsl<ts.TypeNode>;
|
|
7698
|
+
type Index = string | number | MaybeTsDsl<ts.TypeNode>;
|
|
7699
|
+
declare const Mixed$40: MixinCtor<abstract new () => TypeTsDsl<ts.IndexedAccessTypeNode>, TypeExprMethods>;
|
|
7700
|
+
declare class TypeIdxTsDsl extends Mixed$40 {
|
|
7701
|
+
readonly '~dsl' = "TypeIdxTsDsl";
|
|
7702
|
+
protected _base: Base$2;
|
|
7703
|
+
protected _index: Index;
|
|
7704
|
+
constructor(base: Base$2, index: Index);
|
|
7705
|
+
analyze(ctx: AnalysisContext): void;
|
|
7706
|
+
base(base: Base$2): this;
|
|
7707
|
+
index(index: Index): this;
|
|
7708
|
+
toAst(): ts.IndexedAccessTypeNode;
|
|
7785
7709
|
}
|
|
7786
7710
|
//#endregion
|
|
7787
|
-
//#region src/ts-dsl/
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7711
|
+
//#region src/ts-dsl/type/operator.d.ts
|
|
7712
|
+
type Op = ts.SyntaxKind.KeyOfKeyword | ts.SyntaxKind.ReadonlyKeyword | ts.SyntaxKind.UniqueKeyword;
|
|
7713
|
+
type Type$2 = string | MaybeTsDsl<ts.TypeNode>;
|
|
7714
|
+
declare const Mixed$39: abstract new () => TypeTsDsl<ts.TypeOperatorNode>;
|
|
7715
|
+
/**
|
|
7716
|
+
* Builds a TypeScript `TypeOperatorNode`, such as:
|
|
7717
|
+
*
|
|
7718
|
+
* - `keyof T`
|
|
7719
|
+
* - `readonly U`
|
|
7720
|
+
* - `unique V`
|
|
7721
|
+
*
|
|
7722
|
+
* This DSL provides both a generic `.operator()` API and convenient
|
|
7723
|
+
* shorthand methods (`.keyof()`, `.readonly()`, `.unique()`).
|
|
7724
|
+
*
|
|
7725
|
+
* The node will throw during render if required fields are missing.
|
|
7726
|
+
*/
|
|
7727
|
+
declare class TypeOperatorTsDsl extends Mixed$39 {
|
|
7728
|
+
readonly '~dsl' = "TypeOperatorTsDsl";
|
|
7729
|
+
protected _op?: Op;
|
|
7730
|
+
protected _type?: Type$2;
|
|
7731
|
+
analyze(ctx: AnalysisContext): void;
|
|
7732
|
+
/** Shorthand: builds `keyof T`. */
|
|
7733
|
+
keyof(type: Type$2): this;
|
|
7734
|
+
/** Sets the operator explicitly. */
|
|
7735
|
+
operator(op: Op): this;
|
|
7736
|
+
/** Shorthand: builds `readonly T`. */
|
|
7737
|
+
readonly(type: Type$2): this;
|
|
7738
|
+
/** Sets the target type of the operator. */
|
|
7739
|
+
type(type: Type$2): this;
|
|
7740
|
+
/** Shorthand: builds `unique T`. */
|
|
7741
|
+
unique(type: Type$2): this;
|
|
7742
|
+
toAst(): ts.TypeOperatorNode;
|
|
7743
|
+
/** Throws if required fields are not set. */
|
|
7744
|
+
$validate(): asserts this is this & {
|
|
7745
|
+
_op: Op;
|
|
7746
|
+
_type: Type$2;
|
|
7747
|
+
};
|
|
7748
|
+
private missingRequiredCalls;
|
|
7792
7749
|
}
|
|
7793
|
-
interface CallTsDsl extends ArgsMixin, AsMixin, ExprMixin, TypeArgsMixin {}
|
|
7794
7750
|
//#endregion
|
|
7795
|
-
//#region src/ts-dsl/
|
|
7796
|
-
declare
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7751
|
+
//#region src/ts-dsl/type/query.d.ts
|
|
7752
|
+
declare const Mixed$38: MixinCtor<abstract new () => TypeTsDsl<ts.TypeQueryNode>, TypeExprMethods>;
|
|
7753
|
+
declare class TypeQueryTsDsl extends Mixed$38 {
|
|
7754
|
+
readonly '~dsl' = "TypeQueryTsDsl";
|
|
7755
|
+
protected _expr: string | MaybeTsDsl<TypeTsDsl | ts.Expression>;
|
|
7756
|
+
constructor(expr: string | MaybeTsDsl<TypeTsDsl | ts.Expression>);
|
|
7757
|
+
analyze(ctx: AnalysisContext): void;
|
|
7758
|
+
toAst(): ts.TypeQueryNode;
|
|
7759
|
+
}
|
|
7760
|
+
//#endregion
|
|
7761
|
+
//#region src/ts-dsl/mixins/type-expr.d.ts
|
|
7762
|
+
interface TypeExprMethods extends Node {
|
|
7763
|
+
/** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
|
|
7764
|
+
idx(this: MaybeTsDsl<TypeTsDsl>, index: string | number | MaybeTsDsl<ts.TypeNode>): TypeIdxTsDsl;
|
|
7765
|
+
/** Shorthand: builds `keyof T`. */
|
|
7766
|
+
keyof(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
|
|
7767
|
+
/** Shorthand: builds `readonly T`. */
|
|
7768
|
+
readonly(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
|
|
7769
|
+
/** Create a TypeExpr node representing ReturnType<this>. */
|
|
7770
|
+
returnType(this: MaybeTsDsl<ts.Expression>): TypeExprTsDsl;
|
|
7771
|
+
/** Create a TypeOfExpr node representing typeof this. */
|
|
7772
|
+
typeofExpr(this: MaybeTsDsl<ts.Expression>): TypeOfExprTsDsl;
|
|
7773
|
+
/** Create a TypeQuery node representing typeof this. */
|
|
7774
|
+
typeofType(this: MaybeTsDsl<TypeTsDsl | ts.Expression>): TypeQueryTsDsl;
|
|
7775
|
+
/** Shorthand: builds `unique T`. */
|
|
7776
|
+
unique(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
|
|
7777
|
+
}
|
|
7778
|
+
//#endregion
|
|
7779
|
+
//#region src/ts-dsl/type/attr.d.ts
|
|
7780
|
+
type Base$1 = Symbol | string | MaybeTsDsl<ts.EntityName>;
|
|
7781
|
+
type Right = Symbol | string | ts.Identifier;
|
|
7782
|
+
declare const Mixed$37: MixinCtor<abstract new () => TypeTsDsl<ts.QualifiedName>, TypeExprMethods>;
|
|
7783
|
+
declare class TypeAttrTsDsl extends Mixed$37 {
|
|
7784
|
+
readonly '~dsl' = "TypeAttrTsDsl";
|
|
7785
|
+
protected _base?: Ref<Base$1>;
|
|
7786
|
+
protected _right: Ref<Right>;
|
|
7787
|
+
constructor(base: Base$1 | Ref<Base$1>, right: string | ts.Identifier);
|
|
7788
|
+
constructor(right: Right);
|
|
7789
|
+
analyze(ctx: AnalysisContext): void;
|
|
7790
|
+
base(base?: Base$1 | Ref<Base$1>): this;
|
|
7791
|
+
right(right: Right): this;
|
|
7792
|
+
toAst(): ts.QualifiedName;
|
|
7793
|
+
}
|
|
7794
|
+
//#endregion
|
|
7795
|
+
//#region src/ts-dsl/type/expr.d.ts
|
|
7796
|
+
type TypeExprName = Symbol | string;
|
|
7797
|
+
type TypeExprExpr = TypeExprName | TypeAttrTsDsl;
|
|
7798
|
+
declare const Mixed$36: MixinCtor<MixinCtor<abstract new () => TypeTsDsl<ts.TypeReferenceNode>, TypeExprMethods>, TypeArgsMethods>;
|
|
7799
|
+
declare class TypeExprTsDsl extends Mixed$36 {
|
|
7800
|
+
readonly '~dsl' = "TypeExprTsDsl";
|
|
7801
|
+
protected _exprInput?: Ref<TypeExprExpr>;
|
|
7802
|
+
constructor();
|
|
7803
|
+
constructor(fn: (t: TypeExprTsDsl) => void);
|
|
7804
|
+
constructor(name: TypeExprName);
|
|
7805
|
+
constructor(name: TypeExprName, fn?: (t: TypeExprTsDsl) => void);
|
|
7806
|
+
analyze(ctx: AnalysisContext): void;
|
|
7807
|
+
/** Accesses a nested type (e.g. `Foo.Bar`). */
|
|
7808
|
+
attr(right: string | ts.Identifier | TypeAttrTsDsl): this;
|
|
7809
|
+
toAst(): ts.TypeReferenceNode;
|
|
7810
|
+
}
|
|
7811
|
+
//#endregion
|
|
7812
|
+
//#region src/ts-dsl/decl/field.d.ts
|
|
7813
|
+
type FieldType = TypeExprName | TypeTsDsl;
|
|
7814
|
+
declare const Mixed$35: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.PropertyDeclaration>, ValueMethods>, StaticMethods>, ReadonlyMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, DocMethods>, DecoratorMethods>;
|
|
7815
|
+
declare class FieldTsDsl extends Mixed$35 {
|
|
7816
|
+
readonly '~dsl' = "FieldTsDsl";
|
|
7817
|
+
protected name: string;
|
|
7818
|
+
protected _type?: TypeTsDsl;
|
|
7819
|
+
constructor(name: string, fn?: (f: FieldTsDsl) => void);
|
|
7820
|
+
analyze(ctx: AnalysisContext): void;
|
|
7821
|
+
/** Sets the field type. */
|
|
7822
|
+
type(type: FieldType): this;
|
|
7823
|
+
toAst(): ts.PropertyDeclaration;
|
|
7824
|
+
}
|
|
7825
|
+
//#endregion
|
|
7826
|
+
//#region src/ts-dsl/decl/init.d.ts
|
|
7827
|
+
declare const Mixed$34: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ConstructorDeclaration>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>;
|
|
7828
|
+
declare class InitTsDsl extends Mixed$34 {
|
|
7829
|
+
readonly '~dsl' = "InitTsDsl";
|
|
7830
|
+
constructor(fn?: (i: InitTsDsl) => void);
|
|
7831
|
+
analyze(ctx: AnalysisContext): void;
|
|
7832
|
+
toAst(): ts.ConstructorDeclaration;
|
|
7833
|
+
}
|
|
7834
|
+
//#endregion
|
|
7835
|
+
//#region src/ts-dsl/decl/method.d.ts
|
|
7836
|
+
declare const Mixed$33: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.MethodDeclaration>, TypeParamsMethods>, StaticMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, OptionalMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AbstractMethods>;
|
|
7837
|
+
declare class MethodTsDsl extends Mixed$33 {
|
|
7838
|
+
readonly '~dsl' = "MethodTsDsl";
|
|
7839
|
+
protected name: string;
|
|
7840
|
+
protected _returns?: TypeTsDsl;
|
|
7841
|
+
constructor(name: string, fn?: (m: MethodTsDsl) => void);
|
|
7842
|
+
analyze(ctx: AnalysisContext): void;
|
|
7843
|
+
/** Sets the return type. */
|
|
7844
|
+
returns(type: string | TypeTsDsl): this;
|
|
7845
|
+
toAst(): ts.MethodDeclaration;
|
|
7846
|
+
}
|
|
7847
|
+
//#endregion
|
|
7848
|
+
//#region src/ts-dsl/decl/class.d.ts
|
|
7849
|
+
type Base = Symbol | string;
|
|
7850
|
+
type Name$1 = Symbol | string;
|
|
7851
|
+
type Body = Array<MaybeTsDsl<ts.ClassElement | ts.Node>>;
|
|
7852
|
+
declare const Mixed$32: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ClassDeclaration>, TypeParamsMethods>, ExportMethods>, DocMethods>, DefaultMethods>, DecoratorMethods>, AbstractMethods>;
|
|
7853
|
+
declare class ClassTsDsl extends Mixed$32 {
|
|
7854
|
+
readonly '~dsl' = "ClassTsDsl";
|
|
7855
|
+
protected baseClass?: Ref<Base>;
|
|
7856
|
+
protected body: Body;
|
|
7857
|
+
protected name: Ref<Name$1>;
|
|
7858
|
+
constructor(name: Name$1);
|
|
7859
|
+
analyze(ctx: AnalysisContext): void;
|
|
7860
|
+
/** Adds one or more class members (fields, methods, etc.). */
|
|
7861
|
+
do(...items: Body): this;
|
|
7862
|
+
/** Records a base class to extend from. */
|
|
7863
|
+
extends(base?: Base): this;
|
|
7864
|
+
/** Adds a class field. */
|
|
7865
|
+
field(name: string, fn?: (f: FieldTsDsl) => void): this;
|
|
7866
|
+
/** Adds a class constructor. */
|
|
7867
|
+
init(fn?: (i: InitTsDsl) => void): this;
|
|
7868
|
+
/** Adds a class method. */
|
|
7869
|
+
method(name: string, fn?: (m: MethodTsDsl) => void): this;
|
|
7870
|
+
/** Inserts an empty line between members for formatting. */
|
|
7871
|
+
newline(): this;
|
|
7872
|
+
toAst(): ts.ClassDeclaration;
|
|
7873
|
+
/** Builds heritage clauses (extends). */
|
|
7874
|
+
private _heritage;
|
|
7800
7875
|
}
|
|
7801
|
-
interface ReturnTsDsl extends ExprMixin {}
|
|
7802
7876
|
//#endregion
|
|
7803
|
-
//#region src/ts-dsl/
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
return(this: string | MaybeTsDsl<ts.Expression>): ReturnTsDsl;
|
|
7877
|
+
//#region src/ts-dsl/decl/decorator.d.ts
|
|
7878
|
+
type DecoratorName = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
7879
|
+
declare const Mixed$31: MixinCtor<abstract new () => TsDsl<ts.Decorator>, ArgsMethods>;
|
|
7880
|
+
declare class DecoratorTsDsl extends Mixed$31 {
|
|
7881
|
+
readonly '~dsl' = "DecoratorTsDsl";
|
|
7882
|
+
protected name: Ref<DecoratorName>;
|
|
7883
|
+
constructor(name: DecoratorName, ...args: ReadonlyArray<string | MaybeTsDsl<ts.Expression>>);
|
|
7884
|
+
analyze(ctx: AnalysisContext): void;
|
|
7885
|
+
toAst(): ts.Decorator;
|
|
7813
7886
|
}
|
|
7814
7887
|
//#endregion
|
|
7815
|
-
//#region src/ts-dsl/
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
|
|
7888
|
+
//#region src/ts-dsl/decl/member.d.ts
|
|
7889
|
+
type Value$2 = string | number | MaybeTsDsl<ts.Expression>;
|
|
7890
|
+
type ValueFn$1 = Value$2 | ((m: EnumMemberTsDsl) => void);
|
|
7891
|
+
declare const Mixed$30: MixinCtor<abstract new () => TsDsl<ts.EnumMember>, DocMethods>;
|
|
7892
|
+
declare class EnumMemberTsDsl extends Mixed$30 {
|
|
7893
|
+
readonly '~dsl' = "EnumMemberTsDsl";
|
|
7894
|
+
private _name;
|
|
7895
|
+
private _value?;
|
|
7896
|
+
constructor(name: string, value?: ValueFn$1);
|
|
7897
|
+
analyze(ctx: AnalysisContext): void;
|
|
7898
|
+
/** Sets the enum member value. */
|
|
7899
|
+
value(value?: Value$2): this;
|
|
7900
|
+
toAst(): ts.EnumMember;
|
|
7821
7901
|
}
|
|
7822
|
-
interface AsTsDsl extends AsMixin, ExprMixin {}
|
|
7823
7902
|
//#endregion
|
|
7824
|
-
//#region src/ts-dsl/
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7903
|
+
//#region src/ts-dsl/decl/enum.d.ts
|
|
7904
|
+
type EnumName = Symbol | string;
|
|
7905
|
+
type Value$1 = string | number | MaybeTsDsl<ts.Expression>;
|
|
7906
|
+
type ValueFn = Value$1 | ((m: EnumMemberTsDsl) => void);
|
|
7907
|
+
declare const Mixed$29: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.EnumDeclaration>, ExportMethods>, DocMethods>, ConstMethods>;
|
|
7908
|
+
declare class EnumTsDsl extends Mixed$29 {
|
|
7909
|
+
readonly '~dsl' = "EnumTsDsl";
|
|
7910
|
+
private _members;
|
|
7911
|
+
private _name;
|
|
7912
|
+
constructor(name: EnumName, fn?: (e: EnumTsDsl) => void);
|
|
7913
|
+
analyze(ctx: AnalysisContext): void;
|
|
7914
|
+
/** Adds an enum member. */
|
|
7915
|
+
member(name: string, value?: ValueFn): this;
|
|
7916
|
+
/** Adds multiple enum members. */
|
|
7917
|
+
members(...members: ReadonlyArray<EnumMemberTsDsl>): this;
|
|
7918
|
+
toAst(): ts.EnumDeclaration;
|
|
7828
7919
|
}
|
|
7829
7920
|
//#endregion
|
|
7830
7921
|
//#region src/ts-dsl/decl/func.d.ts
|
|
7831
7922
|
type FuncMode = 'arrow' | 'decl' | 'expr';
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
|
|
7836
|
-
|
|
7837
|
-
protected name?:
|
|
7923
|
+
type FuncName = Symbol | string;
|
|
7924
|
+
declare const Mixed$28: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ArrowFunction>, TypeParamsMethods>, StaticMethods>, PublicMethods>, ProtectedMethods>, PrivateMethods>, ParamMethods>, DocMethods>, DoMethods>, DecoratorMethods>, AsyncMethods>, AsMethods>, AbstractMethods>;
|
|
7925
|
+
declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends Mixed$28 {
|
|
7926
|
+
readonly '~dsl' = "FuncTsDsl";
|
|
7927
|
+
protected mode?: FuncMode;
|
|
7928
|
+
protected name?: Ref<FuncName>;
|
|
7838
7929
|
protected _returns?: TypeTsDsl;
|
|
7839
7930
|
constructor();
|
|
7840
7931
|
constructor(fn: (f: ImplFuncTsDsl<'arrow'>) => void);
|
|
7841
|
-
constructor(name:
|
|
7842
|
-
constructor(name:
|
|
7932
|
+
constructor(name: FuncName);
|
|
7933
|
+
constructor(name: FuncName, fn: (f: ImplFuncTsDsl<'decl'>) => void);
|
|
7934
|
+
analyze(ctx: AnalysisContext): void;
|
|
7843
7935
|
/** Switches the function to an arrow function form. */
|
|
7844
7936
|
arrow(): FuncTsDsl<'arrow'>;
|
|
7845
7937
|
/** Switches the function to a function declaration form. */
|
|
@@ -7848,9 +7940,8 @@ declare class ImplFuncTsDsl<M extends FuncMode = 'arrow'> extends TsDsl<M extend
|
|
|
7848
7940
|
expr(): FuncTsDsl<'expr'>;
|
|
7849
7941
|
/** Sets the return type. */
|
|
7850
7942
|
returns(type: string | TypeTsDsl): this;
|
|
7851
|
-
|
|
7943
|
+
toAst(): M extends 'decl' ? ts.FunctionDeclaration : M extends 'expr' ? ts.FunctionExpression : ts.ArrowFunction;
|
|
7852
7944
|
}
|
|
7853
|
-
interface ImplFuncTsDsl extends AbstractMixin, AsMixin, AsyncMixin, DecoratorMixin, DoMixin, DocMixin, ParamMixin, PrivateMixin, ProtectedMixin, PublicMixin, StaticMixin, TypeParamsMixin {}
|
|
7854
7945
|
declare const FuncTsDsl: {
|
|
7855
7946
|
new (): FuncTsDsl<"arrow">;
|
|
7856
7947
|
new (fn: (f: FuncTsDsl<"arrow">) => void): FuncTsDsl<"arrow">;
|
|
@@ -7859,44 +7950,48 @@ declare const FuncTsDsl: {
|
|
|
7859
7950
|
} & typeof ImplFuncTsDsl;
|
|
7860
7951
|
type FuncTsDsl<M extends FuncMode = 'arrow'> = ImplFuncTsDsl<M>;
|
|
7861
7952
|
//#endregion
|
|
7862
|
-
//#region src/ts-dsl/decl/
|
|
7863
|
-
declare
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
|
|
7873
|
-
|
|
7874
|
-
|
|
7875
|
-
protected modifiers: {
|
|
7876
|
-
list: () => ts.Modifier[];
|
|
7953
|
+
//#region src/ts-dsl/decl/pattern.d.ts
|
|
7954
|
+
declare const Mixed$27: abstract new () => TsDsl<ts.BindingName>;
|
|
7955
|
+
/**
|
|
7956
|
+
* Builds binding patterns (e.g. `{ foo, bar }`, `[a, b, ...rest]`).
|
|
7957
|
+
*/
|
|
7958
|
+
declare class PatternTsDsl extends Mixed$27 {
|
|
7959
|
+
readonly '~dsl' = "PatternTsDsl";
|
|
7960
|
+
protected pattern?: {
|
|
7961
|
+
kind: 'array';
|
|
7962
|
+
values: ReadonlyArray<string>;
|
|
7963
|
+
} | {
|
|
7964
|
+
kind: 'object';
|
|
7965
|
+
values: Record<string, string>;
|
|
7877
7966
|
};
|
|
7878
|
-
protected
|
|
7879
|
-
|
|
7880
|
-
|
|
7967
|
+
protected _spread?: string;
|
|
7968
|
+
analyze(ctx: AnalysisContext): void;
|
|
7969
|
+
/** Defines an array pattern (e.g. `[a, b, c]`). */
|
|
7970
|
+
array(...props: ReadonlyArray<string> | [ReadonlyArray<string>]): this;
|
|
7971
|
+
/** Defines an object pattern (e.g. `{ a, b: alias }`). */
|
|
7972
|
+
object(...props: ReadonlyArray<MaybeArray$1<string> | Record<string, string>>): this;
|
|
7973
|
+
/** Adds a spread element (e.g. `...rest`, `...options`, `...args`). */
|
|
7974
|
+
spread(name: string): this;
|
|
7975
|
+
toAst(): ts.ObjectBindingPattern | ts.ArrayBindingPattern;
|
|
7976
|
+
private createSpread;
|
|
7881
7977
|
}
|
|
7882
|
-
interface SetterTsDsl extends AbstractMixin, AsyncMixin, DecoratorMixin, DoMixin, DocMixin, ParamMixin, PrivateMixin, ProtectedMixin, PublicMixin, StaticMixin {}
|
|
7883
7978
|
//#endregion
|
|
7884
7979
|
//#region src/ts-dsl/mixins/layout.d.ts
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7980
|
+
interface LayoutMethods extends Node {
|
|
7981
|
+
/** Computes whether output should be multiline based on layout setting and element count. */
|
|
7982
|
+
$multiline(count: number): boolean;
|
|
7888
7983
|
/** Sets automatic line output with optional threshold (default: 3). */
|
|
7889
7984
|
auto(threshold?: number): this;
|
|
7890
7985
|
/** Sets single line output. */
|
|
7891
7986
|
inline(): this;
|
|
7892
7987
|
/** Sets multi line output. */
|
|
7893
7988
|
pretty(): this;
|
|
7894
|
-
/** Computes whether output should be multiline based on layout setting and element count. */
|
|
7895
|
-
protected $multiline(count: number): boolean;
|
|
7896
7989
|
}
|
|
7897
7990
|
//#endregion
|
|
7898
7991
|
//#region src/ts-dsl/expr/array.d.ts
|
|
7899
|
-
declare
|
|
7992
|
+
declare const Mixed$26: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ArrayLiteralExpression>, LayoutMethods>, AsMethods>;
|
|
7993
|
+
declare class ArrayTsDsl extends Mixed$26 {
|
|
7994
|
+
readonly '~dsl' = "ArrayTsDsl";
|
|
7900
7995
|
protected _elements: Array<{
|
|
7901
7996
|
expr: MaybeTsDsl<ts.Expression>;
|
|
7902
7997
|
kind: 'element';
|
|
@@ -7905,185 +8000,78 @@ declare class ArrayTsDsl extends TsDsl<ts.ArrayLiteralExpression> {
|
|
|
7905
8000
|
kind: 'spread';
|
|
7906
8001
|
}>;
|
|
7907
8002
|
constructor(...exprs: Array<string | number | boolean | MaybeTsDsl<ts.Expression>>);
|
|
8003
|
+
analyze(ctx: AnalysisContext): void;
|
|
7908
8004
|
/** Adds a single array element. */
|
|
7909
8005
|
element(expr: string | number | boolean | MaybeTsDsl<ts.Expression>): this;
|
|
7910
8006
|
/** Adds multiple array elements. */
|
|
7911
8007
|
elements(...exprs: ReadonlyArray<string | number | boolean | MaybeTsDsl<ts.Expression>>): this;
|
|
7912
8008
|
/** Adds a spread element (`...expr`). */
|
|
7913
8009
|
spread(expr: MaybeTsDsl<ts.Expression>): this;
|
|
7914
|
-
|
|
7915
|
-
}
|
|
7916
|
-
interface ArrayTsDsl extends AsMixin, LayoutMixin {}
|
|
7917
|
-
//#endregion
|
|
7918
|
-
//#region src/ts-dsl/expr/typeof.d.ts
|
|
7919
|
-
declare class TypeOfExprTsDsl extends TsDsl<ts.TypeOfExpression> {
|
|
7920
|
-
protected _expr: string | MaybeTsDsl<ts.Expression>;
|
|
7921
|
-
constructor(expr: string | MaybeTsDsl<ts.Expression>);
|
|
7922
|
-
$render(): ts.TypeOfExpression;
|
|
7923
|
-
}
|
|
7924
|
-
interface TypeOfExprTsDsl extends OperatorMixin {}
|
|
7925
|
-
//#endregion
|
|
7926
|
-
//#region src/ts-dsl/type/attr.d.ts
|
|
7927
|
-
declare class TypeAttrTsDsl extends TypeTsDsl<ts.QualifiedName> {
|
|
7928
|
-
protected _base?: string | MaybeTsDsl<ts.EntityName>;
|
|
7929
|
-
protected right: string | ts.Identifier;
|
|
7930
|
-
constructor(base: string | MaybeTsDsl<ts.EntityName>, right: string | ts.Identifier);
|
|
7931
|
-
constructor(right: string | ts.Identifier);
|
|
7932
|
-
base(base?: string | MaybeTsDsl<ts.EntityName>): this;
|
|
7933
|
-
$render(): ts.QualifiedName;
|
|
7934
|
-
}
|
|
7935
|
-
interface TypeAttrTsDsl extends TypeExprMixin {}
|
|
7936
|
-
//#endregion
|
|
7937
|
-
//#region src/ts-dsl/type/expr.d.ts
|
|
7938
|
-
declare class TypeExprTsDsl extends TypeTsDsl<ts.TypeReferenceNode> {
|
|
7939
|
-
protected _exprInput?: string | ts.Identifier | TypeAttrTsDsl;
|
|
7940
|
-
constructor();
|
|
7941
|
-
constructor(fn: (t: TypeExprTsDsl) => void);
|
|
7942
|
-
constructor(name: string);
|
|
7943
|
-
constructor(name: string, fn?: (t: TypeExprTsDsl) => void);
|
|
7944
|
-
/** Accesses a nested type (e.g. `Foo.Bar`). */
|
|
7945
|
-
attr(right: string | ts.Identifier | TypeAttrTsDsl): this;
|
|
7946
|
-
$render(): ts.TypeReferenceNode;
|
|
7947
|
-
}
|
|
7948
|
-
interface TypeExprTsDsl extends TypeArgsMixin, TypeExprMixin {}
|
|
7949
|
-
//#endregion
|
|
7950
|
-
//#region src/ts-dsl/type/idx.d.ts
|
|
7951
|
-
declare class TypeIdxTsDsl extends TypeTsDsl<ts.IndexedAccessTypeNode> {
|
|
7952
|
-
protected _base: string | MaybeTsDsl<ts.TypeNode>;
|
|
7953
|
-
protected _index: string | MaybeTsDsl<ts.TypeNode> | number;
|
|
7954
|
-
constructor(base: string | MaybeTsDsl<ts.TypeNode>, index: string | MaybeTsDsl<ts.TypeNode> | number);
|
|
7955
|
-
base(base: string | MaybeTsDsl<ts.TypeNode>): this;
|
|
7956
|
-
index(index: string | MaybeTsDsl<ts.TypeNode> | number): this;
|
|
7957
|
-
$render(): ts.IndexedAccessTypeNode;
|
|
7958
|
-
}
|
|
7959
|
-
interface TypeIdxTsDsl extends TypeExprMixin {}
|
|
7960
|
-
//#endregion
|
|
7961
|
-
//#region src/ts-dsl/type/operator.d.ts
|
|
7962
|
-
type Op = ts.SyntaxKind.KeyOfKeyword | ts.SyntaxKind.ReadonlyKeyword | ts.SyntaxKind.UniqueKeyword;
|
|
7963
|
-
type Type$1 = string | MaybeTsDsl<ts.TypeNode>;
|
|
7964
|
-
/**
|
|
7965
|
-
* Builds a TypeScript `TypeOperatorNode`, such as:
|
|
7966
|
-
*
|
|
7967
|
-
* - `keyof T`
|
|
7968
|
-
* - `readonly U`
|
|
7969
|
-
* - `unique V`
|
|
7970
|
-
*
|
|
7971
|
-
* This DSL provides both a generic `.operator()` API and convenient
|
|
7972
|
-
* shorthand methods (`.keyof()`, `.readonly()`, `.unique()`).
|
|
7973
|
-
*
|
|
7974
|
-
* The node will throw during render if required fields are missing.
|
|
7975
|
-
*/
|
|
7976
|
-
declare class TypeOperatorTsDsl extends TypeTsDsl<ts.TypeOperatorNode> {
|
|
7977
|
-
protected _op?: Op;
|
|
7978
|
-
protected _type?: Type$1;
|
|
7979
|
-
/** Shorthand: builds `keyof T`. */
|
|
7980
|
-
keyof(type: Type$1): this;
|
|
7981
|
-
/** Sets the operator explicitly. */
|
|
7982
|
-
operator(op: Op): this;
|
|
7983
|
-
/** Shorthand: builds `readonly T`. */
|
|
7984
|
-
readonly(type: Type$1): this;
|
|
7985
|
-
/** Sets the target type of the operator. */
|
|
7986
|
-
type(type: Type$1): this;
|
|
7987
|
-
/** Shorthand: builds `unique T`. */
|
|
7988
|
-
unique(type: Type$1): this;
|
|
7989
|
-
$render(): ts.TypeOperatorNode;
|
|
7990
|
-
/** Throws if required fields are not set. */
|
|
7991
|
-
$validate(): asserts this is this & {
|
|
7992
|
-
_op: Op;
|
|
7993
|
-
_type: Type$1;
|
|
7994
|
-
};
|
|
7995
|
-
private missingRequiredCalls;
|
|
7996
|
-
}
|
|
7997
|
-
//#endregion
|
|
7998
|
-
//#region src/ts-dsl/type/query.d.ts
|
|
7999
|
-
declare class TypeQueryTsDsl extends TypeTsDsl<ts.TypeQueryNode> {
|
|
8000
|
-
protected _expr: string | MaybeTsDsl<TypeTsDsl | ts.Expression>;
|
|
8001
|
-
constructor(expr: string | MaybeTsDsl<TypeTsDsl | ts.Expression>);
|
|
8002
|
-
$render(): ts.TypeQueryNode;
|
|
8003
|
-
}
|
|
8004
|
-
interface TypeQueryTsDsl extends TypeExprMixin {}
|
|
8005
|
-
//#endregion
|
|
8006
|
-
//#region src/ts-dsl/mixins/type-expr.d.ts
|
|
8007
|
-
declare class TypeExprMixin {
|
|
8008
|
-
/** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
|
|
8009
|
-
idx(this: MaybeTsDsl<TypeTsDsl>, index: string | number | MaybeTsDsl<ts.TypeNode>): TypeIdxTsDsl;
|
|
8010
|
-
/** Shorthand: builds `keyof T`. */
|
|
8011
|
-
keyof(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
|
|
8012
|
-
/** Shorthand: builds `readonly T`. */
|
|
8013
|
-
readonly(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
|
|
8014
|
-
/** Create a TypeExpr DSL node representing ReturnType<this>. */
|
|
8015
|
-
returnType(this: MaybeTsDsl<ts.Expression>): TypeExprTsDsl;
|
|
8016
|
-
/** Create a TypeOfExpr DSL node representing typeof this. */
|
|
8017
|
-
typeofExpr(this: MaybeTsDsl<ts.Expression>): TypeOfExprTsDsl;
|
|
8018
|
-
/** Create a TypeQuery DSL node representing typeof this. */
|
|
8019
|
-
typeofType(this: MaybeTsDsl<TypeTsDsl | ts.Expression>): TypeQueryTsDsl;
|
|
8020
|
-
/**
|
|
8021
|
-
* Create a `typeof` operator that narrows its return type based on the receiver.
|
|
8022
|
-
*
|
|
8023
|
-
* - If `this` is a `TsDsl<ts.Expression>` → returns TypeOfExprTsDsl
|
|
8024
|
-
* - If `this` is a `TsDsl<TypeTsDsl>` → returns TypeQueryTsDsl
|
|
8025
|
-
* - If `this` is a raw ts.Expression → returns TypeOfExprTsDsl
|
|
8026
|
-
* - Otherwise → returns TypeQueryTsDsl
|
|
8027
|
-
*/
|
|
8028
|
-
typeof<T extends MaybeTsDsl<TypeTsDsl | ts.Expression>>(this: T): T extends MaybeTsDsl<ts.Expression> ? TypeOfExprTsDsl : T extends MaybeTsDsl<TypeTsDsl> ? TypeQueryTsDsl : TypeQueryTsDsl | TypeOfExprTsDsl;
|
|
8029
|
-
/** Shorthand: builds `unique T`. */
|
|
8030
|
-
unique(this: MaybeTsDsl<TypeTsDsl>): TypeOperatorTsDsl;
|
|
8010
|
+
toAst(): ts.ArrayLiteralExpression;
|
|
8031
8011
|
}
|
|
8032
8012
|
//#endregion
|
|
8033
8013
|
//#region src/ts-dsl/expr/expr.d.ts
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8014
|
+
type Id = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
8015
|
+
declare const Mixed$25: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Expression>, TypeExprMethods>, OperatorMethods>, ExprMethods>, AsMethods>;
|
|
8016
|
+
declare class ExprTsDsl extends Mixed$25 {
|
|
8017
|
+
readonly '~dsl' = "ExprTsDsl";
|
|
8018
|
+
protected _exprInput: Ref<Id>;
|
|
8019
|
+
constructor(id: Id);
|
|
8020
|
+
analyze(ctx: AnalysisContext): void;
|
|
8021
|
+
toAst(): any;
|
|
8038
8022
|
}
|
|
8039
|
-
interface ExprTsDsl extends AsMixin, ExprMixin, OperatorMixin, TypeExprMixin {}
|
|
8040
8023
|
//#endregion
|
|
8041
8024
|
//#region src/ts-dsl/expr/id.d.ts
|
|
8042
|
-
declare
|
|
8025
|
+
declare const Mixed$24: abstract new () => TsDsl<ts.Identifier>;
|
|
8026
|
+
declare class IdTsDsl extends Mixed$24 {
|
|
8027
|
+
readonly '~dsl' = "IdTsDsl";
|
|
8043
8028
|
protected name: string;
|
|
8044
8029
|
constructor(name: string);
|
|
8045
|
-
|
|
8030
|
+
analyze(ctx: AnalysisContext): void;
|
|
8031
|
+
toAst(): ts.Identifier;
|
|
8046
8032
|
}
|
|
8047
8033
|
//#endregion
|
|
8048
8034
|
//#region src/ts-dsl/expr/literal.d.ts
|
|
8049
|
-
declare
|
|
8035
|
+
declare const Mixed$23: MixinCtor<abstract new () => TsDsl<ts.LiteralExpression | ts.NullLiteral | ts.BooleanLiteral | ts.PrefixUnaryExpression>, AsMethods>;
|
|
8036
|
+
declare class LiteralTsDsl extends Mixed$23 {
|
|
8037
|
+
readonly '~dsl' = "LiteralTsDsl";
|
|
8050
8038
|
protected value: string | number | boolean | null;
|
|
8051
8039
|
constructor(value: string | number | boolean | null);
|
|
8052
|
-
|
|
8040
|
+
analyze(ctx: AnalysisContext): void;
|
|
8041
|
+
toAst(): any;
|
|
8053
8042
|
}
|
|
8054
|
-
interface LiteralTsDsl extends AsMixin {}
|
|
8055
8043
|
//#endregion
|
|
8056
8044
|
//#region src/ts-dsl/expr/new.d.ts
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8045
|
+
type NewExpr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
8046
|
+
declare const Mixed$22: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.NewExpression>, TypeArgsMethods>, ExprMethods>, ArgsMethods>;
|
|
8047
|
+
declare class NewTsDsl extends Mixed$22 {
|
|
8048
|
+
readonly '~dsl' = "NewTsDsl";
|
|
8049
|
+
protected classExpr: Ref<NewExpr>;
|
|
8050
|
+
constructor(classExpr: NewExpr, ...args: ReadonlyArray<NewExpr>);
|
|
8051
|
+
analyze(ctx: AnalysisContext): void;
|
|
8052
|
+
toAst(): ts.NewExpression;
|
|
8062
8053
|
}
|
|
8063
|
-
interface NewTsDsl extends ArgsMixin, ExprMixin, TypeArgsMixin {}
|
|
8064
8054
|
//#endregion
|
|
8065
8055
|
//#region src/ts-dsl/layout/hint.d.ts
|
|
8066
8056
|
declare class HintTsDsl extends TsDsl<ts.Node> {
|
|
8057
|
+
readonly '~dsl' = "HintTsDsl";
|
|
8067
8058
|
protected _lines: Array<string>;
|
|
8068
8059
|
constructor(lines?: MaybeArray$1<string>, fn?: (d: HintTsDsl) => void);
|
|
8060
|
+
analyze(ctx: AnalysisContext): void;
|
|
8069
8061
|
add(...lines: ReadonlyArray<string>): this;
|
|
8070
8062
|
apply<T extends ts.Node>(node: T): T;
|
|
8071
|
-
|
|
8063
|
+
toAst(): ts.Node;
|
|
8072
8064
|
}
|
|
8073
8065
|
//#endregion
|
|
8074
8066
|
//#region src/ts-dsl/mixins/hint.d.ts
|
|
8075
|
-
|
|
8076
|
-
|
|
8077
|
-
|
|
8078
|
-
|
|
8079
|
-
$render(): any;
|
|
8080
|
-
};
|
|
8081
|
-
} & TBase;
|
|
8082
|
-
type HintMixin = InstanceType<ReturnType<typeof HintMixin>>;
|
|
8067
|
+
interface HintMethods extends Node {
|
|
8068
|
+
$hint<T extends ts.Node>(node: T): T;
|
|
8069
|
+
hint(lines?: MaybeArray$1<string>, fn?: (h: HintTsDsl) => void): this;
|
|
8070
|
+
}
|
|
8083
8071
|
//#endregion
|
|
8084
8072
|
//#region src/ts-dsl/expr/prop.d.ts
|
|
8085
|
-
type Expr$1 = string | MaybeTsDsl<ts.Expression>;
|
|
8086
|
-
type Stmt$1 = string | MaybeTsDsl<ts.Statement>;
|
|
8073
|
+
type Expr$1 = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
8074
|
+
type Stmt$1 = Symbol | string | MaybeTsDsl<ts.Statement>;
|
|
8087
8075
|
type Kind = 'computed' | 'getter' | 'prop' | 'setter' | 'spread';
|
|
8088
8076
|
type Meta = {
|
|
8089
8077
|
kind: 'computed';
|
|
@@ -8101,30 +8089,35 @@ type Meta = {
|
|
|
8101
8089
|
kind: 'spread';
|
|
8102
8090
|
name?: undefined;
|
|
8103
8091
|
};
|
|
8104
|
-
declare
|
|
8105
|
-
|
|
8092
|
+
declare const Mixed$21: MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralElementLike>, DocMethods>;
|
|
8093
|
+
declare class ObjectPropTsDsl extends Mixed$21 {
|
|
8094
|
+
readonly '~dsl' = "ObjectPropTsDsl";
|
|
8095
|
+
protected _value?: Ref<Expr$1 | Stmt$1>;
|
|
8106
8096
|
protected meta: Meta;
|
|
8107
8097
|
constructor(meta: Meta);
|
|
8098
|
+
analyze(ctx: AnalysisContext): void;
|
|
8108
8099
|
/** Returns true when all required builder calls are present. */
|
|
8109
8100
|
get isValid(): boolean;
|
|
8110
8101
|
value(value: Expr$1 | Stmt$1 | ((p: ObjectPropTsDsl) => void)): this;
|
|
8111
|
-
|
|
8102
|
+
toAst(): any;
|
|
8112
8103
|
$validate(): asserts this is this & {
|
|
8113
8104
|
_value: Expr$1 | Stmt$1;
|
|
8114
8105
|
kind: Kind;
|
|
8115
8106
|
};
|
|
8116
8107
|
private missingRequiredCalls;
|
|
8117
8108
|
}
|
|
8118
|
-
interface ObjectPropTsDsl extends DocMixin {}
|
|
8119
8109
|
//#endregion
|
|
8120
8110
|
//#region src/ts-dsl/expr/object.d.ts
|
|
8121
|
-
type Expr = string | MaybeTsDsl<ts.Expression>;
|
|
8122
|
-
type Stmt = string | MaybeTsDsl<ts.Statement>;
|
|
8111
|
+
type Expr = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
8112
|
+
type Stmt = Symbol | string | MaybeTsDsl<ts.Statement>;
|
|
8123
8113
|
type ExprFn = Expr | ((p: ObjectPropTsDsl) => void);
|
|
8124
8114
|
type StmtFn = Stmt | ((p: ObjectPropTsDsl) => void);
|
|
8125
|
-
declare
|
|
8115
|
+
declare const Mixed$20: MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.ObjectLiteralExpression>, LayoutMethods>, HintMethods>, ExprMethods>, AsMethods>;
|
|
8116
|
+
declare class ObjectTsDsl extends Mixed$20 {
|
|
8117
|
+
readonly '~dsl' = "ObjectTsDsl";
|
|
8126
8118
|
protected _props: Array<ObjectPropTsDsl>;
|
|
8127
8119
|
constructor(...props: Array<ObjectPropTsDsl>);
|
|
8120
|
+
analyze(ctx: AnalysisContext): void;
|
|
8128
8121
|
/** Adds a computed property (e.g. `{ [expr]: value }`). */
|
|
8129
8122
|
computed(name: string, expr: ExprFn): this;
|
|
8130
8123
|
/** Adds a getter property (e.g. `{ get foo() { ... } }`). */
|
|
@@ -8141,16 +8134,17 @@ declare class ObjectTsDsl extends TsDsl<ts.ObjectLiteralExpression> {
|
|
|
8141
8134
|
setter(name: string, stmt: StmtFn): this;
|
|
8142
8135
|
/** Adds a spread property (e.g. `{ ...options }`). */
|
|
8143
8136
|
spread(expr: ExprFn): this;
|
|
8144
|
-
|
|
8145
|
-
$render(): ts.ObjectLiteralExpression;
|
|
8137
|
+
toAst(): ts.ObjectLiteralExpression;
|
|
8146
8138
|
}
|
|
8147
|
-
interface ObjectTsDsl extends AsMixin, ExprMixin, HintMixin, LayoutMixin {}
|
|
8148
8139
|
//#endregion
|
|
8149
8140
|
//#region src/ts-dsl/expr/prefix.d.ts
|
|
8150
|
-
declare
|
|
8141
|
+
declare const Mixed$19: abstract new () => TsDsl<ts.PrefixUnaryExpression>;
|
|
8142
|
+
declare class PrefixTsDsl extends Mixed$19 {
|
|
8143
|
+
readonly '~dsl' = "PrefixTsDsl";
|
|
8151
8144
|
protected _expr?: string | MaybeTsDsl<ts.Expression>;
|
|
8152
8145
|
protected _op?: ts.PrefixUnaryOperator;
|
|
8153
8146
|
constructor(expr?: string | MaybeTsDsl<ts.Expression>, op?: ts.PrefixUnaryOperator);
|
|
8147
|
+
analyze(ctx: AnalysisContext): void;
|
|
8154
8148
|
/** Sets the operand (the expression being prefixed). */
|
|
8155
8149
|
expr(expr: string | MaybeTsDsl<ts.Expression>): this;
|
|
8156
8150
|
/** Sets the operator to MinusToken for negation (`-`). */
|
|
@@ -8159,98 +8153,138 @@ declare class PrefixTsDsl extends TsDsl<ts.PrefixUnaryExpression> {
|
|
|
8159
8153
|
not(): this;
|
|
8160
8154
|
/** Sets the operator (e.g. `ts.SyntaxKind.ExclamationToken` for `!`). */
|
|
8161
8155
|
op(op: ts.PrefixUnaryOperator): this;
|
|
8162
|
-
|
|
8163
|
-
$render(): ts.PrefixUnaryExpression;
|
|
8156
|
+
toAst(): ts.PrefixUnaryExpression;
|
|
8164
8157
|
}
|
|
8165
8158
|
//#endregion
|
|
8166
8159
|
//#region src/ts-dsl/expr/regexp.d.ts
|
|
8167
8160
|
type RegexFlag = 'g' | 'i' | 'm' | 's' | 'u' | 'y';
|
|
8168
8161
|
type RegexFlags<Avail extends string = RegexFlag> = '' | { [K in Avail]: `${K}${RegexFlags<Exclude<Avail, K>>}` }[Avail];
|
|
8169
|
-
declare
|
|
8162
|
+
declare const Mixed$18: abstract new () => TsDsl<ts.RegularExpressionLiteral>;
|
|
8163
|
+
declare class RegExpTsDsl extends Mixed$18 {
|
|
8164
|
+
readonly '~dsl' = "RegExpTsDsl";
|
|
8170
8165
|
protected pattern: string;
|
|
8171
8166
|
protected flags?: RegexFlags;
|
|
8172
8167
|
constructor(pattern: string, flags?: RegexFlags);
|
|
8173
|
-
|
|
8174
|
-
|
|
8168
|
+
analyze(ctx: AnalysisContext): void;
|
|
8169
|
+
toAst(): ts.RegularExpressionLiteral;
|
|
8175
8170
|
}
|
|
8176
8171
|
//#endregion
|
|
8177
8172
|
//#region src/ts-dsl/expr/template.d.ts
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8173
|
+
type TemplatePart = Symbol | string | MaybeTsDsl<ts.Expression>;
|
|
8174
|
+
declare const Mixed$17: abstract new () => TsDsl<ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression>;
|
|
8175
|
+
declare class TemplateTsDsl extends Mixed$17 {
|
|
8176
|
+
readonly '~dsl' = "TemplateTsDsl";
|
|
8177
|
+
protected parts: Array<Ref<TemplatePart>>;
|
|
8178
|
+
constructor(value?: TemplatePart);
|
|
8179
|
+
analyze(ctx: AnalysisContext): void;
|
|
8180
|
+
add(value: TemplatePart): this;
|
|
8181
|
+
toAst(): ts.NoSubstitutionTemplateLiteral | ts.TemplateExpression;
|
|
8183
8182
|
}
|
|
8184
8183
|
//#endregion
|
|
8185
8184
|
//#region src/ts-dsl/expr/ternary.d.ts
|
|
8186
|
-
declare
|
|
8185
|
+
declare const Mixed$16: abstract new () => TsDsl<ts.ConditionalExpression>;
|
|
8186
|
+
declare class TernaryTsDsl extends Mixed$16 {
|
|
8187
|
+
readonly '~dsl' = "TernaryTsDsl";
|
|
8187
8188
|
protected _condition?: string | MaybeTsDsl<ts.Expression>;
|
|
8188
8189
|
protected _then?: string | MaybeTsDsl<ts.Expression>;
|
|
8189
8190
|
protected _else?: string | MaybeTsDsl<ts.Expression>;
|
|
8190
8191
|
constructor(condition?: string | MaybeTsDsl<ts.Expression>);
|
|
8192
|
+
analyze(ctx: AnalysisContext): void;
|
|
8191
8193
|
condition(condition: string | MaybeTsDsl<ts.Expression>): this;
|
|
8192
8194
|
do(expr: string | MaybeTsDsl<ts.Expression>): this;
|
|
8193
8195
|
otherwise(expr: string | MaybeTsDsl<ts.Expression>): this;
|
|
8194
|
-
|
|
8196
|
+
toAst(): ts.ConditionalExpression;
|
|
8197
|
+
}
|
|
8198
|
+
//#endregion
|
|
8199
|
+
//#region src/ts-dsl/layout/newline.d.ts
|
|
8200
|
+
declare class NewlineTsDsl extends TsDsl<ts.Identifier> {
|
|
8201
|
+
readonly '~dsl' = "NewlineTsDsl";
|
|
8202
|
+
analyze(ctx: AnalysisContext): void;
|
|
8203
|
+
toAst(): ts.Identifier;
|
|
8195
8204
|
}
|
|
8196
8205
|
//#endregion
|
|
8197
8206
|
//#region src/ts-dsl/layout/note.d.ts
|
|
8198
8207
|
declare class NoteTsDsl extends TsDsl<ts.Node> {
|
|
8208
|
+
readonly '~dsl' = "NoteTsDsl";
|
|
8199
8209
|
protected _lines: Array<string>;
|
|
8200
8210
|
constructor(lines?: MaybeArray$1<string>, fn?: (d: NoteTsDsl) => void);
|
|
8211
|
+
analyze(ctx: AnalysisContext): void;
|
|
8201
8212
|
add(...lines: ReadonlyArray<string>): this;
|
|
8202
8213
|
apply<T extends ts.Node>(node: T): T;
|
|
8203
|
-
|
|
8214
|
+
toAst(): ts.Node;
|
|
8204
8215
|
}
|
|
8205
8216
|
//#endregion
|
|
8206
|
-
//#region src/ts-dsl/stmt/
|
|
8207
|
-
declare
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
constructor(
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
$render(): ts.IfStatement;
|
|
8217
|
+
//#region src/ts-dsl/stmt/block.d.ts
|
|
8218
|
+
declare const Mixed$15: MixinCtor<MixinCtor<abstract new () => TsDsl<ts.Block>, LayoutMethods>, DoMethods>;
|
|
8219
|
+
declare class BlockTsDsl extends Mixed$15 {
|
|
8220
|
+
readonly '~dsl' = "BlockTsDsl";
|
|
8221
|
+
constructor(...items: Array<DoExpr>);
|
|
8222
|
+
analyze(ctx: AnalysisContext): void;
|
|
8223
|
+
toAst(): ts.Block;
|
|
8214
8224
|
}
|
|
8215
|
-
interface IfTsDsl extends DoMixin {}
|
|
8216
8225
|
//#endregion
|
|
8217
8226
|
//#region src/ts-dsl/stmt/stmt.d.ts
|
|
8218
|
-
declare
|
|
8227
|
+
declare const Mixed$14: abstract new () => TsDsl<ts.Statement>;
|
|
8228
|
+
declare class StmtTsDsl extends Mixed$14 {
|
|
8229
|
+
readonly '~dsl' = "StmtTsDsl";
|
|
8219
8230
|
protected _inner: ts.Expression | ts.Statement | TsDsl<any>;
|
|
8220
8231
|
constructor(inner: ts.Expression | ts.Statement | TsDsl<any>);
|
|
8221
|
-
|
|
8232
|
+
analyze(ctx: AnalysisContext): void;
|
|
8233
|
+
toAst(): ts.Statement;
|
|
8222
8234
|
}
|
|
8223
8235
|
//#endregion
|
|
8224
8236
|
//#region src/ts-dsl/stmt/throw.d.ts
|
|
8225
|
-
declare
|
|
8237
|
+
declare const Mixed$13: abstract new () => TsDsl<ts.ThrowStatement>;
|
|
8238
|
+
declare class ThrowTsDsl extends Mixed$13 {
|
|
8239
|
+
readonly '~dsl' = "ThrowTsDsl";
|
|
8226
8240
|
protected error: string | MaybeTsDsl<ts.Expression>;
|
|
8227
8241
|
protected msg?: string | MaybeTsDsl<ts.Expression>;
|
|
8228
8242
|
protected useNew: boolean;
|
|
8229
8243
|
constructor(error: string | MaybeTsDsl<ts.Expression>, useNew?: boolean);
|
|
8244
|
+
analyze(ctx: AnalysisContext): void;
|
|
8230
8245
|
message(value: string | MaybeTsDsl<ts.Expression>): this;
|
|
8231
|
-
|
|
8246
|
+
toAst(): ts.ThrowStatement;
|
|
8247
|
+
}
|
|
8248
|
+
//#endregion
|
|
8249
|
+
//#region src/ts-dsl/stmt/try.d.ts
|
|
8250
|
+
declare const Mixed$12: abstract new () => TsDsl<ts.TryStatement>;
|
|
8251
|
+
type CatchParam = Symbol | string;
|
|
8252
|
+
declare class TryTsDsl extends Mixed$12 {
|
|
8253
|
+
readonly '~dsl' = "TryTsDsl";
|
|
8254
|
+
protected _catch?: Array<DoExpr>;
|
|
8255
|
+
protected _catchArg?: CatchParam;
|
|
8256
|
+
protected _finally?: Array<DoExpr>;
|
|
8257
|
+
protected _try?: Array<DoExpr>;
|
|
8258
|
+
constructor(...tryBlock: Array<DoExpr>);
|
|
8259
|
+
analyze(ctx: AnalysisContext): void;
|
|
8260
|
+
catch(...items: Array<DoExpr>): this;
|
|
8261
|
+
catchArg(arg: CatchParam): this;
|
|
8262
|
+
finally(...items: Array<DoExpr>): this;
|
|
8263
|
+
try(...items: Array<DoExpr>): this;
|
|
8264
|
+
toAst(): ts.TryStatement;
|
|
8232
8265
|
}
|
|
8233
8266
|
//#endregion
|
|
8234
8267
|
//#region src/ts-dsl/stmt/var.d.ts
|
|
8235
|
-
|
|
8268
|
+
type VarName = Symbol | string;
|
|
8269
|
+
declare const Mixed$11: MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.VariableStatement>, ValueMethods>, PatternMethods>, HintMethods>, ExportMethods>, DocMethods>, DefaultMethods>;
|
|
8270
|
+
declare class VarTsDsl extends Mixed$11 {
|
|
8271
|
+
readonly '~dsl' = "VarTsDsl";
|
|
8236
8272
|
protected kind: ts.NodeFlags;
|
|
8237
|
-
protected
|
|
8238
|
-
list: () => ts.Modifier[];
|
|
8239
|
-
};
|
|
8240
|
-
protected name?: string;
|
|
8273
|
+
protected name?: Ref<VarName>;
|
|
8241
8274
|
protected _type?: TypeTsDsl;
|
|
8242
|
-
constructor(name?:
|
|
8275
|
+
constructor(name?: VarName);
|
|
8276
|
+
analyze(ctx: AnalysisContext): void;
|
|
8243
8277
|
const(): this;
|
|
8244
8278
|
let(): this;
|
|
8245
8279
|
/** Sets the variable type. */
|
|
8246
8280
|
type(type: string | TypeTsDsl): this;
|
|
8247
8281
|
var(): this;
|
|
8248
|
-
|
|
8282
|
+
toAst(): ts.VariableStatement;
|
|
8249
8283
|
}
|
|
8250
|
-
interface VarTsDsl extends DefaultMixin, DocMixin, ExportMixin, HintMixin, PatternMixin, ValueMixin {}
|
|
8251
8284
|
//#endregion
|
|
8252
8285
|
//#region src/ts-dsl/token.d.ts
|
|
8253
8286
|
declare class TokenTsDsl<K$1 extends ts.SyntaxKind = never> extends TsDsl<ts.Token<K$1>> {
|
|
8287
|
+
readonly '~dsl' = "TokenTsDsl";
|
|
8254
8288
|
protected _kind?: K$1;
|
|
8255
8289
|
/** Sets the token kind */
|
|
8256
8290
|
kind(kind: K$1): this;
|
|
@@ -8266,57 +8300,68 @@ declare class TokenTsDsl<K$1 extends ts.SyntaxKind = never> extends TsDsl<ts.Tok
|
|
|
8266
8300
|
readonly(): TokenTsDsl<ts.SyntaxKind.ReadonlyKeyword>;
|
|
8267
8301
|
/** Creates `...` (spread / rest) */
|
|
8268
8302
|
spread(): TokenTsDsl<ts.SyntaxKind.DotDotDotToken>;
|
|
8269
|
-
|
|
8270
|
-
$render(): ts.Token<K$1>;
|
|
8303
|
+
toAst(): ts.Token<K$1>;
|
|
8271
8304
|
}
|
|
8272
8305
|
//#endregion
|
|
8273
8306
|
//#region src/ts-dsl/type/alias.d.ts
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
protected name:
|
|
8280
|
-
|
|
8307
|
+
type Name = Symbol | string;
|
|
8308
|
+
type Value = MaybeTsDsl<ts.TypeNode>;
|
|
8309
|
+
declare const Mixed$10: MixinCtor<MixinCtor<MixinCtor<abstract new () => TsDsl<ts.TypeAliasDeclaration>, TypeParamsMethods>, ExportMethods>, DocMethods>;
|
|
8310
|
+
declare class TypeAliasTsDsl extends Mixed$10 {
|
|
8311
|
+
readonly '~dsl' = "TypeAliasTsDsl";
|
|
8312
|
+
protected name: Ref<Name>;
|
|
8313
|
+
protected value?: Value;
|
|
8314
|
+
constructor(name: Name, fn?: (t: TypeAliasTsDsl) => void);
|
|
8315
|
+
analyze(ctx: AnalysisContext): void;
|
|
8281
8316
|
/** Sets the type expression on the right-hand side of `= ...`. */
|
|
8282
|
-
type(node:
|
|
8283
|
-
|
|
8284
|
-
$render(): ts.TypeAliasDeclaration;
|
|
8317
|
+
type(node: Value): this;
|
|
8318
|
+
toAst(): ts.TypeAliasDeclaration;
|
|
8285
8319
|
}
|
|
8286
|
-
interface TypeAliasTsDsl extends DocMixin, ExportMixin, TypeParamsMixin {}
|
|
8287
8320
|
//#endregion
|
|
8288
8321
|
//#region src/ts-dsl/type/and.d.ts
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
|
|
8293
|
-
|
|
8322
|
+
type Type$1 = Symbol | string | ts.TypeNode | TypeTsDsl;
|
|
8323
|
+
declare const Mixed$9: abstract new () => TypeTsDsl<ts.IntersectionTypeNode>;
|
|
8324
|
+
declare class TypeAndTsDsl extends Mixed$9 {
|
|
8325
|
+
readonly '~dsl' = "TypeAndTsDsl";
|
|
8326
|
+
protected _types: Array<Ref<Type$1>>;
|
|
8327
|
+
constructor(...nodes: Array<Type$1>);
|
|
8328
|
+
analyze(ctx: AnalysisContext): void;
|
|
8329
|
+
types(...nodes: Array<Type$1>): this;
|
|
8330
|
+
toAst(): ts.IntersectionTypeNode;
|
|
8294
8331
|
}
|
|
8295
8332
|
//#endregion
|
|
8296
8333
|
//#region src/ts-dsl/type/func.d.ts
|
|
8297
|
-
declare
|
|
8334
|
+
declare const Mixed$8: MixinCtor<MixinCtor<MixinCtor<abstract new () => TypeTsDsl<ts.FunctionTypeNode>, TypeParamsMethods>, ParamMethods>, DocMethods>;
|
|
8335
|
+
declare class TypeFuncTsDsl extends Mixed$8 {
|
|
8336
|
+
readonly '~dsl' = "TypeFuncTsDsl";
|
|
8298
8337
|
protected _returns?: TypeTsDsl;
|
|
8338
|
+
analyze(ctx: AnalysisContext): void;
|
|
8299
8339
|
/** Sets the return type. */
|
|
8300
8340
|
returns(type: string | TypeTsDsl): this;
|
|
8301
|
-
|
|
8341
|
+
toAst(): ts.FunctionTypeNode;
|
|
8302
8342
|
}
|
|
8303
|
-
interface TypeFuncTsDsl extends DocMixin, ParamMixin, TypeParamsMixin {}
|
|
8304
8343
|
//#endregion
|
|
8305
8344
|
//#region src/ts-dsl/type/literal.d.ts
|
|
8306
|
-
declare
|
|
8345
|
+
declare const Mixed$7: abstract new () => TypeTsDsl<ts.LiteralTypeNode>;
|
|
8346
|
+
declare class TypeLiteralTsDsl extends Mixed$7 {
|
|
8347
|
+
readonly '~dsl' = "TypeLiteralTsDsl";
|
|
8307
8348
|
protected value: string | number | boolean | null;
|
|
8308
8349
|
constructor(value: string | number | boolean | null);
|
|
8309
|
-
|
|
8350
|
+
analyze(ctx: AnalysisContext): void;
|
|
8351
|
+
toAst(): ts.LiteralTypeNode;
|
|
8310
8352
|
}
|
|
8311
8353
|
//#endregion
|
|
8312
8354
|
//#region src/ts-dsl/type/mapped.d.ts
|
|
8313
|
-
declare
|
|
8355
|
+
declare const Mixed$6: abstract new () => TypeTsDsl<ts.MappedTypeNode>;
|
|
8356
|
+
declare class TypeMappedTsDsl extends Mixed$6 {
|
|
8357
|
+
readonly '~dsl' = "TypeMappedTsDsl";
|
|
8314
8358
|
protected questionToken?: TokenTsDsl<ts.SyntaxKind.QuestionToken | ts.SyntaxKind.PlusToken | ts.SyntaxKind.MinusToken>;
|
|
8315
8359
|
protected readonlyToken?: TokenTsDsl<ts.SyntaxKind.ReadonlyKeyword | ts.SyntaxKind.MinusToken | ts.SyntaxKind.PlusToken>;
|
|
8316
8360
|
protected _key?: string | MaybeTsDsl<ts.TypeNode>;
|
|
8317
8361
|
protected _name?: string;
|
|
8318
8362
|
protected _type?: string | MaybeTsDsl<ts.TypeNode>;
|
|
8319
8363
|
constructor(name?: string);
|
|
8364
|
+
analyze(ctx: AnalysisContext): void;
|
|
8320
8365
|
/** Returns true when all required builder calls are present. */
|
|
8321
8366
|
get isValid(): boolean;
|
|
8322
8367
|
/** Sets the key constraint: `[K in Constraint]` */
|
|
@@ -8333,7 +8378,7 @@ declare class TypeMappedTsDsl extends TypeTsDsl<ts.MappedTypeNode> {
|
|
|
8333
8378
|
required(): this;
|
|
8334
8379
|
/** Sets the mapped value type: `[K in X]: ValueType` */
|
|
8335
8380
|
type(type: string | MaybeTsDsl<ts.TypeNode>): this;
|
|
8336
|
-
|
|
8381
|
+
toAst(): ts.MappedTypeNode;
|
|
8337
8382
|
$validate(): asserts this is this & {
|
|
8338
8383
|
_key: string | MaybeTsDsl<ts.TypeNode>;
|
|
8339
8384
|
_name: string;
|
|
@@ -8343,49 +8388,52 @@ declare class TypeMappedTsDsl extends TypeTsDsl<ts.MappedTypeNode> {
|
|
|
8343
8388
|
}
|
|
8344
8389
|
//#endregion
|
|
8345
8390
|
//#region src/ts-dsl/type/idx-sig.d.ts
|
|
8346
|
-
type
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
protected _key?:
|
|
8352
|
-
protected _name:
|
|
8353
|
-
protected _type?:
|
|
8354
|
-
constructor(name:
|
|
8391
|
+
type TypeIdxSigName = string;
|
|
8392
|
+
type TypeIdxSigType = string | MaybeTsDsl<ts.TypeNode>;
|
|
8393
|
+
declare const Mixed$5: MixinCtor<MixinCtor<abstract new () => TypeTsDsl<ts.IndexSignatureDeclaration>, ReadonlyMethods>, DocMethods>;
|
|
8394
|
+
declare class TypeIdxSigTsDsl extends Mixed$5 {
|
|
8395
|
+
readonly '~dsl' = "TypeIdxSigTsDsl";
|
|
8396
|
+
protected _key?: TypeIdxSigType;
|
|
8397
|
+
protected _name: TypeIdxSigName;
|
|
8398
|
+
protected _type?: TypeIdxSigType;
|
|
8399
|
+
constructor(name: TypeIdxSigName, fn?: (i: TypeIdxSigTsDsl) => void);
|
|
8400
|
+
analyze(ctx: AnalysisContext): void;
|
|
8355
8401
|
/** Returns true when all required builder calls are present. */
|
|
8356
8402
|
get isValid(): boolean;
|
|
8357
8403
|
/** Sets the key type: `[name: T]` */
|
|
8358
|
-
key(type:
|
|
8404
|
+
key(type: TypeIdxSigType): this;
|
|
8359
8405
|
/** Sets the property type. */
|
|
8360
|
-
type(type:
|
|
8361
|
-
|
|
8406
|
+
type(type: TypeIdxSigType): this;
|
|
8407
|
+
toAst(): ts.IndexSignatureDeclaration;
|
|
8362
8408
|
$validate(): asserts this is this & {
|
|
8363
|
-
_key:
|
|
8364
|
-
_name:
|
|
8365
|
-
_type:
|
|
8409
|
+
_key: TypeIdxSigType;
|
|
8410
|
+
_name: TypeIdxSigName;
|
|
8411
|
+
_type: TypeIdxSigType;
|
|
8366
8412
|
};
|
|
8367
8413
|
private missingRequiredCalls;
|
|
8368
8414
|
}
|
|
8369
|
-
interface TypeIdxSigTsDsl extends DocMixin, ReadonlyMixin {}
|
|
8370
8415
|
//#endregion
|
|
8371
8416
|
//#region src/ts-dsl/type/prop.d.ts
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
protected
|
|
8378
|
-
|
|
8417
|
+
type TypePropName = string;
|
|
8418
|
+
type TypePropType = Symbol | string | MaybeTsDsl<ts.TypeNode>;
|
|
8419
|
+
declare const Mixed$4: MixinCtor<MixinCtor<MixinCtor<abstract new () => TypeTsDsl<ts.TypeElement>, ReadonlyMethods>, OptionalMethods>, DocMethods>;
|
|
8420
|
+
declare class TypePropTsDsl extends Mixed$4 {
|
|
8421
|
+
readonly '~dsl' = "TypePropTsDsl";
|
|
8422
|
+
protected name: TypePropName;
|
|
8423
|
+
protected _type?: Ref<TypePropType>;
|
|
8424
|
+
constructor(name: TypePropName, fn: (p: TypePropTsDsl) => void);
|
|
8425
|
+
analyze(ctx: AnalysisContext): void;
|
|
8379
8426
|
/** Sets the property type. */
|
|
8380
|
-
type(type:
|
|
8381
|
-
|
|
8382
|
-
$render(): ts.TypeElement;
|
|
8427
|
+
type(type: TypePropType): this;
|
|
8428
|
+
toAst(): ts.PropertySignature;
|
|
8383
8429
|
}
|
|
8384
|
-
interface TypePropTsDsl extends DocMixin, OptionalMixin, ReadonlyMixin {}
|
|
8385
8430
|
//#endregion
|
|
8386
8431
|
//#region src/ts-dsl/type/object.d.ts
|
|
8387
|
-
declare
|
|
8432
|
+
declare const Mixed$3: abstract new () => TypeTsDsl<ts.TypeNode>;
|
|
8433
|
+
declare class TypeObjectTsDsl extends Mixed$3 {
|
|
8434
|
+
readonly '~dsl' = "TypeObjectTsDsl";
|
|
8388
8435
|
protected props: Array<TypePropTsDsl | TypeIdxSigTsDsl>;
|
|
8436
|
+
analyze(ctx: AnalysisContext): void;
|
|
8389
8437
|
/** Returns true if object has at least one property or spread. */
|
|
8390
8438
|
hasProps(): boolean;
|
|
8391
8439
|
/** Adds an index signature to the object type. */
|
|
@@ -8394,61 +8442,165 @@ declare class TypeObjectTsDsl extends TypeTsDsl<ts.TypeNode> {
|
|
|
8394
8442
|
get isEmpty(): boolean;
|
|
8395
8443
|
/** Adds a property signature (returns property builder). */
|
|
8396
8444
|
prop(name: string, fn: (p: TypePropTsDsl) => void): this;
|
|
8397
|
-
|
|
8445
|
+
toAst(): ts.TypeLiteralNode;
|
|
8398
8446
|
}
|
|
8399
8447
|
//#endregion
|
|
8400
8448
|
//#region src/ts-dsl/type/or.d.ts
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8449
|
+
type Type = Symbol | string | ts.TypeNode | TypeTsDsl;
|
|
8450
|
+
declare const Mixed$2: abstract new () => TypeTsDsl<ts.UnionTypeNode>;
|
|
8451
|
+
declare class TypeOrTsDsl extends Mixed$2 {
|
|
8452
|
+
readonly '~dsl' = "TypeOrTsDsl";
|
|
8453
|
+
protected _types: Array<Ref<Type>>;
|
|
8454
|
+
constructor(...nodes: Array<Type>);
|
|
8455
|
+
analyze(ctx: AnalysisContext): void;
|
|
8456
|
+
types(...nodes: Array<Type>): this;
|
|
8457
|
+
toAst(): ts.UnionTypeNode;
|
|
8406
8458
|
}
|
|
8407
8459
|
//#endregion
|
|
8408
8460
|
//#region src/ts-dsl/type/template.d.ts
|
|
8409
|
-
declare
|
|
8461
|
+
declare const Mixed$1: abstract new () => TypeTsDsl<ts.TemplateLiteralTypeNode>;
|
|
8462
|
+
declare class TypeTemplateTsDsl extends Mixed$1 {
|
|
8463
|
+
readonly '~dsl' = "TypeTemplateTsDsl";
|
|
8410
8464
|
protected parts: Array<string | MaybeTsDsl<ts.TypeNode>>;
|
|
8411
8465
|
constructor(value?: string | MaybeTsDsl<ts.TypeNode>);
|
|
8466
|
+
analyze(ctx: AnalysisContext): void;
|
|
8412
8467
|
/** Adds a raw string segment or embedded type expression. */
|
|
8413
8468
|
add(part: string | MaybeTsDsl<ts.TypeNode>): this;
|
|
8414
|
-
|
|
8415
|
-
$render(): ts.TemplateLiteralTypeNode;
|
|
8469
|
+
toAst(): ts.TemplateLiteralTypeNode;
|
|
8416
8470
|
}
|
|
8417
8471
|
//#endregion
|
|
8418
8472
|
//#region src/ts-dsl/type/tuple.d.ts
|
|
8419
|
-
declare
|
|
8473
|
+
declare const Mixed: abstract new () => TypeTsDsl<ts.TupleTypeNode>;
|
|
8474
|
+
declare class TypeTupleTsDsl extends Mixed {
|
|
8475
|
+
readonly '~dsl' = "TypeTupleTsDsl";
|
|
8420
8476
|
protected _elements: Array<string | ts.TypeNode | TypeTsDsl>;
|
|
8421
8477
|
constructor(...nodes: Array<string | ts.TypeNode | TypeTsDsl>);
|
|
8478
|
+
analyze(ctx: AnalysisContext): void;
|
|
8422
8479
|
elements(...types: Array<string | ts.TypeNode | TypeTsDsl>): this;
|
|
8423
|
-
|
|
8480
|
+
toAst(): ts.TupleTypeNode;
|
|
8481
|
+
}
|
|
8482
|
+
//#endregion
|
|
8483
|
+
//#region src/ts-dsl/render/typescript.d.ts
|
|
8484
|
+
declare class TypeScriptRenderer implements Renderer {
|
|
8485
|
+
/**
|
|
8486
|
+
* Whether `export * from 'module'` should be used when possible instead of named exports.
|
|
8487
|
+
*
|
|
8488
|
+
* @private
|
|
8489
|
+
*/
|
|
8490
|
+
private preferExportAll;
|
|
8491
|
+
/**
|
|
8492
|
+
* Controls whether imports/exports include a file extension (e.g., '.ts' or '.js').
|
|
8493
|
+
*
|
|
8494
|
+
* @private
|
|
8495
|
+
*/
|
|
8496
|
+
private preferFileExtension;
|
|
8497
|
+
/**
|
|
8498
|
+
* Optional function to transform module specifiers.
|
|
8499
|
+
*
|
|
8500
|
+
* @private
|
|
8501
|
+
*/
|
|
8502
|
+
private resolveModuleName?;
|
|
8503
|
+
constructor(args?: {
|
|
8504
|
+
preferExportAll?: boolean;
|
|
8505
|
+
preferFileExtension?: string;
|
|
8506
|
+
resolveModuleName?: (moduleName: string) => string | undefined;
|
|
8507
|
+
});
|
|
8508
|
+
render(ctx: RenderContext): string;
|
|
8509
|
+
supports(ctx: RenderContext): boolean;
|
|
8510
|
+
private getExports;
|
|
8511
|
+
private getImports;
|
|
8512
|
+
private renderExport;
|
|
8513
|
+
private renderImport;
|
|
8514
|
+
}
|
|
8515
|
+
//#endregion
|
|
8516
|
+
//#region src/ts-dsl/utils/keywords.d.ts
|
|
8517
|
+
declare const keywords: {
|
|
8518
|
+
browserGlobals: string[];
|
|
8519
|
+
javaScriptGlobals: string[];
|
|
8520
|
+
javaScriptKeywords: string[];
|
|
8521
|
+
nodeGlobals: string[];
|
|
8522
|
+
typeScriptKeywords: string[];
|
|
8523
|
+
};
|
|
8524
|
+
//#endregion
|
|
8525
|
+
//#region src/ts-dsl/utils/regexp.d.ts
|
|
8526
|
+
declare const regexp: {
|
|
8527
|
+
/**
|
|
8528
|
+
* Matches characters from the start as long as they're not allowed.
|
|
8529
|
+
*/
|
|
8530
|
+
illegalStartCharacters: RegExp;
|
|
8531
|
+
/**
|
|
8532
|
+
* Matches string if it contains only digits and optionally decimal point or
|
|
8533
|
+
* leading minus sign.
|
|
8534
|
+
*/
|
|
8535
|
+
number: RegExp;
|
|
8536
|
+
/**
|
|
8537
|
+
* Javascript identifier regexp pattern retrieved from
|
|
8538
|
+
* {@link} https://developer.mozilla.org/docs/Web/JavaScript/Reference/Lexical_grammar#identifiers
|
|
8539
|
+
*/
|
|
8540
|
+
typeScriptIdentifier: RegExp;
|
|
8541
|
+
};
|
|
8542
|
+
//#endregion
|
|
8543
|
+
//#region src/ts-dsl/utils/reserved.d.ts
|
|
8544
|
+
type List = ReadonlyArray<string>;
|
|
8545
|
+
declare class ReservedList {
|
|
8546
|
+
private _array;
|
|
8547
|
+
private _set;
|
|
8548
|
+
constructor(values: List);
|
|
8549
|
+
get '~values'(): Set<string>;
|
|
8550
|
+
/**
|
|
8551
|
+
* Updates the reserved list with new values.
|
|
8552
|
+
*
|
|
8553
|
+
* @param values New reserved values or a function that receives the previous
|
|
8554
|
+
* reserved values and returns the new ones.
|
|
8555
|
+
*/
|
|
8556
|
+
set(values: List | ((prev: List) => List)): void;
|
|
8424
8557
|
}
|
|
8558
|
+
/**
|
|
8559
|
+
* Reserved names for identifiers. These names will not be used
|
|
8560
|
+
* for variables, functions, classes, or other identifiers in generated code.
|
|
8561
|
+
*/
|
|
8562
|
+
declare const reserved: {
|
|
8563
|
+
/**
|
|
8564
|
+
* Reserved names for runtime identifiers. These names will not be used
|
|
8565
|
+
* for variables, functions, classes, or other runtime identifiers in
|
|
8566
|
+
* generated code.
|
|
8567
|
+
*/
|
|
8568
|
+
runtime: ReservedList;
|
|
8569
|
+
/**
|
|
8570
|
+
* Reserved names for type identifiers. These names will not be used
|
|
8571
|
+
* for type or interface identifiers in generated code.
|
|
8572
|
+
*/
|
|
8573
|
+
type: ReservedList;
|
|
8574
|
+
};
|
|
8425
8575
|
//#endregion
|
|
8426
8576
|
//#region src/ts-dsl/index.d.ts
|
|
8427
|
-
declare const $: ((id:
|
|
8577
|
+
declare const $: ((id: any) => ExprTsDsl) & {
|
|
8428
8578
|
/** Creates an array literal expression (e.g. `[1, 2, 3]`). */
|
|
8429
8579
|
array: (...args: ConstructorParameters<typeof ArrayTsDsl>) => ArrayTsDsl;
|
|
8430
8580
|
/** Creates an `as` type assertion expression (e.g. `value as Type`). */
|
|
8431
|
-
as: (expr:
|
|
8581
|
+
as: (expr: any, type: any) => AsTsDsl;
|
|
8432
8582
|
/** Creates a property access expression (e.g. `obj.foo`). */
|
|
8433
|
-
attr: (left:
|
|
8583
|
+
attr: (left: any, right: any) => AttrTsDsl;
|
|
8434
8584
|
/** Creates an await expression (e.g. `await promise`). */
|
|
8435
|
-
await: (expr:
|
|
8585
|
+
await: (expr: any) => AwaitTsDsl;
|
|
8436
8586
|
/** Creates a binary expression (e.g. `a + b`). */
|
|
8437
|
-
binary: (base:
|
|
8587
|
+
binary: (base: any, op?: (("!=" | "!==" | "&&" | "*" | "+" | "-" | "/" | "<" | "<=" | "=" | "==" | "===" | ">" | ">=" | "??" | "||") | typescript0.BinaryOperator) | undefined, expr?: any) => BinaryTsDsl;
|
|
8588
|
+
/** Creates a statement block (`{ ... }`). */
|
|
8589
|
+
block: (...args: ConstructorParameters<typeof BlockTsDsl>) => BlockTsDsl;
|
|
8438
8590
|
/** Creates a function or method call expression (e.g. `fn(arg)`). */
|
|
8439
|
-
call: (callee:
|
|
8591
|
+
call: (callee: CallCallee, ...args: any[]) => CallTsDsl;
|
|
8440
8592
|
/** Creates a class declaration or expression. */
|
|
8441
|
-
class: (name:
|
|
8593
|
+
class: (name: any) => ClassTsDsl;
|
|
8442
8594
|
/** Creates a constant variable declaration (`const`). */
|
|
8443
|
-
const: (name?:
|
|
8595
|
+
const: (name?: any) => VarTsDsl;
|
|
8444
8596
|
/** Creates a decorator expression (e.g. `@decorator`). */
|
|
8445
|
-
decorator: (name:
|
|
8597
|
+
decorator: (name: any, ...args: (string | typescript0.Expression | TsDsl<typescript0.Expression>)[]) => DecoratorTsDsl;
|
|
8446
8598
|
/** Creates a JSDoc documentation block. */
|
|
8447
8599
|
doc: (lines?: MaybeArray$1<string> | undefined, fn?: ((d: DocTsDsl) => void) | undefined) => DocTsDsl;
|
|
8448
8600
|
/** Creates an enum declaration. */
|
|
8449
|
-
enum: (name:
|
|
8601
|
+
enum: (name: any, fn?: ((e: EnumTsDsl) => void) | undefined) => EnumTsDsl;
|
|
8450
8602
|
/** Creates a general expression node. */
|
|
8451
|
-
expr: (id:
|
|
8603
|
+
expr: (id: any) => ExprTsDsl;
|
|
8452
8604
|
/** Creates a field declaration in a class or object. */
|
|
8453
8605
|
field: (name: string, fn?: ((f: FieldTsDsl) => void) | undefined) => FieldTsDsl;
|
|
8454
8606
|
/** Converts a runtime value into a corresponding expression node. */
|
|
@@ -8464,17 +8616,17 @@ declare const $: ((id: string | typescript0.Expression | TsDsl<typescript0.Expre
|
|
|
8464
8616
|
(name?: string, fn?: (f: FuncTsDsl<"decl">) => void): FuncTsDsl<"arrow"> | FuncTsDsl<"decl">;
|
|
8465
8617
|
};
|
|
8466
8618
|
/** Creates a getter method declaration. */
|
|
8467
|
-
getter: (name:
|
|
8619
|
+
getter: (name: GetterName, fn?: ((g: GetterTsDsl) => void) | undefined) => GetterTsDsl;
|
|
8468
8620
|
/** Creates a single-line comment (//). */
|
|
8469
8621
|
hint: (lines?: MaybeArray$1<string> | undefined, fn?: ((d: HintTsDsl) => void) | undefined) => HintTsDsl;
|
|
8470
8622
|
/** Creates an identifier (e.g. `foo`). */
|
|
8471
8623
|
id: (name: string) => IdTsDsl;
|
|
8472
8624
|
/** Creates an if statement. */
|
|
8473
|
-
if: (condition?:
|
|
8625
|
+
if: (condition?: IfCondition | undefined) => IfTsDsl;
|
|
8474
8626
|
/** Creates an initialization block or statement. */
|
|
8475
8627
|
init: (fn?: ((i: InitTsDsl) => void) | undefined) => InitTsDsl;
|
|
8476
8628
|
/** Creates a let variable declaration (`let`). */
|
|
8477
|
-
let: (name?:
|
|
8629
|
+
let: (name?: any) => VarTsDsl;
|
|
8478
8630
|
/** Creates a literal value (e.g. string, number, boolean). */
|
|
8479
8631
|
literal: (value: string | number | boolean | null) => LiteralTsDsl;
|
|
8480
8632
|
/** Creates an enum member declaration. */
|
|
@@ -8484,7 +8636,7 @@ declare const $: ((id: string | typescript0.Expression | TsDsl<typescript0.Expre
|
|
|
8484
8636
|
/** Creates a negation expression (`-x`). */
|
|
8485
8637
|
neg: (expr?: string | typescript0.Expression | TsDsl<typescript0.Expression> | undefined, op?: typescript0.PrefixUnaryOperator | undefined) => PrefixTsDsl;
|
|
8486
8638
|
/** Creates a new expression (e.g. `new ClassName()`). */
|
|
8487
|
-
new: (classExpr:
|
|
8639
|
+
new: (classExpr: any, ...args: any[]) => NewTsDsl;
|
|
8488
8640
|
/** Creates a newline (for formatting purposes). */
|
|
8489
8641
|
newline: () => NewlineTsDsl;
|
|
8490
8642
|
/** Creates a logical NOT expression (`!x`). */
|
|
@@ -8494,7 +8646,7 @@ declare const $: ((id: string | typescript0.Expression | TsDsl<typescript0.Expre
|
|
|
8494
8646
|
/** Creates an object literal expression. */
|
|
8495
8647
|
object: (...args: ConstructorParameters<typeof ObjectTsDsl>) => ObjectTsDsl;
|
|
8496
8648
|
/** Creates a parameter declaration for functions or methods. */
|
|
8497
|
-
param: (name:
|
|
8649
|
+
param: (name: any, fn?: ((p: ParamTsDsl) => void) | undefined) => ParamTsDsl;
|
|
8498
8650
|
/** Creates a pattern for destructuring or matching. */
|
|
8499
8651
|
pattern: () => PatternTsDsl;
|
|
8500
8652
|
/** Creates a prefix unary expression (e.g. `-x`, `!x`, `~x`). */
|
|
@@ -8519,33 +8671,35 @@ declare const $: ((id: string | typescript0.Expression | TsDsl<typescript0.Expre
|
|
|
8519
8671
|
/** Creates a regular expression literal (e.g. `/foo/gi`). */
|
|
8520
8672
|
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;
|
|
8521
8673
|
/** Creates a return statement. */
|
|
8522
|
-
return: (expr?:
|
|
8674
|
+
return: (expr?: any) => ReturnTsDsl;
|
|
8523
8675
|
/** Creates a setter method declaration. */
|
|
8524
|
-
setter: (name:
|
|
8676
|
+
setter: (name: SetterName, fn?: ((s: SetterTsDsl) => void) | undefined) => SetterTsDsl;
|
|
8525
8677
|
/** Wraps an expression or statement-like value into a `StmtTsDsl`. */
|
|
8526
8678
|
stmt: (inner: typescript0.Expression | typescript0.Statement | TsDsl<any>) => StmtTsDsl;
|
|
8527
8679
|
/** Creates a template literal expression. */
|
|
8528
|
-
template: (value?:
|
|
8680
|
+
template: (value?: any) => TemplateTsDsl;
|
|
8529
8681
|
/** Creates a ternary conditional expression (if ? then : else). */
|
|
8530
8682
|
ternary: (condition?: string | typescript0.Expression | TsDsl<typescript0.Expression> | undefined) => TernaryTsDsl;
|
|
8531
8683
|
/** Creates a throw statement. */
|
|
8532
8684
|
throw: (error: string | typescript0.Expression | TsDsl<typescript0.Expression>, useNew?: boolean | undefined) => ThrowTsDsl;
|
|
8533
8685
|
/** Creates a syntax token (e.g. `?`, `readonly`, `+`, `-`). */
|
|
8534
8686
|
token: () => TokenTsDsl<never>;
|
|
8687
|
+
/** Creates a try/catch/finally statement. */
|
|
8688
|
+
try: (...args: ConstructorParameters<typeof TryTsDsl>) => TryTsDsl;
|
|
8535
8689
|
/** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */
|
|
8536
|
-
type: ((name:
|
|
8690
|
+
type: ((name: any, fn?: ((t: TypeExprTsDsl) => void) | undefined) => TypeExprTsDsl) & {
|
|
8537
8691
|
/** Creates a type alias declaration (e.g. `type Foo = Bar`). */
|
|
8538
|
-
alias: (name:
|
|
8692
|
+
alias: (name: any, fn?: ((t: TypeAliasTsDsl) => void) | undefined) => TypeAliasTsDsl;
|
|
8539
8693
|
/** Creates an intersection type (e.g. `A & B`). */
|
|
8540
8694
|
and: (...args: ConstructorParameters<typeof TypeAndTsDsl>) => TypeAndTsDsl;
|
|
8541
8695
|
/** Creates a qualified type reference (e.g. Foo.Bar). */
|
|
8542
|
-
attr: (right:
|
|
8696
|
+
attr: (right: any) => TypeAttrTsDsl;
|
|
8543
8697
|
/** Creates a basic type reference or type expression (e.g. Foo or Foo<T>). */
|
|
8544
|
-
expr: (name:
|
|
8698
|
+
expr: (name: any, fn?: ((t: TypeExprTsDsl) => void) | undefined) => TypeExprTsDsl;
|
|
8545
8699
|
/** Converts a runtime value into a corresponding type expression node. */
|
|
8546
8700
|
fromValue: (input: unknown) => TsDsl<typescript0.TypeNode>;
|
|
8547
8701
|
/** Creates a function type node (e.g. `(a: string) => number`). */
|
|
8548
|
-
func: () => TypeFuncTsDsl;
|
|
8702
|
+
func: (...args: ConstructorParameters<typeof TypeFuncTsDsl>) => TypeFuncTsDsl;
|
|
8549
8703
|
/** Creates an indexed-access type (e.g. `Foo<T>[K]`). */
|
|
8550
8704
|
idx: (base: string | typescript0.TypeNode | TsDsl<typescript0.TypeNode>, index: string | number | typescript0.TypeNode | TsDsl<typescript0.TypeNode>) => TypeIdxTsDsl;
|
|
8551
8705
|
/** Creates a literal type node (e.g. 'foo', 42, or true). */
|
|
@@ -8559,7 +8713,7 @@ declare const $: ((id: string | typescript0.Expression | TsDsl<typescript0.Expre
|
|
|
8559
8713
|
/** Represents a union type (e.g. `A | B | C`). */
|
|
8560
8714
|
or: (...args: ConstructorParameters<typeof TypeOrTsDsl>) => TypeOrTsDsl;
|
|
8561
8715
|
/** Creates a type parameter (e.g. `<T>`). */
|
|
8562
|
-
param: (name?:
|
|
8716
|
+
param: (name?: any, fn?: ((name: TypeParamTsDsl) => void) | undefined) => TypeParamTsDsl;
|
|
8563
8717
|
/** Creates a type query node (e.g. `typeof Foo`). */
|
|
8564
8718
|
query: (expr: string | MaybeTsDsl<typescript0.Expression | TypeTsDsl<typescript0.TypeNode>>) => TypeQueryTsDsl;
|
|
8565
8719
|
/** Builds a TypeScript template literal *type* (e.g. `${Foo}-${Bar}` as a type). */
|
|
@@ -8570,7 +8724,7 @@ declare const $: ((id: string | typescript0.Expression | TsDsl<typescript0.Expre
|
|
|
8570
8724
|
/** Creates a runtime `typeof` expression (e.g. typeof x). */
|
|
8571
8725
|
typeofExpr: (expr: string | typescript0.Expression | TsDsl<typescript0.Expression>) => TypeOfExprTsDsl;
|
|
8572
8726
|
/** Creates a variable declaration (var). */
|
|
8573
|
-
var: (name?:
|
|
8727
|
+
var: (name?: any) => VarTsDsl;
|
|
8574
8728
|
};
|
|
8575
8729
|
type DollarTsDsl = {
|
|
8576
8730
|
/**
|
|
@@ -8676,7 +8830,7 @@ type HeyApiTransformersPlugin = DefinePlugin<UserConfig$13, Config$12>;
|
|
|
8676
8830
|
//#region src/plugins/@hey-api/typescript/shared/types.d.ts
|
|
8677
8831
|
type IrSchemaToAstOptions = {
|
|
8678
8832
|
plugin: HeyApiTypeScriptPlugin['Instance'];
|
|
8679
|
-
state:
|
|
8833
|
+
state: Refs<PluginState>;
|
|
8680
8834
|
};
|
|
8681
8835
|
type PluginState = Pick<Required<SymbolMeta>, 'path'> & Pick<Partial<SymbolMeta>, 'tags'>;
|
|
8682
8836
|
//#endregion
|
|
@@ -14853,6 +15007,8 @@ declare class PluginInstance<T extends Plugin.Types = Plugin.Types> {
|
|
|
14853
15007
|
gen: IProject;
|
|
14854
15008
|
name: string;
|
|
14855
15009
|
});
|
|
15010
|
+
addNode(node: Node | null): number;
|
|
15011
|
+
updateNode(index: number, node: Node | null): void;
|
|
14856
15012
|
/**
|
|
14857
15013
|
* Iterates over various input elements as specified by the event types, in
|
|
14858
15014
|
* a specific order: servers, schemas, parameters, request bodies, then
|
|
@@ -14905,12 +15061,15 @@ declare class PluginInstance<T extends Plugin.Types = Plugin.Types> {
|
|
|
14905
15061
|
isSymbolRegistered(identifier: SymbolIdentifier): boolean;
|
|
14906
15062
|
querySymbol(filter: SymbolMeta): Symbol | undefined;
|
|
14907
15063
|
referenceSymbol(meta: SymbolMeta): Symbol;
|
|
15064
|
+
/**
|
|
15065
|
+
* @deprecated use `plugin.symbol()` instead
|
|
15066
|
+
*/
|
|
14908
15067
|
registerSymbol(symbol: SymbolIn): Symbol;
|
|
14909
15068
|
/**
|
|
14910
15069
|
* Executes plugin's handler function.
|
|
14911
15070
|
*/
|
|
14912
15071
|
run(): Promise<void>;
|
|
14913
|
-
|
|
15072
|
+
symbol(name: SymbolIn['name'], symbol?: Omit<SymbolIn, 'name'>): Symbol;
|
|
14914
15073
|
private buildEventHooks;
|
|
14915
15074
|
private forEachError;
|
|
14916
15075
|
private getSymbolFilePath;
|
|
@@ -14923,6 +15082,34 @@ type Hooks = {
|
|
|
14923
15082
|
* Event hooks.
|
|
14924
15083
|
*/
|
|
14925
15084
|
events?: {
|
|
15085
|
+
/**
|
|
15086
|
+
* Triggered after adding or updating a node.
|
|
15087
|
+
*
|
|
15088
|
+
* You can use this to perform actions after a node is added or updated.
|
|
15089
|
+
*
|
|
15090
|
+
* @param args Arguments object.
|
|
15091
|
+
* @returns void
|
|
15092
|
+
*/
|
|
15093
|
+
'node:set:after'?: (args: {
|
|
15094
|
+
/** The node added or updated. */
|
|
15095
|
+
node: Node | null;
|
|
15096
|
+
/** Plugin that added or updated the node. */
|
|
15097
|
+
plugin: PluginInstance;
|
|
15098
|
+
}) => void;
|
|
15099
|
+
/**
|
|
15100
|
+
* Triggered before adding or updating a node.
|
|
15101
|
+
*
|
|
15102
|
+
* You can use this to modify the node before it's added or updated.
|
|
15103
|
+
*
|
|
15104
|
+
* @param args Arguments object.
|
|
15105
|
+
* @returns void
|
|
15106
|
+
*/
|
|
15107
|
+
'node:set:before'?: (args: {
|
|
15108
|
+
/** The node to be added or updated. */
|
|
15109
|
+
node: Node | null;
|
|
15110
|
+
/** Plugin adding or updating the node. */
|
|
15111
|
+
plugin: PluginInstance;
|
|
15112
|
+
}) => void;
|
|
14926
15113
|
/**
|
|
14927
15114
|
* Triggered after executing a plugin handler.
|
|
14928
15115
|
*
|
|
@@ -14971,38 +15158,6 @@ type Hooks = {
|
|
|
14971
15158
|
/** Symbol to register. */
|
|
14972
15159
|
symbol: SymbolIn;
|
|
14973
15160
|
}) => void;
|
|
14974
|
-
/**
|
|
14975
|
-
* Triggered after setting a symbol value.
|
|
14976
|
-
*
|
|
14977
|
-
* You can use this to perform actions after a symbol's value is set.
|
|
14978
|
-
*
|
|
14979
|
-
* @param args Arguments object.
|
|
14980
|
-
* @returns void
|
|
14981
|
-
*/
|
|
14982
|
-
'symbol:setValue:after'?: (args: {
|
|
14983
|
-
/** Plugin that set the symbol value. */
|
|
14984
|
-
plugin: PluginInstance;
|
|
14985
|
-
/** The symbol. */
|
|
14986
|
-
symbol: Symbol;
|
|
14987
|
-
/** The value that was set. */
|
|
14988
|
-
value: unknown;
|
|
14989
|
-
}) => void;
|
|
14990
|
-
/**
|
|
14991
|
-
* Triggered before setting a symbol value.
|
|
14992
|
-
*
|
|
14993
|
-
* You can use this to modify the value before it's set.
|
|
14994
|
-
*
|
|
14995
|
-
* @param args Arguments object.
|
|
14996
|
-
* @returns void
|
|
14997
|
-
*/
|
|
14998
|
-
'symbol:setValue:before'?: (args: {
|
|
14999
|
-
/** Plugin setting the symbol value. */
|
|
15000
|
-
plugin: PluginInstance;
|
|
15001
|
-
/** The symbol. */
|
|
15002
|
-
symbol: Symbol;
|
|
15003
|
-
/** The value to set. */
|
|
15004
|
-
value: unknown;
|
|
15005
|
-
}) => void;
|
|
15006
15161
|
};
|
|
15007
15162
|
/**
|
|
15008
15163
|
* Hooks specifically for overriding operations behavior.
|
|
@@ -15164,8 +15319,8 @@ declare namespace Plugin {
|
|
|
15164
15319
|
* Generic wrapper for plugin hooks.
|
|
15165
15320
|
*/
|
|
15166
15321
|
export type Hooks = Pick<BaseConfig, '~hooks'>;
|
|
15167
|
-
export interface Name<Name extends PluginNames> {
|
|
15168
|
-
name: Name;
|
|
15322
|
+
export interface Name<Name$2 extends PluginNames> {
|
|
15323
|
+
name: Name$2;
|
|
15169
15324
|
}
|
|
15170
15325
|
|
|
15171
15326
|
/**
|
|
@@ -15502,10 +15657,28 @@ type UserOutput = {
|
|
|
15502
15657
|
* @default null
|
|
15503
15658
|
*/
|
|
15504
15659
|
lint?: Linters | null;
|
|
15660
|
+
/**
|
|
15661
|
+
* Optional name conflict resolver to customize how naming conflicts
|
|
15662
|
+
* are handled.
|
|
15663
|
+
*/
|
|
15664
|
+
nameConflictResolver?: NameConflictResolver;
|
|
15505
15665
|
/**
|
|
15506
15666
|
* The absolute path to the output folder.
|
|
15507
15667
|
*/
|
|
15508
15668
|
path: string;
|
|
15669
|
+
/**
|
|
15670
|
+
* Whether `export * from 'module'` should be used when possible
|
|
15671
|
+
* instead of named exports.
|
|
15672
|
+
*
|
|
15673
|
+
* @default false
|
|
15674
|
+
*/
|
|
15675
|
+
preferExportAll?: boolean;
|
|
15676
|
+
/**
|
|
15677
|
+
* Optional function to transform module specifiers.
|
|
15678
|
+
*
|
|
15679
|
+
* @default undefined
|
|
15680
|
+
*/
|
|
15681
|
+
resolveModuleName?: (moduleName: string) => string | undefined;
|
|
15509
15682
|
/**
|
|
15510
15683
|
* Relative or absolute path to the tsconfig file we should use to
|
|
15511
15684
|
* generate the output. If a path to tsconfig file is not provided, we
|
|
@@ -15520,17 +15693,13 @@ type Output = {
|
|
|
15520
15693
|
/**
|
|
15521
15694
|
* Defines casing of the output fields. By default, we preserve `input`
|
|
15522
15695
|
* values as data transforms incur a performance penalty at runtime.
|
|
15523
|
-
*
|
|
15524
|
-
* @default undefined
|
|
15525
15696
|
*/
|
|
15526
|
-
case
|
|
15697
|
+
case: StringCase | undefined;
|
|
15527
15698
|
/**
|
|
15528
15699
|
* Clean the `output` folder on every run? If disabled, this folder may
|
|
15529
15700
|
* be used to store additional files. The default option is `true` to
|
|
15530
15701
|
* reduce the risk of keeping outdated files around when configuration,
|
|
15531
15702
|
* input, or package version changes.
|
|
15532
|
-
*
|
|
15533
|
-
* @default true
|
|
15534
15703
|
*/
|
|
15535
15704
|
clean: boolean;
|
|
15536
15705
|
/**
|
|
@@ -15542,21 +15711,16 @@ type Output = {
|
|
|
15542
15711
|
fileName: {
|
|
15543
15712
|
/**
|
|
15544
15713
|
* The casing convention to use for generated file names.
|
|
15545
|
-
*
|
|
15546
|
-
* @default 'preserve'
|
|
15547
15714
|
*/
|
|
15548
15715
|
case: StringCase;
|
|
15549
15716
|
/**
|
|
15550
15717
|
* Custom naming pattern for generated file names.
|
|
15551
|
-
*
|
|
15552
|
-
* @default '{{name}}'
|
|
15553
15718
|
*/
|
|
15554
15719
|
name: StringName;
|
|
15555
15720
|
/**
|
|
15556
15721
|
* Suffix to append to file names (before the extension). For example,
|
|
15557
15722
|
* with a suffix of `.gen`, `example.ts` becomes `example.gen.ts`.
|
|
15558
15723
|
*
|
|
15559
|
-
* @default '.gen'
|
|
15560
15724
|
* @example
|
|
15561
15725
|
* // Given a suffix of `.gen`
|
|
15562
15726
|
* 'index.ts' -> 'index.ts' (index files are not renamed)
|
|
@@ -15567,8 +15731,6 @@ type Output = {
|
|
|
15567
15731
|
};
|
|
15568
15732
|
/**
|
|
15569
15733
|
* Which formatter to use to process output folder?
|
|
15570
|
-
*
|
|
15571
|
-
* @default null
|
|
15572
15734
|
*/
|
|
15573
15735
|
format: Formatters | null;
|
|
15574
15736
|
/**
|
|
@@ -15576,28 +15738,36 @@ type Output = {
|
|
|
15576
15738
|
* other modules. By default, we don't add a file extension and let the
|
|
15577
15739
|
* runtime resolve it. If you're using moduleResolution `nodenext`, we
|
|
15578
15740
|
* default to `.js`.
|
|
15579
|
-
*
|
|
15580
|
-
* @default undefined
|
|
15581
15741
|
*/
|
|
15582
15742
|
importFileExtension: ImportFileExtensions | (string & {}) | null | undefined;
|
|
15583
15743
|
/**
|
|
15584
15744
|
* Should the exports from plugin files be re-exported in the index
|
|
15585
15745
|
* barrel file? By default, this is enabled and only default plugins
|
|
15586
15746
|
* are re-exported.
|
|
15587
|
-
*
|
|
15588
|
-
* @default true
|
|
15589
15747
|
*/
|
|
15590
15748
|
indexFile: boolean;
|
|
15591
15749
|
/**
|
|
15592
15750
|
* Which linter to use to process output folder?
|
|
15593
|
-
*
|
|
15594
|
-
* @default null
|
|
15595
15751
|
*/
|
|
15596
15752
|
lint: Linters | null;
|
|
15753
|
+
/**
|
|
15754
|
+
* Optional name conflict resolver to customize how naming conflicts
|
|
15755
|
+
* are handled.
|
|
15756
|
+
*/
|
|
15757
|
+
nameConflictResolver: NameConflictResolver | undefined;
|
|
15597
15758
|
/**
|
|
15598
15759
|
* The absolute path to the output folder.
|
|
15599
15760
|
*/
|
|
15600
15761
|
path: string;
|
|
15762
|
+
/**
|
|
15763
|
+
* Whether `export * from 'module'` should be used when possible
|
|
15764
|
+
* instead of named exports.
|
|
15765
|
+
*/
|
|
15766
|
+
preferExportAll: boolean;
|
|
15767
|
+
/**
|
|
15768
|
+
* Optional function to transform module specifiers.
|
|
15769
|
+
*/
|
|
15770
|
+
resolveModuleName: ((moduleName: string) => string | undefined) | undefined;
|
|
15601
15771
|
/**
|
|
15602
15772
|
* The parsed TypeScript configuration used to generate the output.
|
|
15603
15773
|
* If no `tsconfig` file path was provided or found, this will be `null`.
|
|
@@ -15608,8 +15778,6 @@ type Output = {
|
|
|
15608
15778
|
* generate the output. If a path to tsconfig file is not provided, we
|
|
15609
15779
|
* attempt to find one starting from the location of the
|
|
15610
15780
|
* `@hey-api/openapi-ts` configuration file and traversing up.
|
|
15611
|
-
*
|
|
15612
|
-
* @default undefined
|
|
15613
15781
|
*/
|
|
15614
15782
|
tsConfigPath: (string & {}) | null | undefined;
|
|
15615
15783
|
};
|
|
@@ -16255,5 +16423,5 @@ type Config = Omit<Required<UserConfig>, 'input' | 'logs' | 'output' | 'parser'
|
|
|
16255
16423
|
plugins: { [K in PluginNames]?: Plugin.Config<PluginConfigMap[K]> };
|
|
16256
16424
|
};
|
|
16257
16425
|
//#endregion
|
|
16258
|
-
export {
|
|
16259
|
-
//# sourceMappingURL=config-
|
|
16426
|
+
export { Client$4 as A, MaybeTsDsl as C, PluginHandler as D, Client as E, IR$1 as F, LazyOrAsync as I, MaybeArray as L, Client$6 as M, Client$7 as N, Client$2 as O, StringCase as P, TypeScriptRenderer as S, TypeTsDsl as T, $ as _, Plugin as a, regexp as b, OpenApiOperationObject as c, OpenApiResponseObject as d, OpenApiSchemaObject as f, ExpressionTransformer as g, TypeTransformer as h, DefinePlugin as i, Client$5 as j, Client$3 as k, OpenApiParameterObject as l, Logger as m, UserConfig as n, OpenApi as o, Context as p, Input as r, OpenApiMetaObject as s, Config as t, OpenApiRequestBodyObject as u, DollarTsDsl as v, TsDsl as w, keywords as x, reserved as y };
|
|
16427
|
+
//# sourceMappingURL=config-uoaRJc6A.d.mts.map
|