@powerlines/plugin-typedoc 0.1.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.
@@ -0,0 +1,2908 @@
1
+ import { PluginItem, PluginObj, PluginPass, transformAsync } from '@babel/core';
2
+ import { Format } from '@storm-software/build-tools/types';
3
+ import { LogLevelLabel } from '@storm-software/config-tools/types';
4
+ import { StormWorkspaceConfig } from '@storm-software/config/types';
5
+ import { TypeDefinition, TypeDefinitionParameter } from '@stryke/types/configuration';
6
+ import { AssetGlob } from '@stryke/types/file';
7
+ import { ResolvedPreviewOptions, PreviewOptions } from 'vite';
8
+ import { BabelAPI } from '@babel/helper-plugin-utils';
9
+ import { EnvPaths } from '@stryke/env/get-env-paths';
10
+ import { PackageJson } from '@stryke/types/package-json';
11
+ import { Jiti } from 'jiti';
12
+ import { ReflectionClass } from '@deepkit/type';
13
+ import { TransformResult, ExternalIdResult, HookFilter, UnpluginOptions, UnpluginContext, UnpluginBuildContext } from 'unplugin';
14
+ import * as $ from '@stryke/capnp';
15
+ import { NonUndefined, MaybePromise, FunctionLike } from '@stryke/types/base';
16
+ import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
17
+ import ts from 'typescript';
18
+ import { Range } from 'semver';
19
+ import { ArrayValues } from '@stryke/types/array';
20
+ import { Volume } from 'memfs';
21
+ import { StatSyncOptions, Stats, PathLike, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
22
+ import { IUnionFs } from 'unionfs';
23
+ import { ProjectReflection, TypeDocOptions, Application } from 'typedoc';
24
+
25
+ declare const ReflectionKind: {
26
+ readonly NEVER: 0;
27
+ readonly ANY: 1;
28
+ readonly UNKNOWN: 2;
29
+ readonly VOID: 3;
30
+ readonly OBJECT: 4;
31
+ readonly STRING: 5;
32
+ readonly NUMBER: 6;
33
+ readonly BOOLEAN: 7;
34
+ readonly SYMBOL: 8;
35
+ readonly BIGINT: 9;
36
+ readonly NULL: 10;
37
+ readonly UNDEFINED: 11;
38
+ readonly REGEXP: 12;
39
+ readonly LITERAL: 13;
40
+ readonly TEMPLATE_LITERAL: 14;
41
+ readonly PROPERTY: 15;
42
+ readonly METHOD: 16;
43
+ readonly FUNCTION: 17;
44
+ readonly PARAMETER: 18;
45
+ readonly PROMISE: 19;
46
+ readonly CLASS: 20;
47
+ readonly TYPE_PARAMETER: 21;
48
+ readonly ENUM: 22;
49
+ readonly UNION: 23;
50
+ readonly INTERSECTION: 24;
51
+ readonly ARRAY: 25;
52
+ readonly TUPLE: 26;
53
+ readonly TUPLE_MEMBER: 27;
54
+ readonly ENUM_MEMBER: 28;
55
+ readonly REST: 29;
56
+ readonly OBJECT_LITERAL: 30;
57
+ readonly INDEX_SIGNATURE: 31;
58
+ readonly PROPERTY_SIGNATURE: 32;
59
+ readonly METHOD_SIGNATURE: 33;
60
+ readonly INFER: 34;
61
+ readonly CALL_SIGNATURE: 35;
62
+ };
63
+ type ReflectionKind = (typeof ReflectionKind)[keyof typeof ReflectionKind];
64
+ declare const ReflectionVisibility: {
65
+ readonly PUBLIC: 0;
66
+ readonly PROTECTED: 1;
67
+ readonly PRIVATE: 2;
68
+ };
69
+ type ReflectionVisibility = (typeof ReflectionVisibility)[keyof typeof ReflectionVisibility];
70
+ declare class TagsReflection extends $.Struct {
71
+ static readonly _capnp: {
72
+ displayName: string;
73
+ id: string;
74
+ size: $.ObjectSize;
75
+ };
76
+ _adoptAlias(value: $.Orphan<$.List<string>>): void;
77
+ _disownAlias(): $.Orphan<$.List<string>>;
78
+ get alias(): $.List<string>;
79
+ _hasAlias(): boolean;
80
+ _initAlias(length: number): $.List<string>;
81
+ set alias(value: $.List<string>);
82
+ get title(): string;
83
+ set title(value: string);
84
+ get hidden(): boolean;
85
+ set hidden(value: boolean);
86
+ get readonly(): boolean;
87
+ set readonly(value: boolean);
88
+ get ignore(): boolean;
89
+ set ignore(value: boolean);
90
+ get internal(): boolean;
91
+ set internal(value: boolean);
92
+ _adoptPermission(value: $.Orphan<$.List<string>>): void;
93
+ _disownPermission(): $.Orphan<$.List<string>>;
94
+ get permission(): $.List<string>;
95
+ _hasPermission(): boolean;
96
+ _initPermission(length: number): $.List<string>;
97
+ set permission(value: $.List<string>);
98
+ get domain(): string;
99
+ set domain(value: string);
100
+ toString(): string;
101
+ }
102
+ declare const DefaultValueReflection_Value_Which: {
103
+ readonly UNDEFINED: 0;
104
+ readonly BOOLEAN: 1;
105
+ readonly INTEGER: 2;
106
+ readonly FLOAT: 3;
107
+ readonly STRING: 4;
108
+ };
109
+ type DefaultValueReflection_Value_Which = (typeof DefaultValueReflection_Value_Which)[keyof typeof DefaultValueReflection_Value_Which];
110
+ declare class DefaultValueReflection_Value extends $.Struct {
111
+ static readonly UNDEFINED: 0;
112
+ static readonly BOOLEAN: 1;
113
+ static readonly INTEGER: 2;
114
+ static readonly FLOAT: 3;
115
+ static readonly STRING: 4;
116
+ static readonly _capnp: {
117
+ displayName: string;
118
+ id: string;
119
+ size: $.ObjectSize;
120
+ };
121
+ get _isUndefined(): boolean;
122
+ set undefined(_: true);
123
+ get boolean(): boolean;
124
+ get _isBoolean(): boolean;
125
+ set boolean(value: boolean);
126
+ get integer(): number;
127
+ get _isInteger(): boolean;
128
+ set integer(value: number);
129
+ get float(): number;
130
+ get _isFloat(): boolean;
131
+ set float(value: number);
132
+ get string(): string;
133
+ get _isString(): boolean;
134
+ set string(value: string);
135
+ toString(): string;
136
+ which(): DefaultValueReflection_Value_Which;
137
+ }
138
+ declare class DefaultValueReflection extends $.Struct {
139
+ static readonly _capnp: {
140
+ displayName: string;
141
+ id: string;
142
+ size: $.ObjectSize;
143
+ };
144
+ get value(): DefaultValueReflection_Value;
145
+ _initValue(): DefaultValueReflection_Value;
146
+ toString(): string;
147
+ }
148
+ declare class SerializedTypeReference extends $.Struct {
149
+ static readonly _capnp: {
150
+ displayName: string;
151
+ id: string;
152
+ size: $.ObjectSize;
153
+ };
154
+ get id(): number;
155
+ set id(value: number);
156
+ toString(): string;
157
+ }
158
+ declare class IndexAccessOrigin extends $.Struct {
159
+ static readonly _capnp: {
160
+ displayName: string;
161
+ id: string;
162
+ size: $.ObjectSize;
163
+ };
164
+ _adoptContainer(value: $.Orphan<SerializedTypeReference>): void;
165
+ _disownContainer(): $.Orphan<SerializedTypeReference>;
166
+ get container(): SerializedTypeReference;
167
+ _hasContainer(): boolean;
168
+ _initContainer(): SerializedTypeReference;
169
+ set container(value: SerializedTypeReference);
170
+ _adoptIndex(value: $.Orphan<SerializedTypeReference>): void;
171
+ _disownIndex(): $.Orphan<SerializedTypeReference>;
172
+ get index(): SerializedTypeReference;
173
+ _hasIndex(): boolean;
174
+ _initIndex(): SerializedTypeReference;
175
+ set index(value: SerializedTypeReference);
176
+ toString(): string;
177
+ }
178
+ declare class SerializedTypeObjectLiteral extends $.Struct {
179
+ static readonly _capnp: {
180
+ displayName: string;
181
+ id: string;
182
+ size: $.ObjectSize;
183
+ };
184
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
185
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
186
+ static _Types: $.ListCtor<SerializedTypeReference>;
187
+ get typeName(): string;
188
+ set typeName(value: string);
189
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
190
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
191
+ get typeArguments(): $.List<SerializedTypeReference>;
192
+ _hasTypeArguments(): boolean;
193
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
194
+ set typeArguments(value: $.List<SerializedTypeReference>);
195
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
196
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
197
+ get indexAccessOrigin(): IndexAccessOrigin;
198
+ _hasIndexAccessOrigin(): boolean;
199
+ _initIndexAccessOrigin(): IndexAccessOrigin;
200
+ set indexAccessOrigin(value: IndexAccessOrigin);
201
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
202
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
203
+ get decorators(): $.List<SerializedTypeReference>;
204
+ _hasDecorators(): boolean;
205
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
206
+ set decorators(value: $.List<SerializedTypeReference>);
207
+ get kind(): ReflectionKind;
208
+ set kind(value: ReflectionKind);
209
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeReference>>): void;
210
+ _disownTypes(): $.Orphan<$.List<SerializedTypeReference>>;
211
+ get types(): $.List<SerializedTypeReference>;
212
+ _hasTypes(): boolean;
213
+ _initTypes(length: number): $.List<SerializedTypeReference>;
214
+ set types(value: $.List<SerializedTypeReference>);
215
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
216
+ _disownTags(): $.Orphan<TagsReflection>;
217
+ get tags(): TagsReflection;
218
+ _hasTags(): boolean;
219
+ _initTags(): TagsReflection;
220
+ set tags(value: TagsReflection);
221
+ toString(): string;
222
+ }
223
+ declare class SerializedTypeClassType extends $.Struct {
224
+ static readonly _capnp: {
225
+ displayName: string;
226
+ id: string;
227
+ size: $.ObjectSize;
228
+ };
229
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
230
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
231
+ static _ExtendsArguments: $.ListCtor<SerializedTypeReference>;
232
+ static _Arguments: $.ListCtor<SerializedTypeReference>;
233
+ static _Types: $.ListCtor<SerializedTypeReference>;
234
+ get typeName(): string;
235
+ set typeName(value: string);
236
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
237
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
238
+ get typeArguments(): $.List<SerializedTypeReference>;
239
+ _hasTypeArguments(): boolean;
240
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
241
+ set typeArguments(value: $.List<SerializedTypeReference>);
242
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
243
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
244
+ get indexAccessOrigin(): IndexAccessOrigin;
245
+ _hasIndexAccessOrigin(): boolean;
246
+ _initIndexAccessOrigin(): IndexAccessOrigin;
247
+ set indexAccessOrigin(value: IndexAccessOrigin);
248
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
249
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
250
+ get decorators(): $.List<SerializedTypeReference>;
251
+ _hasDecorators(): boolean;
252
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
253
+ set decorators(value: $.List<SerializedTypeReference>);
254
+ get kind(): ReflectionKind;
255
+ set kind(value: ReflectionKind);
256
+ get name(): string;
257
+ set name(value: string);
258
+ get globalObject(): boolean;
259
+ set globalObject(value: boolean);
260
+ get classType(): string;
261
+ set classType(value: string);
262
+ _adoptExtendsArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
263
+ _disownExtendsArguments(): $.Orphan<$.List<SerializedTypeReference>>;
264
+ get extendsArguments(): $.List<SerializedTypeReference>;
265
+ _hasExtendsArguments(): boolean;
266
+ _initExtendsArguments(length: number): $.List<SerializedTypeReference>;
267
+ set extendsArguments(value: $.List<SerializedTypeReference>);
268
+ _adoptArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
269
+ _disownArguments(): $.Orphan<$.List<SerializedTypeReference>>;
270
+ get arguments(): $.List<SerializedTypeReference>;
271
+ _hasArguments(): boolean;
272
+ _initArguments(length: number): $.List<SerializedTypeReference>;
273
+ set arguments(value: $.List<SerializedTypeReference>);
274
+ _adoptSuperClass(value: $.Orphan<SerializedTypeReference>): void;
275
+ _disownSuperClass(): $.Orphan<SerializedTypeReference>;
276
+ get superClass(): SerializedTypeReference;
277
+ _hasSuperClass(): boolean;
278
+ _initSuperClass(): SerializedTypeReference;
279
+ set superClass(value: SerializedTypeReference);
280
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeReference>>): void;
281
+ _disownTypes(): $.Orphan<$.List<SerializedTypeReference>>;
282
+ get types(): $.List<SerializedTypeReference>;
283
+ _hasTypes(): boolean;
284
+ _initTypes(length: number): $.List<SerializedTypeReference>;
285
+ set types(value: $.List<SerializedTypeReference>);
286
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
287
+ _disownTags(): $.Orphan<TagsReflection>;
288
+ get tags(): TagsReflection;
289
+ _hasTags(): boolean;
290
+ _initTags(): TagsReflection;
291
+ set tags(value: TagsReflection);
292
+ toString(): string;
293
+ }
294
+ declare class SerializedTypeParameter extends $.Struct {
295
+ static readonly _capnp: {
296
+ displayName: string;
297
+ id: string;
298
+ size: $.ObjectSize;
299
+ };
300
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
301
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
302
+ get typeName(): string;
303
+ set typeName(value: string);
304
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
305
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
306
+ get typeArguments(): $.List<SerializedTypeReference>;
307
+ _hasTypeArguments(): boolean;
308
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
309
+ set typeArguments(value: $.List<SerializedTypeReference>);
310
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
311
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
312
+ get indexAccessOrigin(): IndexAccessOrigin;
313
+ _hasIndexAccessOrigin(): boolean;
314
+ _initIndexAccessOrigin(): IndexAccessOrigin;
315
+ set indexAccessOrigin(value: IndexAccessOrigin);
316
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
317
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
318
+ get decorators(): $.List<SerializedTypeReference>;
319
+ _hasDecorators(): boolean;
320
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
321
+ set decorators(value: $.List<SerializedTypeReference>);
322
+ get kind(): ReflectionKind;
323
+ set kind(value: ReflectionKind);
324
+ get name(): string;
325
+ set name(value: string);
326
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
327
+ _disownType(): $.Orphan<SerializedTypeReference>;
328
+ get type(): SerializedTypeReference;
329
+ _hasType(): boolean;
330
+ _initType(): SerializedTypeReference;
331
+ set type(value: SerializedTypeReference);
332
+ get visibility(): ReflectionVisibility;
333
+ set visibility(value: ReflectionVisibility);
334
+ get readonly(): boolean;
335
+ set readonly(value: boolean);
336
+ get optional(): boolean;
337
+ set optional(value: boolean);
338
+ _adoptDefault(value: $.Orphan<DefaultValueReflection>): void;
339
+ _disownDefault(): $.Orphan<DefaultValueReflection>;
340
+ get default(): DefaultValueReflection;
341
+ _hasDefault(): boolean;
342
+ _initDefault(): DefaultValueReflection;
343
+ set default(value: DefaultValueReflection);
344
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
345
+ _disownTags(): $.Orphan<TagsReflection>;
346
+ get tags(): TagsReflection;
347
+ _hasTags(): boolean;
348
+ _initTags(): TagsReflection;
349
+ set tags(value: TagsReflection);
350
+ toString(): string;
351
+ }
352
+ declare class SerializedTypeMethod extends $.Struct {
353
+ static readonly _capnp: {
354
+ displayName: string;
355
+ id: string;
356
+ size: $.ObjectSize;
357
+ };
358
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
359
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
360
+ static _Parameters: $.ListCtor<SerializedTypeParameter>;
361
+ get typeName(): string;
362
+ set typeName(value: string);
363
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
364
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
365
+ get typeArguments(): $.List<SerializedTypeReference>;
366
+ _hasTypeArguments(): boolean;
367
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
368
+ set typeArguments(value: $.List<SerializedTypeReference>);
369
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
370
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
371
+ get indexAccessOrigin(): IndexAccessOrigin;
372
+ _hasIndexAccessOrigin(): boolean;
373
+ _initIndexAccessOrigin(): IndexAccessOrigin;
374
+ set indexAccessOrigin(value: IndexAccessOrigin);
375
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
376
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
377
+ get decorators(): $.List<SerializedTypeReference>;
378
+ _hasDecorators(): boolean;
379
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
380
+ set decorators(value: $.List<SerializedTypeReference>);
381
+ get visibility(): ReflectionVisibility;
382
+ set visibility(value: ReflectionVisibility);
383
+ get abstract(): boolean;
384
+ set abstract(value: boolean);
385
+ get optional(): boolean;
386
+ set optional(value: boolean);
387
+ get readonly(): boolean;
388
+ set readonly(value: boolean);
389
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
390
+ _disownTags(): $.Orphan<TagsReflection>;
391
+ get tags(): TagsReflection;
392
+ _hasTags(): boolean;
393
+ _initTags(): TagsReflection;
394
+ set tags(value: TagsReflection);
395
+ get kind(): ReflectionKind;
396
+ set kind(value: ReflectionKind);
397
+ get name(): string;
398
+ set name(value: string);
399
+ _adoptParameters(value: $.Orphan<$.List<SerializedTypeParameter>>): void;
400
+ _disownParameters(): $.Orphan<$.List<SerializedTypeParameter>>;
401
+ get parameters(): $.List<SerializedTypeParameter>;
402
+ _hasParameters(): boolean;
403
+ _initParameters(length: number): $.List<SerializedTypeParameter>;
404
+ set parameters(value: $.List<SerializedTypeParameter>);
405
+ _adoptReturn(value: $.Orphan<SerializedTypeReference>): void;
406
+ _disownReturn(): $.Orphan<SerializedTypeReference>;
407
+ get return(): SerializedTypeReference;
408
+ _hasReturn(): boolean;
409
+ _initReturn(): SerializedTypeReference;
410
+ set return(value: SerializedTypeReference);
411
+ toString(): string;
412
+ }
413
+ declare class SerializedTypeProperty extends $.Struct {
414
+ static readonly _capnp: {
415
+ displayName: string;
416
+ id: string;
417
+ size: $.ObjectSize;
418
+ };
419
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
420
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
421
+ get typeName(): string;
422
+ set typeName(value: string);
423
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
424
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
425
+ get typeArguments(): $.List<SerializedTypeReference>;
426
+ _hasTypeArguments(): boolean;
427
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
428
+ set typeArguments(value: $.List<SerializedTypeReference>);
429
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
430
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
431
+ get indexAccessOrigin(): IndexAccessOrigin;
432
+ _hasIndexAccessOrigin(): boolean;
433
+ _initIndexAccessOrigin(): IndexAccessOrigin;
434
+ set indexAccessOrigin(value: IndexAccessOrigin);
435
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
436
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
437
+ get decorators(): $.List<SerializedTypeReference>;
438
+ _hasDecorators(): boolean;
439
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
440
+ set decorators(value: $.List<SerializedTypeReference>);
441
+ get visibility(): ReflectionVisibility;
442
+ set visibility(value: ReflectionVisibility);
443
+ get abstract(): boolean;
444
+ set abstract(value: boolean);
445
+ get optional(): boolean;
446
+ set optional(value: boolean);
447
+ get readonly(): boolean;
448
+ set readonly(value: boolean);
449
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
450
+ _disownTags(): $.Orphan<TagsReflection>;
451
+ get tags(): TagsReflection;
452
+ _hasTags(): boolean;
453
+ _initTags(): TagsReflection;
454
+ set tags(value: TagsReflection);
455
+ get kind(): ReflectionKind;
456
+ set kind(value: ReflectionKind);
457
+ get name(): string;
458
+ set name(value: string);
459
+ get description(): string;
460
+ set description(value: string);
461
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
462
+ _disownType(): $.Orphan<SerializedTypeReference>;
463
+ get type(): SerializedTypeReference;
464
+ _hasType(): boolean;
465
+ _initType(): SerializedTypeReference;
466
+ set type(value: SerializedTypeReference);
467
+ _adoptDefault(value: $.Orphan<DefaultValueReflection>): void;
468
+ _disownDefault(): $.Orphan<DefaultValueReflection>;
469
+ get default(): DefaultValueReflection;
470
+ _hasDefault(): boolean;
471
+ _initDefault(): DefaultValueReflection;
472
+ set default(value: DefaultValueReflection);
473
+ toString(): string;
474
+ }
475
+ declare class SerializedTypeFunction extends $.Struct {
476
+ static readonly _capnp: {
477
+ displayName: string;
478
+ id: string;
479
+ size: $.ObjectSize;
480
+ };
481
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
482
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
483
+ static _Parameters: $.ListCtor<SerializedTypeParameter>;
484
+ get typeName(): string;
485
+ set typeName(value: string);
486
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
487
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
488
+ get typeArguments(): $.List<SerializedTypeReference>;
489
+ _hasTypeArguments(): boolean;
490
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
491
+ set typeArguments(value: $.List<SerializedTypeReference>);
492
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
493
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
494
+ get indexAccessOrigin(): IndexAccessOrigin;
495
+ _hasIndexAccessOrigin(): boolean;
496
+ _initIndexAccessOrigin(): IndexAccessOrigin;
497
+ set indexAccessOrigin(value: IndexAccessOrigin);
498
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
499
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
500
+ get decorators(): $.List<SerializedTypeReference>;
501
+ _hasDecorators(): boolean;
502
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
503
+ set decorators(value: $.List<SerializedTypeReference>);
504
+ get visibility(): ReflectionVisibility;
505
+ set visibility(value: ReflectionVisibility);
506
+ get abstract(): boolean;
507
+ set abstract(value: boolean);
508
+ get optional(): boolean;
509
+ set optional(value: boolean);
510
+ get readonly(): boolean;
511
+ set readonly(value: boolean);
512
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
513
+ _disownTags(): $.Orphan<TagsReflection>;
514
+ get tags(): TagsReflection;
515
+ _hasTags(): boolean;
516
+ _initTags(): TagsReflection;
517
+ set tags(value: TagsReflection);
518
+ get kind(): ReflectionKind;
519
+ set kind(value: ReflectionKind);
520
+ get name(): string;
521
+ set name(value: string);
522
+ _adoptParameters(value: $.Orphan<$.List<SerializedTypeParameter>>): void;
523
+ _disownParameters(): $.Orphan<$.List<SerializedTypeParameter>>;
524
+ get parameters(): $.List<SerializedTypeParameter>;
525
+ _hasParameters(): boolean;
526
+ _initParameters(length: number): $.List<SerializedTypeParameter>;
527
+ set parameters(value: $.List<SerializedTypeParameter>);
528
+ _adoptReturn(value: $.Orphan<SerializedTypeReference>): void;
529
+ _disownReturn(): $.Orphan<SerializedTypeReference>;
530
+ get return(): SerializedTypeReference;
531
+ _hasReturn(): boolean;
532
+ _initReturn(): SerializedTypeReference;
533
+ set return(value: SerializedTypeReference);
534
+ toString(): string;
535
+ }
536
+ declare class SerializedTypePromise extends $.Struct {
537
+ static readonly _capnp: {
538
+ displayName: string;
539
+ id: string;
540
+ size: $.ObjectSize;
541
+ };
542
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
543
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
544
+ get typeName(): string;
545
+ set typeName(value: string);
546
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
547
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
548
+ get typeArguments(): $.List<SerializedTypeReference>;
549
+ _hasTypeArguments(): boolean;
550
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
551
+ set typeArguments(value: $.List<SerializedTypeReference>);
552
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
553
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
554
+ get indexAccessOrigin(): IndexAccessOrigin;
555
+ _hasIndexAccessOrigin(): boolean;
556
+ _initIndexAccessOrigin(): IndexAccessOrigin;
557
+ set indexAccessOrigin(value: IndexAccessOrigin);
558
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
559
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
560
+ get decorators(): $.List<SerializedTypeReference>;
561
+ _hasDecorators(): boolean;
562
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
563
+ set decorators(value: $.List<SerializedTypeReference>);
564
+ get visibility(): ReflectionVisibility;
565
+ set visibility(value: ReflectionVisibility);
566
+ get abstract(): boolean;
567
+ set abstract(value: boolean);
568
+ toString(): string;
569
+ }
570
+ declare class SerializedTypeEnumEntry extends $.Struct {
571
+ static readonly _capnp: {
572
+ displayName: string;
573
+ id: string;
574
+ size: $.ObjectSize;
575
+ };
576
+ get name(): string;
577
+ set name(value: string);
578
+ get value(): string;
579
+ set value(value: string);
580
+ toString(): string;
581
+ }
582
+ declare class SerializedTypeEnum extends $.Struct {
583
+ static readonly _capnp: {
584
+ displayName: string;
585
+ id: string;
586
+ size: $.ObjectSize;
587
+ };
588
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
589
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
590
+ static _EnumEntries: $.ListCtor<SerializedTypeEnumEntry>;
591
+ get typeName(): string;
592
+ set typeName(value: string);
593
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
594
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
595
+ get typeArguments(): $.List<SerializedTypeReference>;
596
+ _hasTypeArguments(): boolean;
597
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
598
+ set typeArguments(value: $.List<SerializedTypeReference>);
599
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
600
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
601
+ get indexAccessOrigin(): IndexAccessOrigin;
602
+ _hasIndexAccessOrigin(): boolean;
603
+ _initIndexAccessOrigin(): IndexAccessOrigin;
604
+ set indexAccessOrigin(value: IndexAccessOrigin);
605
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
606
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
607
+ get decorators(): $.List<SerializedTypeReference>;
608
+ _hasDecorators(): boolean;
609
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
610
+ set decorators(value: $.List<SerializedTypeReference>);
611
+ get kind(): ReflectionKind;
612
+ set kind(value: ReflectionKind);
613
+ _adoptEnumEntries(value: $.Orphan<$.List<SerializedTypeEnumEntry>>): void;
614
+ _disownEnumEntries(): $.Orphan<$.List<SerializedTypeEnumEntry>>;
615
+ get enumEntries(): $.List<SerializedTypeEnumEntry>;
616
+ _hasEnumEntries(): boolean;
617
+ _initEnumEntries(length: number): $.List<SerializedTypeEnumEntry>;
618
+ set enumEntries(value: $.List<SerializedTypeEnumEntry>);
619
+ _adoptValues(value: $.Orphan<$.List<string>>): void;
620
+ _disownValues(): $.Orphan<$.List<string>>;
621
+ get values(): $.List<string>;
622
+ _hasValues(): boolean;
623
+ _initValues(length: number): $.List<string>;
624
+ set values(value: $.List<string>);
625
+ _adoptIndexType(value: $.Orphan<SerializedTypeReference>): void;
626
+ _disownIndexType(): $.Orphan<SerializedTypeReference>;
627
+ get indexType(): SerializedTypeReference;
628
+ _hasIndexType(): boolean;
629
+ _initIndexType(): SerializedTypeReference;
630
+ set indexType(value: SerializedTypeReference);
631
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
632
+ _disownTags(): $.Orphan<TagsReflection>;
633
+ get tags(): TagsReflection;
634
+ _hasTags(): boolean;
635
+ _initTags(): TagsReflection;
636
+ set tags(value: TagsReflection);
637
+ toString(): string;
638
+ }
639
+ declare class SerializedTypeUnion extends $.Struct {
640
+ static readonly _capnp: {
641
+ displayName: string;
642
+ id: string;
643
+ size: $.ObjectSize;
644
+ };
645
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
646
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
647
+ static _Types: $.ListCtor<SerializedTypeReference>;
648
+ get typeName(): string;
649
+ set typeName(value: string);
650
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
651
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
652
+ get typeArguments(): $.List<SerializedTypeReference>;
653
+ _hasTypeArguments(): boolean;
654
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
655
+ set typeArguments(value: $.List<SerializedTypeReference>);
656
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
657
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
658
+ get indexAccessOrigin(): IndexAccessOrigin;
659
+ _hasIndexAccessOrigin(): boolean;
660
+ _initIndexAccessOrigin(): IndexAccessOrigin;
661
+ set indexAccessOrigin(value: IndexAccessOrigin);
662
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
663
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
664
+ get decorators(): $.List<SerializedTypeReference>;
665
+ _hasDecorators(): boolean;
666
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
667
+ set decorators(value: $.List<SerializedTypeReference>);
668
+ get kind(): ReflectionKind;
669
+ set kind(value: ReflectionKind);
670
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeReference>>): void;
671
+ _disownTypes(): $.Orphan<$.List<SerializedTypeReference>>;
672
+ get types(): $.List<SerializedTypeReference>;
673
+ _hasTypes(): boolean;
674
+ _initTypes(length: number): $.List<SerializedTypeReference>;
675
+ set types(value: $.List<SerializedTypeReference>);
676
+ toString(): string;
677
+ }
678
+ declare class SerializedTypeIntersection extends $.Struct {
679
+ static readonly _capnp: {
680
+ displayName: string;
681
+ id: string;
682
+ size: $.ObjectSize;
683
+ };
684
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
685
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
686
+ static _Types: $.ListCtor<SerializedTypeReference>;
687
+ get typeName(): string;
688
+ set typeName(value: string);
689
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
690
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
691
+ get typeArguments(): $.List<SerializedTypeReference>;
692
+ _hasTypeArguments(): boolean;
693
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
694
+ set typeArguments(value: $.List<SerializedTypeReference>);
695
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
696
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
697
+ get indexAccessOrigin(): IndexAccessOrigin;
698
+ _hasIndexAccessOrigin(): boolean;
699
+ _initIndexAccessOrigin(): IndexAccessOrigin;
700
+ set indexAccessOrigin(value: IndexAccessOrigin);
701
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
702
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
703
+ get decorators(): $.List<SerializedTypeReference>;
704
+ _hasDecorators(): boolean;
705
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
706
+ set decorators(value: $.List<SerializedTypeReference>);
707
+ get kind(): ReflectionKind;
708
+ set kind(value: ReflectionKind);
709
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeReference>>): void;
710
+ _disownTypes(): $.Orphan<$.List<SerializedTypeReference>>;
711
+ get types(): $.List<SerializedTypeReference>;
712
+ _hasTypes(): boolean;
713
+ _initTypes(length: number): $.List<SerializedTypeReference>;
714
+ set types(value: $.List<SerializedTypeReference>);
715
+ toString(): string;
716
+ }
717
+ declare class SerializedTypeArray extends $.Struct {
718
+ static readonly _capnp: {
719
+ displayName: string;
720
+ id: string;
721
+ size: $.ObjectSize;
722
+ };
723
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
724
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
725
+ get typeName(): string;
726
+ set typeName(value: string);
727
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
728
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
729
+ get typeArguments(): $.List<SerializedTypeReference>;
730
+ _hasTypeArguments(): boolean;
731
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
732
+ set typeArguments(value: $.List<SerializedTypeReference>);
733
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
734
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
735
+ get indexAccessOrigin(): IndexAccessOrigin;
736
+ _hasIndexAccessOrigin(): boolean;
737
+ _initIndexAccessOrigin(): IndexAccessOrigin;
738
+ set indexAccessOrigin(value: IndexAccessOrigin);
739
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
740
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
741
+ get decorators(): $.List<SerializedTypeReference>;
742
+ _hasDecorators(): boolean;
743
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
744
+ set decorators(value: $.List<SerializedTypeReference>);
745
+ get kind(): ReflectionKind;
746
+ set kind(value: ReflectionKind);
747
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
748
+ _disownType(): $.Orphan<SerializedTypeReference>;
749
+ get type(): SerializedTypeReference;
750
+ _hasType(): boolean;
751
+ _initType(): SerializedTypeReference;
752
+ set type(value: SerializedTypeReference);
753
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
754
+ _disownTags(): $.Orphan<TagsReflection>;
755
+ get tags(): TagsReflection;
756
+ _hasTags(): boolean;
757
+ _initTags(): TagsReflection;
758
+ set tags(value: TagsReflection);
759
+ toString(): string;
760
+ }
761
+ declare class SerializedTypeIndexSignature extends $.Struct {
762
+ static readonly _capnp: {
763
+ displayName: string;
764
+ id: string;
765
+ size: $.ObjectSize;
766
+ };
767
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
768
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
769
+ get typeName(): string;
770
+ set typeName(value: string);
771
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
772
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
773
+ get typeArguments(): $.List<SerializedTypeReference>;
774
+ _hasTypeArguments(): boolean;
775
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
776
+ set typeArguments(value: $.List<SerializedTypeReference>);
777
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
778
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
779
+ get indexAccessOrigin(): IndexAccessOrigin;
780
+ _hasIndexAccessOrigin(): boolean;
781
+ _initIndexAccessOrigin(): IndexAccessOrigin;
782
+ set indexAccessOrigin(value: IndexAccessOrigin);
783
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
784
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
785
+ get decorators(): $.List<SerializedTypeReference>;
786
+ _hasDecorators(): boolean;
787
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
788
+ set decorators(value: $.List<SerializedTypeReference>);
789
+ get kind(): ReflectionKind;
790
+ set kind(value: ReflectionKind);
791
+ _adoptIndex(value: $.Orphan<SerializedTypeReference>): void;
792
+ _disownIndex(): $.Orphan<SerializedTypeReference>;
793
+ get index(): SerializedTypeReference;
794
+ _hasIndex(): boolean;
795
+ _initIndex(): SerializedTypeReference;
796
+ set index(value: SerializedTypeReference);
797
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
798
+ _disownType(): $.Orphan<SerializedTypeReference>;
799
+ get type(): SerializedTypeReference;
800
+ _hasType(): boolean;
801
+ _initType(): SerializedTypeReference;
802
+ set type(value: SerializedTypeReference);
803
+ toString(): string;
804
+ }
805
+ declare class SerializedTypePropertySignature extends $.Struct {
806
+ static readonly _capnp: {
807
+ displayName: string;
808
+ id: string;
809
+ size: $.ObjectSize;
810
+ };
811
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
812
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
813
+ get typeName(): string;
814
+ set typeName(value: string);
815
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
816
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
817
+ get typeArguments(): $.List<SerializedTypeReference>;
818
+ _hasTypeArguments(): boolean;
819
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
820
+ set typeArguments(value: $.List<SerializedTypeReference>);
821
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
822
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
823
+ get indexAccessOrigin(): IndexAccessOrigin;
824
+ _hasIndexAccessOrigin(): boolean;
825
+ _initIndexAccessOrigin(): IndexAccessOrigin;
826
+ set indexAccessOrigin(value: IndexAccessOrigin);
827
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
828
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
829
+ get decorators(): $.List<SerializedTypeReference>;
830
+ _hasDecorators(): boolean;
831
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
832
+ set decorators(value: $.List<SerializedTypeReference>);
833
+ get kind(): ReflectionKind;
834
+ set kind(value: ReflectionKind);
835
+ get name(): string;
836
+ set name(value: string);
837
+ get optional(): boolean;
838
+ set optional(value: boolean);
839
+ get readonly(): boolean;
840
+ set readonly(value: boolean);
841
+ get description(): string;
842
+ set description(value: string);
843
+ _adoptDefault(value: $.Orphan<DefaultValueReflection>): void;
844
+ _disownDefault(): $.Orphan<DefaultValueReflection>;
845
+ get default(): DefaultValueReflection;
846
+ _hasDefault(): boolean;
847
+ _initDefault(): DefaultValueReflection;
848
+ set default(value: DefaultValueReflection);
849
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
850
+ _disownType(): $.Orphan<SerializedTypeReference>;
851
+ get type(): SerializedTypeReference;
852
+ _hasType(): boolean;
853
+ _initType(): SerializedTypeReference;
854
+ set type(value: SerializedTypeReference);
855
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
856
+ _disownTags(): $.Orphan<TagsReflection>;
857
+ get tags(): TagsReflection;
858
+ _hasTags(): boolean;
859
+ _initTags(): TagsReflection;
860
+ set tags(value: TagsReflection);
861
+ toString(): string;
862
+ }
863
+ declare class SerializedTypeMethodSignature extends $.Struct {
864
+ static readonly _capnp: {
865
+ displayName: string;
866
+ id: string;
867
+ size: $.ObjectSize;
868
+ };
869
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
870
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
871
+ static _Parameters: $.ListCtor<SerializedTypeParameter>;
872
+ get typeName(): string;
873
+ set typeName(value: string);
874
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
875
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
876
+ get typeArguments(): $.List<SerializedTypeReference>;
877
+ _hasTypeArguments(): boolean;
878
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
879
+ set typeArguments(value: $.List<SerializedTypeReference>);
880
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
881
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
882
+ get indexAccessOrigin(): IndexAccessOrigin;
883
+ _hasIndexAccessOrigin(): boolean;
884
+ _initIndexAccessOrigin(): IndexAccessOrigin;
885
+ set indexAccessOrigin(value: IndexAccessOrigin);
886
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
887
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
888
+ get decorators(): $.List<SerializedTypeReference>;
889
+ _hasDecorators(): boolean;
890
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
891
+ set decorators(value: $.List<SerializedTypeReference>);
892
+ get kind(): ReflectionKind;
893
+ set kind(value: ReflectionKind);
894
+ get name(): string;
895
+ set name(value: string);
896
+ get optional(): boolean;
897
+ set optional(value: boolean);
898
+ _adoptParameters(value: $.Orphan<$.List<SerializedTypeParameter>>): void;
899
+ _disownParameters(): $.Orphan<$.List<SerializedTypeParameter>>;
900
+ get parameters(): $.List<SerializedTypeParameter>;
901
+ _hasParameters(): boolean;
902
+ _initParameters(length: number): $.List<SerializedTypeParameter>;
903
+ set parameters(value: $.List<SerializedTypeParameter>);
904
+ _adoptReturn(value: $.Orphan<SerializedTypeReference>): void;
905
+ _disownReturn(): $.Orphan<SerializedTypeReference>;
906
+ get return(): SerializedTypeReference;
907
+ _hasReturn(): boolean;
908
+ _initReturn(): SerializedTypeReference;
909
+ set return(value: SerializedTypeReference);
910
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
911
+ _disownTags(): $.Orphan<TagsReflection>;
912
+ get tags(): TagsReflection;
913
+ _hasTags(): boolean;
914
+ _initTags(): TagsReflection;
915
+ set tags(value: TagsReflection);
916
+ toString(): string;
917
+ }
918
+ declare class SerializedTypeTypeParameter extends $.Struct {
919
+ static readonly _capnp: {
920
+ displayName: string;
921
+ id: string;
922
+ size: $.ObjectSize;
923
+ };
924
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
925
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
926
+ get typeName(): string;
927
+ set typeName(value: string);
928
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
929
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
930
+ get typeArguments(): $.List<SerializedTypeReference>;
931
+ _hasTypeArguments(): boolean;
932
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
933
+ set typeArguments(value: $.List<SerializedTypeReference>);
934
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
935
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
936
+ get indexAccessOrigin(): IndexAccessOrigin;
937
+ _hasIndexAccessOrigin(): boolean;
938
+ _initIndexAccessOrigin(): IndexAccessOrigin;
939
+ set indexAccessOrigin(value: IndexAccessOrigin);
940
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
941
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
942
+ get decorators(): $.List<SerializedTypeReference>;
943
+ _hasDecorators(): boolean;
944
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
945
+ set decorators(value: $.List<SerializedTypeReference>);
946
+ get kind(): ReflectionKind;
947
+ set kind(value: ReflectionKind);
948
+ get name(): string;
949
+ set name(value: string);
950
+ toString(): string;
951
+ }
952
+ declare class SerializedTypeInfer extends $.Struct {
953
+ static readonly _capnp: {
954
+ displayName: string;
955
+ id: string;
956
+ size: $.ObjectSize;
957
+ };
958
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
959
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
960
+ get typeName(): string;
961
+ set typeName(value: string);
962
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
963
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
964
+ get typeArguments(): $.List<SerializedTypeReference>;
965
+ _hasTypeArguments(): boolean;
966
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
967
+ set typeArguments(value: $.List<SerializedTypeReference>);
968
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
969
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
970
+ get indexAccessOrigin(): IndexAccessOrigin;
971
+ _hasIndexAccessOrigin(): boolean;
972
+ _initIndexAccessOrigin(): IndexAccessOrigin;
973
+ set indexAccessOrigin(value: IndexAccessOrigin);
974
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
975
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
976
+ get decorators(): $.List<SerializedTypeReference>;
977
+ _hasDecorators(): boolean;
978
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
979
+ set decorators(value: $.List<SerializedTypeReference>);
980
+ get kind(): ReflectionKind;
981
+ set kind(value: ReflectionKind);
982
+ toString(): string;
983
+ }
984
+ declare class SerializedTypeTupleMember extends $.Struct {
985
+ static readonly _capnp: {
986
+ displayName: string;
987
+ id: string;
988
+ size: $.ObjectSize;
989
+ };
990
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
991
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
992
+ get typeName(): string;
993
+ set typeName(value: string);
994
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
995
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
996
+ get typeArguments(): $.List<SerializedTypeReference>;
997
+ _hasTypeArguments(): boolean;
998
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
999
+ set typeArguments(value: $.List<SerializedTypeReference>);
1000
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1001
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1002
+ get indexAccessOrigin(): IndexAccessOrigin;
1003
+ _hasIndexAccessOrigin(): boolean;
1004
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1005
+ set indexAccessOrigin(value: IndexAccessOrigin);
1006
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1007
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1008
+ get decorators(): $.List<SerializedTypeReference>;
1009
+ _hasDecorators(): boolean;
1010
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1011
+ set decorators(value: $.List<SerializedTypeReference>);
1012
+ get kind(): ReflectionKind;
1013
+ set kind(value: ReflectionKind);
1014
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
1015
+ _disownType(): $.Orphan<SerializedTypeReference>;
1016
+ get type(): SerializedTypeReference;
1017
+ _hasType(): boolean;
1018
+ _initType(): SerializedTypeReference;
1019
+ set type(value: SerializedTypeReference);
1020
+ get optional(): boolean;
1021
+ set optional(value: boolean);
1022
+ get name(): string;
1023
+ set name(value: string);
1024
+ toString(): string;
1025
+ }
1026
+ declare class SerializedTypeTuple extends $.Struct {
1027
+ static readonly _capnp: {
1028
+ displayName: string;
1029
+ id: string;
1030
+ size: $.ObjectSize;
1031
+ };
1032
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1033
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1034
+ static _Types: $.ListCtor<SerializedTypeTupleMember>;
1035
+ get typeName(): string;
1036
+ set typeName(value: string);
1037
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1038
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1039
+ get typeArguments(): $.List<SerializedTypeReference>;
1040
+ _hasTypeArguments(): boolean;
1041
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1042
+ set typeArguments(value: $.List<SerializedTypeReference>);
1043
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1044
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1045
+ get indexAccessOrigin(): IndexAccessOrigin;
1046
+ _hasIndexAccessOrigin(): boolean;
1047
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1048
+ set indexAccessOrigin(value: IndexAccessOrigin);
1049
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1050
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1051
+ get decorators(): $.List<SerializedTypeReference>;
1052
+ _hasDecorators(): boolean;
1053
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1054
+ set decorators(value: $.List<SerializedTypeReference>);
1055
+ get kind(): ReflectionKind;
1056
+ set kind(value: ReflectionKind);
1057
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeTupleMember>>): void;
1058
+ _disownTypes(): $.Orphan<$.List<SerializedTypeTupleMember>>;
1059
+ get types(): $.List<SerializedTypeTupleMember>;
1060
+ _hasTypes(): boolean;
1061
+ _initTypes(length: number): $.List<SerializedTypeTupleMember>;
1062
+ set types(value: $.List<SerializedTypeTupleMember>);
1063
+ toString(): string;
1064
+ }
1065
+ declare class SerializedTypeRest extends $.Struct {
1066
+ static readonly _capnp: {
1067
+ displayName: string;
1068
+ id: string;
1069
+ size: $.ObjectSize;
1070
+ };
1071
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1072
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1073
+ get typeName(): string;
1074
+ set typeName(value: string);
1075
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1076
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1077
+ get typeArguments(): $.List<SerializedTypeReference>;
1078
+ _hasTypeArguments(): boolean;
1079
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1080
+ set typeArguments(value: $.List<SerializedTypeReference>);
1081
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1082
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1083
+ get indexAccessOrigin(): IndexAccessOrigin;
1084
+ _hasIndexAccessOrigin(): boolean;
1085
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1086
+ set indexAccessOrigin(value: IndexAccessOrigin);
1087
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1088
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1089
+ get decorators(): $.List<SerializedTypeReference>;
1090
+ _hasDecorators(): boolean;
1091
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1092
+ set decorators(value: $.List<SerializedTypeReference>);
1093
+ get kind(): ReflectionKind;
1094
+ set kind(value: ReflectionKind);
1095
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
1096
+ _disownType(): $.Orphan<SerializedTypeReference>;
1097
+ get type(): SerializedTypeReference;
1098
+ _hasType(): boolean;
1099
+ _initType(): SerializedTypeReference;
1100
+ set type(value: SerializedTypeReference);
1101
+ toString(): string;
1102
+ }
1103
+ declare class SimpleSerializedType extends $.Struct {
1104
+ static readonly _capnp: {
1105
+ displayName: string;
1106
+ id: string;
1107
+ size: $.ObjectSize;
1108
+ };
1109
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1110
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1111
+ get typeName(): string;
1112
+ set typeName(value: string);
1113
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1114
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1115
+ get typeArguments(): $.List<SerializedTypeReference>;
1116
+ _hasTypeArguments(): boolean;
1117
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1118
+ set typeArguments(value: $.List<SerializedTypeReference>);
1119
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1120
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1121
+ get indexAccessOrigin(): IndexAccessOrigin;
1122
+ _hasIndexAccessOrigin(): boolean;
1123
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1124
+ set indexAccessOrigin(value: IndexAccessOrigin);
1125
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1126
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1127
+ get decorators(): $.List<SerializedTypeReference>;
1128
+ _hasDecorators(): boolean;
1129
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1130
+ set decorators(value: $.List<SerializedTypeReference>);
1131
+ get kind(): ReflectionKind;
1132
+ set kind(value: ReflectionKind);
1133
+ _adoptOrigin(value: $.Orphan<SerializedTypeReference>): void;
1134
+ _disownOrigin(): $.Orphan<SerializedTypeReference>;
1135
+ get origin(): SerializedTypeReference;
1136
+ _hasOrigin(): boolean;
1137
+ _initOrigin(): SerializedTypeReference;
1138
+ set origin(value: SerializedTypeReference);
1139
+ toString(): string;
1140
+ }
1141
+ declare class SerializedTypeLiteralSymbol extends $.Struct {
1142
+ static readonly _capnp: {
1143
+ displayName: string;
1144
+ id: string;
1145
+ size: $.ObjectSize;
1146
+ };
1147
+ /**
1148
+ * "symbol"
1149
+ *
1150
+ */
1151
+ get type(): string;
1152
+ set type(value: string);
1153
+ get name(): string;
1154
+ set name(value: string);
1155
+ toString(): string;
1156
+ }
1157
+ declare class SerializedTypeLiteralBigInt extends $.Struct {
1158
+ static readonly _capnp: {
1159
+ displayName: string;
1160
+ id: string;
1161
+ size: $.ObjectSize;
1162
+ };
1163
+ /**
1164
+ * "bigint"
1165
+ *
1166
+ */
1167
+ get type(): string;
1168
+ set type(value: string);
1169
+ get value(): string;
1170
+ set value(value: string);
1171
+ toString(): string;
1172
+ }
1173
+ declare class SerializedTypeLiteralRegex extends $.Struct {
1174
+ static readonly _capnp: {
1175
+ displayName: string;
1176
+ id: string;
1177
+ size: $.ObjectSize;
1178
+ };
1179
+ /**
1180
+ * "regex"
1181
+ *
1182
+ */
1183
+ get type(): string;
1184
+ set type(value: string);
1185
+ get regex(): string;
1186
+ set regex(value: string);
1187
+ toString(): string;
1188
+ }
1189
+ declare const SerializedTypeLiteral_Literal_Which: {
1190
+ readonly SYMBOL: 0;
1191
+ readonly STRING: 1;
1192
+ readonly NUMBER: 2;
1193
+ readonly BOOLEAN: 3;
1194
+ readonly BIGINT: 4;
1195
+ readonly REGEX: 5;
1196
+ };
1197
+ type SerializedTypeLiteral_Literal_Which = (typeof SerializedTypeLiteral_Literal_Which)[keyof typeof SerializedTypeLiteral_Literal_Which];
1198
+ declare class SerializedTypeLiteral_Literal extends $.Struct {
1199
+ static readonly SYMBOL: 0;
1200
+ static readonly STRING: 1;
1201
+ static readonly NUMBER: 2;
1202
+ static readonly BOOLEAN: 3;
1203
+ static readonly BIGINT: 4;
1204
+ static readonly REGEX: 5;
1205
+ static readonly _capnp: {
1206
+ displayName: string;
1207
+ id: string;
1208
+ size: $.ObjectSize;
1209
+ };
1210
+ _adoptSymbol(value: $.Orphan<SerializedTypeLiteralSymbol>): void;
1211
+ _disownSymbol(): $.Orphan<SerializedTypeLiteralSymbol>;
1212
+ get symbol(): SerializedTypeLiteralSymbol;
1213
+ _hasSymbol(): boolean;
1214
+ _initSymbol(): SerializedTypeLiteralSymbol;
1215
+ get _isSymbol(): boolean;
1216
+ set symbol(value: SerializedTypeLiteralSymbol);
1217
+ get string(): string;
1218
+ get _isString(): boolean;
1219
+ set string(value: string);
1220
+ get number(): number;
1221
+ get _isNumber(): boolean;
1222
+ set number(value: number);
1223
+ get boolean(): boolean;
1224
+ get _isBoolean(): boolean;
1225
+ set boolean(value: boolean);
1226
+ _adoptBigint(value: $.Orphan<SerializedTypeLiteralBigInt>): void;
1227
+ _disownBigint(): $.Orphan<SerializedTypeLiteralBigInt>;
1228
+ get bigint(): SerializedTypeLiteralBigInt;
1229
+ _hasBigint(): boolean;
1230
+ _initBigint(): SerializedTypeLiteralBigInt;
1231
+ get _isBigint(): boolean;
1232
+ set bigint(value: SerializedTypeLiteralBigInt);
1233
+ _adoptRegex(value: $.Orphan<SerializedTypeLiteralRegex>): void;
1234
+ _disownRegex(): $.Orphan<SerializedTypeLiteralRegex>;
1235
+ get regex(): SerializedTypeLiteralRegex;
1236
+ _hasRegex(): boolean;
1237
+ _initRegex(): SerializedTypeLiteralRegex;
1238
+ get _isRegex(): boolean;
1239
+ set regex(value: SerializedTypeLiteralRegex);
1240
+ toString(): string;
1241
+ which(): SerializedTypeLiteral_Literal_Which;
1242
+ }
1243
+ declare class SerializedTypeLiteral extends $.Struct {
1244
+ static readonly _capnp: {
1245
+ displayName: string;
1246
+ id: string;
1247
+ size: $.ObjectSize;
1248
+ };
1249
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1250
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1251
+ get typeName(): string;
1252
+ set typeName(value: string);
1253
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1254
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1255
+ get typeArguments(): $.List<SerializedTypeReference>;
1256
+ _hasTypeArguments(): boolean;
1257
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1258
+ set typeArguments(value: $.List<SerializedTypeReference>);
1259
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1260
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1261
+ get indexAccessOrigin(): IndexAccessOrigin;
1262
+ _hasIndexAccessOrigin(): boolean;
1263
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1264
+ set indexAccessOrigin(value: IndexAccessOrigin);
1265
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1266
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1267
+ get decorators(): $.List<SerializedTypeReference>;
1268
+ _hasDecorators(): boolean;
1269
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1270
+ set decorators(value: $.List<SerializedTypeReference>);
1271
+ get kind(): ReflectionKind;
1272
+ set kind(value: ReflectionKind);
1273
+ get literal(): SerializedTypeLiteral_Literal;
1274
+ _initLiteral(): SerializedTypeLiteral_Literal;
1275
+ toString(): string;
1276
+ }
1277
+ declare class SerializedTypeTemplateLiteral extends $.Struct {
1278
+ static readonly _capnp: {
1279
+ displayName: string;
1280
+ id: string;
1281
+ size: $.ObjectSize;
1282
+ };
1283
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1284
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1285
+ static _Types: $.ListCtor<SerializedTypeReference>;
1286
+ get typeName(): string;
1287
+ set typeName(value: string);
1288
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1289
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1290
+ get typeArguments(): $.List<SerializedTypeReference>;
1291
+ _hasTypeArguments(): boolean;
1292
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1293
+ set typeArguments(value: $.List<SerializedTypeReference>);
1294
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1295
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1296
+ get indexAccessOrigin(): IndexAccessOrigin;
1297
+ _hasIndexAccessOrigin(): boolean;
1298
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1299
+ set indexAccessOrigin(value: IndexAccessOrigin);
1300
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1301
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1302
+ get decorators(): $.List<SerializedTypeReference>;
1303
+ _hasDecorators(): boolean;
1304
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1305
+ set decorators(value: $.List<SerializedTypeReference>);
1306
+ get kind(): ReflectionKind;
1307
+ set kind(value: ReflectionKind);
1308
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1309
+ _disownTypes(): $.Orphan<$.List<SerializedTypeReference>>;
1310
+ get types(): $.List<SerializedTypeReference>;
1311
+ _hasTypes(): boolean;
1312
+ _initTypes(length: number): $.List<SerializedTypeReference>;
1313
+ set types(value: $.List<SerializedTypeReference>);
1314
+ toString(): string;
1315
+ }
1316
+ declare class SerializedTypeOther extends $.Struct {
1317
+ static readonly _capnp: {
1318
+ displayName: string;
1319
+ id: string;
1320
+ size: $.ObjectSize;
1321
+ };
1322
+ get typeName(): string;
1323
+ set typeName(value: string);
1324
+ get kind(): ReflectionKind;
1325
+ set kind(value: ReflectionKind);
1326
+ toString(): string;
1327
+ }
1328
+ declare const SerializedType_Type_Which: {
1329
+ readonly SIMPLE: 0;
1330
+ readonly LITERAL: 1;
1331
+ readonly TEMPLATE_LITERAL: 2;
1332
+ readonly PARAMETER: 3;
1333
+ readonly FUNCTION: 4;
1334
+ readonly METHOD: 5;
1335
+ readonly PROPERTY: 6;
1336
+ readonly PROMISE: 7;
1337
+ readonly CLASS_TYPE: 8;
1338
+ readonly ENUM: 9;
1339
+ readonly UNION: 10;
1340
+ readonly INTERSECTION: 11;
1341
+ readonly ARRAY: 12;
1342
+ readonly OBJECT_LITERAL: 13;
1343
+ readonly INDEX_SIGNATURE: 14;
1344
+ readonly PROPERTY_SIGNATURE: 15;
1345
+ readonly METHOD_SIGNATURE: 16;
1346
+ readonly TYPE_PARAMETER: 17;
1347
+ readonly INFER: 18;
1348
+ readonly TUPLE: 19;
1349
+ readonly TUPLE_MEMBER: 20;
1350
+ readonly REST: 21;
1351
+ /**
1352
+ * For any other type that is not explicitly defined
1353
+ *
1354
+ */
1355
+ readonly OTHER: 22;
1356
+ };
1357
+ type SerializedType_Type_Which = (typeof SerializedType_Type_Which)[keyof typeof SerializedType_Type_Which];
1358
+ declare class SerializedType_Type extends $.Struct {
1359
+ static readonly SIMPLE: 0;
1360
+ static readonly LITERAL: 1;
1361
+ static readonly TEMPLATE_LITERAL: 2;
1362
+ static readonly PARAMETER: 3;
1363
+ static readonly FUNCTION: 4;
1364
+ static readonly METHOD: 5;
1365
+ static readonly PROPERTY: 6;
1366
+ static readonly PROMISE: 7;
1367
+ static readonly CLASS_TYPE: 8;
1368
+ static readonly ENUM: 9;
1369
+ static readonly UNION: 10;
1370
+ static readonly INTERSECTION: 11;
1371
+ static readonly ARRAY: 12;
1372
+ static readonly OBJECT_LITERAL: 13;
1373
+ static readonly INDEX_SIGNATURE: 14;
1374
+ static readonly PROPERTY_SIGNATURE: 15;
1375
+ static readonly METHOD_SIGNATURE: 16;
1376
+ static readonly TYPE_PARAMETER: 17;
1377
+ static readonly INFER: 18;
1378
+ static readonly TUPLE: 19;
1379
+ static readonly TUPLE_MEMBER: 20;
1380
+ static readonly REST: 21;
1381
+ static readonly OTHER: 22;
1382
+ static readonly _capnp: {
1383
+ displayName: string;
1384
+ id: string;
1385
+ size: $.ObjectSize;
1386
+ };
1387
+ _adoptSimple(value: $.Orphan<SimpleSerializedType>): void;
1388
+ _disownSimple(): $.Orphan<SimpleSerializedType>;
1389
+ get simple(): SimpleSerializedType;
1390
+ _hasSimple(): boolean;
1391
+ _initSimple(): SimpleSerializedType;
1392
+ get _isSimple(): boolean;
1393
+ set simple(value: SimpleSerializedType);
1394
+ _adoptLiteral(value: $.Orphan<SerializedTypeLiteral>): void;
1395
+ _disownLiteral(): $.Orphan<SerializedTypeLiteral>;
1396
+ get literal(): SerializedTypeLiteral;
1397
+ _hasLiteral(): boolean;
1398
+ _initLiteral(): SerializedTypeLiteral;
1399
+ get _isLiteral(): boolean;
1400
+ set literal(value: SerializedTypeLiteral);
1401
+ _adoptTemplateLiteral(value: $.Orphan<SerializedTypeTemplateLiteral>): void;
1402
+ _disownTemplateLiteral(): $.Orphan<SerializedTypeTemplateLiteral>;
1403
+ get templateLiteral(): SerializedTypeTemplateLiteral;
1404
+ _hasTemplateLiteral(): boolean;
1405
+ _initTemplateLiteral(): SerializedTypeTemplateLiteral;
1406
+ get _isTemplateLiteral(): boolean;
1407
+ set templateLiteral(value: SerializedTypeTemplateLiteral);
1408
+ _adoptParameter(value: $.Orphan<SerializedTypeParameter>): void;
1409
+ _disownParameter(): $.Orphan<SerializedTypeParameter>;
1410
+ get parameter(): SerializedTypeParameter;
1411
+ _hasParameter(): boolean;
1412
+ _initParameter(): SerializedTypeParameter;
1413
+ get _isParameter(): boolean;
1414
+ set parameter(value: SerializedTypeParameter);
1415
+ _adoptFunction(value: $.Orphan<SerializedTypeFunction>): void;
1416
+ _disownFunction(): $.Orphan<SerializedTypeFunction>;
1417
+ get function(): SerializedTypeFunction;
1418
+ _hasFunction(): boolean;
1419
+ _initFunction(): SerializedTypeFunction;
1420
+ get _isFunction(): boolean;
1421
+ set function(value: SerializedTypeFunction);
1422
+ _adoptMethod(value: $.Orphan<SerializedTypeMethod>): void;
1423
+ _disownMethod(): $.Orphan<SerializedTypeMethod>;
1424
+ get method(): SerializedTypeMethod;
1425
+ _hasMethod(): boolean;
1426
+ _initMethod(): SerializedTypeMethod;
1427
+ get _isMethod(): boolean;
1428
+ set method(value: SerializedTypeMethod);
1429
+ _adoptProperty(value: $.Orphan<SerializedTypeProperty>): void;
1430
+ _disownProperty(): $.Orphan<SerializedTypeProperty>;
1431
+ get property(): SerializedTypeProperty;
1432
+ _hasProperty(): boolean;
1433
+ _initProperty(): SerializedTypeProperty;
1434
+ get _isProperty(): boolean;
1435
+ set property(value: SerializedTypeProperty);
1436
+ _adoptPromise(value: $.Orphan<SerializedTypePromise>): void;
1437
+ _disownPromise(): $.Orphan<SerializedTypePromise>;
1438
+ get promise(): SerializedTypePromise;
1439
+ _hasPromise(): boolean;
1440
+ _initPromise(): SerializedTypePromise;
1441
+ get _isPromise(): boolean;
1442
+ set promise(value: SerializedTypePromise);
1443
+ _adoptClassType(value: $.Orphan<SerializedTypeClassType>): void;
1444
+ _disownClassType(): $.Orphan<SerializedTypeClassType>;
1445
+ get classType(): SerializedTypeClassType;
1446
+ _hasClassType(): boolean;
1447
+ _initClassType(): SerializedTypeClassType;
1448
+ get _isClassType(): boolean;
1449
+ set classType(value: SerializedTypeClassType);
1450
+ _adoptEnum(value: $.Orphan<SerializedTypeEnum>): void;
1451
+ _disownEnum(): $.Orphan<SerializedTypeEnum>;
1452
+ get enum(): SerializedTypeEnum;
1453
+ _hasEnum(): boolean;
1454
+ _initEnum(): SerializedTypeEnum;
1455
+ get _isEnum(): boolean;
1456
+ set enum(value: SerializedTypeEnum);
1457
+ _adoptUnion(value: $.Orphan<SerializedTypeUnion>): void;
1458
+ _disownUnion(): $.Orphan<SerializedTypeUnion>;
1459
+ get union(): SerializedTypeUnion;
1460
+ _hasUnion(): boolean;
1461
+ _initUnion(): SerializedTypeUnion;
1462
+ get _isUnion(): boolean;
1463
+ set union(value: SerializedTypeUnion);
1464
+ _adoptIntersection(value: $.Orphan<SerializedTypeIntersection>): void;
1465
+ _disownIntersection(): $.Orphan<SerializedTypeIntersection>;
1466
+ get intersection(): SerializedTypeIntersection;
1467
+ _hasIntersection(): boolean;
1468
+ _initIntersection(): SerializedTypeIntersection;
1469
+ get _isIntersection(): boolean;
1470
+ set intersection(value: SerializedTypeIntersection);
1471
+ _adoptArray(value: $.Orphan<SerializedTypeArray>): void;
1472
+ _disownArray(): $.Orphan<SerializedTypeArray>;
1473
+ get array(): SerializedTypeArray;
1474
+ _hasArray(): boolean;
1475
+ _initArray(): SerializedTypeArray;
1476
+ get _isArray(): boolean;
1477
+ set array(value: SerializedTypeArray);
1478
+ _adoptObjectLiteral(value: $.Orphan<SerializedTypeObjectLiteral>): void;
1479
+ _disownObjectLiteral(): $.Orphan<SerializedTypeObjectLiteral>;
1480
+ get objectLiteral(): SerializedTypeObjectLiteral;
1481
+ _hasObjectLiteral(): boolean;
1482
+ _initObjectLiteral(): SerializedTypeObjectLiteral;
1483
+ get _isObjectLiteral(): boolean;
1484
+ set objectLiteral(value: SerializedTypeObjectLiteral);
1485
+ _adoptIndexSignature(value: $.Orphan<SerializedTypeIndexSignature>): void;
1486
+ _disownIndexSignature(): $.Orphan<SerializedTypeIndexSignature>;
1487
+ get indexSignature(): SerializedTypeIndexSignature;
1488
+ _hasIndexSignature(): boolean;
1489
+ _initIndexSignature(): SerializedTypeIndexSignature;
1490
+ get _isIndexSignature(): boolean;
1491
+ set indexSignature(value: SerializedTypeIndexSignature);
1492
+ _adoptPropertySignature(value: $.Orphan<SerializedTypePropertySignature>): void;
1493
+ _disownPropertySignature(): $.Orphan<SerializedTypePropertySignature>;
1494
+ get propertySignature(): SerializedTypePropertySignature;
1495
+ _hasPropertySignature(): boolean;
1496
+ _initPropertySignature(): SerializedTypePropertySignature;
1497
+ get _isPropertySignature(): boolean;
1498
+ set propertySignature(value: SerializedTypePropertySignature);
1499
+ _adoptMethodSignature(value: $.Orphan<SerializedTypeMethodSignature>): void;
1500
+ _disownMethodSignature(): $.Orphan<SerializedTypeMethodSignature>;
1501
+ get methodSignature(): SerializedTypeMethodSignature;
1502
+ _hasMethodSignature(): boolean;
1503
+ _initMethodSignature(): SerializedTypeMethodSignature;
1504
+ get _isMethodSignature(): boolean;
1505
+ set methodSignature(value: SerializedTypeMethodSignature);
1506
+ _adoptTypeParameter(value: $.Orphan<SerializedTypeTypeParameter>): void;
1507
+ _disownTypeParameter(): $.Orphan<SerializedTypeTypeParameter>;
1508
+ get typeParameter(): SerializedTypeTypeParameter;
1509
+ _hasTypeParameter(): boolean;
1510
+ _initTypeParameter(): SerializedTypeTypeParameter;
1511
+ get _isTypeParameter(): boolean;
1512
+ set typeParameter(value: SerializedTypeTypeParameter);
1513
+ _adoptInfer(value: $.Orphan<SerializedTypeInfer>): void;
1514
+ _disownInfer(): $.Orphan<SerializedTypeInfer>;
1515
+ get infer(): SerializedTypeInfer;
1516
+ _hasInfer(): boolean;
1517
+ _initInfer(): SerializedTypeInfer;
1518
+ get _isInfer(): boolean;
1519
+ set infer(value: SerializedTypeInfer);
1520
+ _adoptTuple(value: $.Orphan<SerializedTypeTuple>): void;
1521
+ _disownTuple(): $.Orphan<SerializedTypeTuple>;
1522
+ get tuple(): SerializedTypeTuple;
1523
+ _hasTuple(): boolean;
1524
+ _initTuple(): SerializedTypeTuple;
1525
+ get _isTuple(): boolean;
1526
+ set tuple(value: SerializedTypeTuple);
1527
+ _adoptTupleMember(value: $.Orphan<SerializedTypeTupleMember>): void;
1528
+ _disownTupleMember(): $.Orphan<SerializedTypeTupleMember>;
1529
+ get tupleMember(): SerializedTypeTupleMember;
1530
+ _hasTupleMember(): boolean;
1531
+ _initTupleMember(): SerializedTypeTupleMember;
1532
+ get _isTupleMember(): boolean;
1533
+ set tupleMember(value: SerializedTypeTupleMember);
1534
+ _adoptRest(value: $.Orphan<SerializedTypeRest>): void;
1535
+ _disownRest(): $.Orphan<SerializedTypeRest>;
1536
+ get rest(): SerializedTypeRest;
1537
+ _hasRest(): boolean;
1538
+ _initRest(): SerializedTypeRest;
1539
+ get _isRest(): boolean;
1540
+ set rest(value: SerializedTypeRest);
1541
+ _adoptOther(value: $.Orphan<SerializedTypeOther>): void;
1542
+ _disownOther(): $.Orphan<SerializedTypeOther>;
1543
+ /**
1544
+ * For any other type that is not explicitly defined
1545
+ *
1546
+ */
1547
+ get other(): SerializedTypeOther;
1548
+ _hasOther(): boolean;
1549
+ _initOther(): SerializedTypeOther;
1550
+ get _isOther(): boolean;
1551
+ set other(value: SerializedTypeOther);
1552
+ toString(): string;
1553
+ which(): SerializedType_Type_Which;
1554
+ }
1555
+ declare class SerializedType extends $.Struct {
1556
+ static readonly _capnp: {
1557
+ displayName: string;
1558
+ id: string;
1559
+ size: $.ObjectSize;
1560
+ };
1561
+ get type(): SerializedType_Type;
1562
+ _initType(): SerializedType_Type;
1563
+ toString(): string;
1564
+ }
1565
+ declare class SerializedTypes extends $.Struct {
1566
+ static readonly _capnp: {
1567
+ displayName: string;
1568
+ id: string;
1569
+ size: $.ObjectSize;
1570
+ };
1571
+ static _Types: $.ListCtor<SerializedType>;
1572
+ _adoptTypes(value: $.Orphan<$.List<SerializedType>>): void;
1573
+ _disownTypes(): $.Orphan<$.List<SerializedType>>;
1574
+ get types(): $.List<SerializedType>;
1575
+ _hasTypes(): boolean;
1576
+ _initTypes(length: number): $.List<SerializedType>;
1577
+ set types(value: $.List<SerializedType>);
1578
+ toString(): string;
1579
+ }
1580
+
1581
+ type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
1582
+ interface BuildConfig {
1583
+ /**
1584
+ * The platform to build the project for
1585
+ *
1586
+ * @defaultValue "neutral"
1587
+ */
1588
+ platform?: "node" | "browser" | "neutral";
1589
+ /**
1590
+ * The alias mappings to use for module resolution during the build process.
1591
+ *
1592
+ * @remarks
1593
+ * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
1594
+ *
1595
+ * @example
1596
+ * ```ts
1597
+ * {
1598
+ * alias: {
1599
+ * "@utils": "./src/utils",
1600
+ * "@components": "./src/components"
1601
+ * }
1602
+ * }
1603
+ * ```
1604
+ */
1605
+ alias?: Record<string, string>;
1606
+ /**
1607
+ * A list of modules that should not be bundled, even if they are external dependencies.
1608
+ *
1609
+ * @remarks
1610
+ * This option is useful for excluding specific modules from the bundle, such as Node.js built-in modules or other libraries that should not be bundled.
1611
+ */
1612
+ external?: (string | RegExp)[];
1613
+ /**
1614
+ * A list of modules that should always be bundled, even if they are external dependencies.
1615
+ */
1616
+ noExternal?: (string | RegExp)[];
1617
+ /**
1618
+ * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
1619
+ */
1620
+ skipNodeModulesBundle?: boolean;
1621
+ /**
1622
+ * Should the Powerlines processes skip the `"prepare"` task prior to building?
1623
+ *
1624
+ * @defaultValue false
1625
+ */
1626
+ skipPrepare?: boolean;
1627
+ }
1628
+ type BuildResolvedConfig = BuildConfig;
1629
+
1630
+ interface ResolvedEntryTypeDefinition extends TypeDefinition {
1631
+ /**
1632
+ * The user provided entry point in the source code
1633
+ */
1634
+ input: TypeDefinition;
1635
+ /**
1636
+ * An optional name to use in the package export during the build process
1637
+ */
1638
+ output?: string;
1639
+ }
1640
+ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview" | "mainFields" | "extensions"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr" | "mainFields" | "extensions">> & {
1641
+ /**
1642
+ * The name of the environment
1643
+ */
1644
+ name: string;
1645
+ /**
1646
+ * Configuration options for the preview server
1647
+ */
1648
+ preview?: ResolvedPreviewOptions;
1649
+ };
1650
+ type LintResolvedConfig = Required<LintConfig>;
1651
+ type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
1652
+ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
1653
+ assets: ResolvedAssetGlob[];
1654
+ }>;
1655
+ /**
1656
+ * The resolved options for the Powerlines project configuration.
1657
+ */
1658
+ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "build" | "transform" | "override" | "root" | "variant" | "type" | "output" | "logLevel"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "build" | "transform" | "override">> & {
1659
+ /**
1660
+ * The configuration options that were provided inline to the Powerlines CLI.
1661
+ */
1662
+ inlineConfig: InlineConfig<TUserConfig>;
1663
+ /**
1664
+ * The original configuration options that were provided by the user to the Powerlines process.
1665
+ */
1666
+ userConfig: TUserConfig;
1667
+ /**
1668
+ * A string identifier for the Powerlines command being executed.
1669
+ */
1670
+ command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
1671
+ /**
1672
+ * The root directory of the project's source code
1673
+ *
1674
+ * @defaultValue "\{projectRoot\}/src"
1675
+ */
1676
+ sourceRoot: NonUndefined<TUserConfig["sourceRoot"]>;
1677
+ /**
1678
+ * The root directory of the project.
1679
+ */
1680
+ projectRoot: NonUndefined<TUserConfig["root"]>;
1681
+ /**
1682
+ * The type of project being built.
1683
+ */
1684
+ projectType: NonUndefined<TUserConfig["type"]>;
1685
+ /**
1686
+ * The output configuration options to use for the build process
1687
+ */
1688
+ output: OutputResolvedConfig;
1689
+ /**
1690
+ * The linting configuration options to use for the build process
1691
+ */
1692
+ lint: LintResolvedConfig | false;
1693
+ /**
1694
+ * The log level to use for the Powerlines processes.
1695
+ *
1696
+ * @defaultValue "info"
1697
+ */
1698
+ logLevel: LogLevelLabel | null;
1699
+ };
1700
+
1701
+ declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "release", "finalize"];
1702
+ type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
1703
+
1704
+ type PackageDependencyMeta = "dependency" | "devDependency" | {
1705
+ version?: string | Range;
1706
+ type?: "dependency" | "devDependency";
1707
+ };
1708
+ type PackageDependencies = Record<string, PackageDependencyMeta>;
1709
+ interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter | undefined = undefined> {
1710
+ /**
1711
+ * The order in which the plugin should be applied.
1712
+ */
1713
+ order?: "pre" | "post" | null | undefined;
1714
+ /**
1715
+ * A filter to determine when the hook should be called.
1716
+ */
1717
+ filter?: TFilter;
1718
+ /**
1719
+ * The hook function to be called.
1720
+ */
1721
+ handler: THookFunction;
1722
+ }
1723
+ type PluginHook<THookFunction extends FunctionLike, TFilter extends keyof HookFilter | undefined = undefined> = THookFunction | PluginHookObject<THookFunction, TFilter>;
1724
+ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
1725
+ /**
1726
+ * A function that returns configuration options to be merged with the build context's options.
1727
+ *
1728
+ * @remarks
1729
+ * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
1730
+ *
1731
+ * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.
1732
+ *
1733
+ * @see https://vitejs.dev/guide/api-plugin#config
1734
+ *
1735
+ * @param this - The build context.
1736
+ * @param config - The partial configuration object to be modified.
1737
+ * @returns A promise that resolves to a partial configuration object.
1738
+ */
1739
+ config: (this: Context<TContext["config"]>) => MaybePromise<Partial<TContext["config"]["userConfig"]>>;
1740
+ /**
1741
+ * Modify environment configs before it's resolved. The hook can either mutate the passed-in environment config directly, or return a partial config object that will be deeply merged into existing config.
1742
+ *
1743
+ * @remarks
1744
+ * This hook is called for each environment with a partially resolved environment config that already accounts for the default environment config values set at the root level. If plugins need to modify the config of a given environment, they should do it in this hook instead of the config hook. Leaving the config hook only for modifying the root default environment config.
1745
+ *
1746
+ * @see https://vitejs.dev/guide/api-plugin#configenvironment
1747
+ *
1748
+ * @param this - The build context.
1749
+ * @param name - The name of the environment being configured.
1750
+ * @param environment - The Vite-like environment object containing information about the current build environment.
1751
+ * @returns A promise that resolves when the hook is complete.
1752
+ */
1753
+ configEnvironment: (this: TContext, name: string, environment: EnvironmentConfig) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;
1754
+ /**
1755
+ * A hook that is called when the plugin is resolved.
1756
+ *
1757
+ * @see https://vitejs.dev/guide/api-plugin#configresolved
1758
+ *
1759
+ * @param this - The build context.
1760
+ * @returns A promise that resolves when the hook is complete.
1761
+ */
1762
+ configResolved: (this: TContext) => MaybePromise<void>;
1763
+ /**
1764
+ * A hook that is called at the start of the build process.
1765
+ *
1766
+ * @param this - The build context and unplugin build context.
1767
+ * @returns A promise that resolves when the hook is complete.
1768
+ */
1769
+ buildStart: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
1770
+ /**
1771
+ * A hook that is called at the end of the build process.
1772
+ *
1773
+ * @param this - The build context and unplugin build context.
1774
+ * @returns A promise that resolves when the hook is complete.
1775
+ */
1776
+ buildEnd: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
1777
+ /**
1778
+ * A hook that is called to transform the source code.
1779
+ *
1780
+ * @param this - The build context, unplugin build context, and unplugin context.
1781
+ * @param code - The source code to transform.
1782
+ * @param id - The identifier of the source code.
1783
+ * @returns A promise that resolves when the hook is complete.
1784
+ */
1785
+ transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
1786
+ /**
1787
+ * A hook that is called to load the source code.
1788
+ *
1789
+ * @param this - The build context, unplugin build context, and unplugin context.
1790
+ * @param id - The identifier of the source code.
1791
+ * @returns A promise that resolves when the hook is complete.
1792
+ */
1793
+ load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
1794
+ /**
1795
+ * A hook that is called to resolve the identifier of the source code.
1796
+ *
1797
+ * @param this - The build context, unplugin build context, and unplugin context.
1798
+ * @param id - The identifier of the source code.
1799
+ * @param importer - The importer of the source code.
1800
+ * @param options - The options for resolving the identifier.
1801
+ * @returns A promise that resolves when the hook is complete.
1802
+ */
1803
+ resolveId: (this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
1804
+ isEntry: boolean;
1805
+ }) => MaybePromise<string | ExternalIdResult | null | undefined>;
1806
+ /**
1807
+ * A hook that is called to write the bundle to disk.
1808
+ *
1809
+ * @param this - The build context.
1810
+ * @returns A promise that resolves when the hook is complete.
1811
+ */
1812
+ writeBundle: (this: TContext) => MaybePromise<void>;
1813
+ }
1814
+ type BuildPlugin<TContext extends PluginContext = PluginContext, TBuildVariant extends UnpluginBuildVariant = UnpluginBuildVariant, TOptions extends Required<UnpluginOptions>[TBuildVariant] = Required<UnpluginOptions>[TBuildVariant]> = {
1815
+ [TKey in keyof TOptions]: TOptions[TKey] extends FunctionLike ? (this: ThisParameterType<TOptions[TKey]> & TContext, ...args: Parameters<TOptions[TKey]>) => ReturnType<TOptions[TKey]> | MaybePromise<ReturnType<TOptions[TKey]>> : TOptions[TKey];
1816
+ };
1817
+ type PluginHooks<TContext extends PluginContext = PluginContext> = {
1818
+ [TKey in keyof BasePluginHookFunctions<TContext>]: PluginHook<BasePluginHookFunctions<TContext>[TKey]>;
1819
+ } & {
1820
+ /**
1821
+ * A function that returns configuration options to be merged with the build context's options.
1822
+ *
1823
+ * @remarks
1824
+ * Modify config before it's resolved. The hook can either mutate {@link Context.config} on the passed-in context directly, or return a partial config object that will be deeply merged into existing config.
1825
+ *
1826
+ * @warning User plugins are resolved before running this hook so injecting other plugins inside the config hook will have no effect. If you want to add plugins, consider doing so in the {@link Plugin.dependsOn} property instead.
1827
+ *
1828
+ * @see https://vitejs.dev/guide/api-plugin#config
1829
+ *
1830
+ * @param this - The build context.
1831
+ * @param config - The partial configuration object to be modified.
1832
+ * @returns A promise that resolves to a partial configuration object.
1833
+ */
1834
+ config: PluginHook<(this: Context<TContext["config"]>) => MaybePromise<Partial<TContext["config"]["userConfig"]>>> | Partial<TContext["config"]["userConfig"]>;
1835
+ /**
1836
+ * A hook that is called to transform the source code.
1837
+ *
1838
+ * @param this - The build context, unplugin build context, and unplugin context.
1839
+ * @param code - The source code to transform.
1840
+ * @param id - The identifier of the source code.
1841
+ * @returns A promise that resolves when the hook is complete.
1842
+ */
1843
+ transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
1844
+ /**
1845
+ * A hook that is called to load the source code.
1846
+ *
1847
+ * @param this - The build context, unplugin build context, and unplugin context.
1848
+ * @param id - The identifier of the source code.
1849
+ * @returns A promise that resolves when the hook is complete.
1850
+ */
1851
+ load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
1852
+ /**
1853
+ * A hook that is called to resolve the identifier of the source code.
1854
+ *
1855
+ * @param this - The build context, unplugin build context, and unplugin context.
1856
+ * @param id - The identifier of the source code.
1857
+ * @param importer - The importer of the source code.
1858
+ * @param options - The options for resolving the identifier.
1859
+ * @returns A promise that resolves when the hook is complete.
1860
+ */
1861
+ resolveId: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
1862
+ isEntry: boolean;
1863
+ }) => MaybePromise<string | ExternalIdResult | null | undefined>, "id">;
1864
+ };
1865
+ type PluginBuildPlugins<TContext extends PluginContext = PluginContext> = {
1866
+ [TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<TContext, TBuildVariant>;
1867
+ };
1868
+ interface Plugin<in out TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>> extends Partial<PluginHooks<TContext>>, PluginBuildPlugins<TContext> {
1869
+ /**
1870
+ * The name of the plugin, for use in deduplication, error messages and logs.
1871
+ */
1872
+ name: string;
1873
+ /**
1874
+ * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.
1875
+ *
1876
+ * @remarks
1877
+ * The Plugin invocation order is as follows:
1878
+ * - `enforce: 'pre'` plugins
1879
+ * - `order: 'pre'` plugin hooks
1880
+ * - any other plugins (normal)
1881
+ * - `order: 'post'` plugin hooks
1882
+ * - `enforce: 'post'` plugins
1883
+ *
1884
+ * @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering
1885
+ * @see https://rollupjs.org/plugin-development/#build-hooks
1886
+ * @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post
1887
+ * @see https://esbuild.github.io/plugins/#concepts
1888
+ */
1889
+ enforce?: "pre" | "post";
1890
+ /**
1891
+ * A function to determine if two plugins are the same and can be de-duplicated.
1892
+ *
1893
+ * @remarks
1894
+ * If this is not provided, the plugin will not be de-duplicated.
1895
+ *
1896
+ * @param other - The other plugin to compare against.
1897
+ * @returns `true` if the two plugins are the same, `false` otherwise.
1898
+ */
1899
+ dedupe?: false | ((other: PluginConfig<any>) => boolean);
1900
+ /**
1901
+ * A list of pre-requisite plugins that must be loaded before this plugin can be used.
1902
+ */
1903
+ dependsOn?: PluginConfig<TContext>[];
1904
+ /**
1905
+ * Define environments where this plugin should be active. By default, the plugin is active in all environments.
1906
+ *
1907
+ * @param environment - The environment to check.
1908
+ * @returns `true` if the plugin should be active in the specified environment, `false` otherwise.
1909
+ */
1910
+ applyToEnvironment?: (environment: EnvironmentResolvedConfig) => MaybePromise<boolean | Plugin<any>>;
1911
+ }
1912
+
1913
+ type ReflectionMode = "default" | "explicit" | "never";
1914
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
1915
+ /**
1916
+ * Defines the level of reflection to be used during the transpilation process.
1917
+ *
1918
+ * @remarks
1919
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
1920
+ * - `minimal` - Only the essential type information is captured.
1921
+ * - `normal` - Additional type information is captured, including some contextual data.
1922
+ * - `verbose` - All available type information is captured, including detailed contextual data.
1923
+ */
1924
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
1925
+ interface DeepkitOptions {
1926
+ /**
1927
+ * Either true to activate reflection for all files compiled using this tsconfig,
1928
+ * or a list of globs/file paths relative to this tsconfig.json.
1929
+ * Globs/file paths can be prefixed with a ! to exclude them.
1930
+ */
1931
+ reflection?: RawReflectionMode;
1932
+ /**
1933
+ * Defines the level of reflection to be used during the transpilation process.
1934
+ *
1935
+ * @remarks
1936
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
1937
+ * - `minimal` - Only the essential type information is captured.
1938
+ * - `normal` - Additional type information is captured, including some contextual data.
1939
+ * - `verbose` - All available type information is captured, including detailed contextual data.
1940
+ */
1941
+ reflectionLevel?: ReflectionLevel;
1942
+ }
1943
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
1944
+ /**
1945
+ * The TypeScript compiler configuration.
1946
+ *
1947
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
1948
+ */
1949
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
1950
+ /**
1951
+ * Either true to activate reflection for all files compiled using this tsconfig,
1952
+ * or a list of globs/file paths relative to this tsconfig.json.
1953
+ * Globs/file paths can be prefixed with a ! to exclude them.
1954
+ */
1955
+ reflection?: RawReflectionMode;
1956
+ /**
1957
+ * Defines the level of reflection to be used during the transpilation process.
1958
+ *
1959
+ * @remarks
1960
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
1961
+ * - `minimal` - Only the essential type information is captured.
1962
+ * - `normal` - Additional type information is captured, including some contextual data.
1963
+ * - `verbose` - All available type information is captured, including detailed contextual data.
1964
+ */
1965
+ reflectionLevel?: ReflectionLevel;
1966
+ /**
1967
+ * Instructs the TypeScript compiler how to compile `.ts` files.
1968
+ */
1969
+ compilerOptions?: TSCompilerOptions;
1970
+ }
1971
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
1972
+ originalTsconfigJson: TsConfigJson;
1973
+ tsconfigJson: TSConfig;
1974
+ tsconfigFilePath: string;
1975
+ };
1976
+
1977
+ declare const __VFS_INIT__ = "__VFS_INIT__";
1978
+ declare const __VFS_REVERT__ = "__VFS_REVERT__";
1979
+ declare const __VFS_CACHE__ = "__VFS_CACHE__";
1980
+ declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
1981
+ declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
1982
+ interface VirtualFile {
1983
+ /**
1984
+ * A virtual path to the file in the virtual file system.
1985
+ */
1986
+ path: string;
1987
+ /**
1988
+ * The contents of the virtual file.
1989
+ */
1990
+ contents: string;
1991
+ }
1992
+ interface VirtualBuiltinFile extends VirtualFile {
1993
+ /**
1994
+ * The unique identifier for the virtual file.
1995
+ *
1996
+ * @remarks
1997
+ * This property is read-only and is set when the file is created.
1998
+ */
1999
+ id: string;
2000
+ }
2001
+ type OutputModeType = "fs" | "virtual";
2002
+ interface ResolveFSOptions {
2003
+ mode?: OutputModeType;
2004
+ }
2005
+ type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
2006
+ interface ResolvePathOptions extends ResolveFSOptions {
2007
+ /**
2008
+ * Should the resolved path include the file extension?
2009
+ *
2010
+ * @defaultValue true
2011
+ */
2012
+ withExtension?: boolean;
2013
+ /**
2014
+ * The paths to search for the file.
2015
+ */
2016
+ paths?: string[];
2017
+ /**
2018
+ * The type of the path to resolve.
2019
+ */
2020
+ type?: "file" | "directory";
2021
+ }
2022
+ type WriteFileOptions = WriteFileOptions$1 & ResolveFSOptions;
2023
+ interface WriteBuiltinFileOptions extends ResolveFSOptions {
2024
+ skipFormat?: boolean;
2025
+ }
2026
+ interface VirtualFileSystemInterface {
2027
+ [__VFS_INIT__]: () => void;
2028
+ [__VFS_REVERT__]: () => void;
2029
+ /**
2030
+ * The underlying builtin module Ids.
2031
+ */
2032
+ builtinIdMap: Map<string, string>;
2033
+ /**
2034
+ * Checks if a path or ID corresponds to a builtin file.
2035
+ *
2036
+ * @param id - The id of the builtin file to check against.
2037
+ * @param pathOrId - The path or id of the file to check.
2038
+ * @returns Whether the path or ID corresponds to a builtin file.
2039
+ */
2040
+ isMatchingBuiltinId: (id: string, pathOrId: string) => boolean;
2041
+ /**
2042
+ * Checks if a provided string is a valid builtin ID (does not need to already be created in the file system).
2043
+ *
2044
+ * @param id - The ID to check.
2045
+ * @returns Whether the ID is a valid builtin ID.
2046
+ */
2047
+ isValidBuiltinId: (id: string) => boolean;
2048
+ /**
2049
+ * Check if a path or ID corresponds to a virtual file.
2050
+ *
2051
+ * @param pathOrId - The path or ID to check.
2052
+ * @param options - Optional parameters for resolving the path.
2053
+ * @returns Whether the path or ID corresponds to a virtual file.
2054
+ */
2055
+ isVirtualFile: (pathOrId: string, options?: ResolvePathOptions) => boolean;
2056
+ /**
2057
+ * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
2058
+ *
2059
+ * @see https://www.typescriptlang.org/tsconfig#paths
2060
+ *
2061
+ * @param pathOrId - The path or ID to check.
2062
+ * @returns Whether the path or ID corresponds to a virtual file.
2063
+ */
2064
+ isTsconfigPath: (pathOrId: string) => boolean;
2065
+ /**
2066
+ * Checks if a given path or ID corresponds to a builtin module file.
2067
+ */
2068
+ isBuiltinFile: (pathOrID: string, options?: ResolvePathOptions) => boolean;
2069
+ /**
2070
+ * Returns a list of builtin module files in the virtual file system.
2071
+ */
2072
+ listBuiltinFiles: () => Promise<VirtualBuiltinFile[]>;
2073
+ /**
2074
+ * Checks if a file exists in the virtual file system (VFS).
2075
+ */
2076
+ existsSync: (pathOrId: string) => boolean;
2077
+ /**
2078
+ * Checks if a file exists in the virtual file system (VFS).
2079
+ *
2080
+ * @param path - The path of the file to check.
2081
+ * @returns `true` if the file exists, otherwise `false`.
2082
+ */
2083
+ fileExistsSync: (path: string) => boolean;
2084
+ /**
2085
+ * Checks if a directory exists in the virtual file system (VFS).
2086
+ *
2087
+ * @param path - The path of the directory to check.
2088
+ * @returns `true` if the directory exists, otherwise `false`.
2089
+ */
2090
+ directoryExistsSync: (path: string) => boolean;
2091
+ /**
2092
+ * Checks if a path exists in the virtual file system (VFS).
2093
+ *
2094
+ * @param path - The path to check.
2095
+ * @returns `true` if the path exists, otherwise `false`.
2096
+ */
2097
+ pathExistsSync: (path: string) => boolean;
2098
+ /**
2099
+ * Gets the stats of a file in the virtual file system (VFS).
2100
+ *
2101
+ * @param pathOrId - The path or id of the file.
2102
+ * @param options - Optional parameters for getting the stats.
2103
+ * @returns The stats of the file if it exists, otherwise undefined.
2104
+ */
2105
+ lstat: (pathOrId: string, options?: StatSyncOptions & {
2106
+ bigint?: false | undefined;
2107
+ throwIfNoEntry: false;
2108
+ }) => Promise<Stats>;
2109
+ /**
2110
+ * Gets the stats of a file in the virtual file system (VFS).
2111
+ *
2112
+ * @param pathOrId - The path or id of the file.
2113
+ * @param options - Optional parameters for getting the stats.
2114
+ * @returns The stats of the file if it exists, otherwise undefined.
2115
+ */
2116
+ lstatSync: (pathOrId: string, options?: StatSyncOptions & {
2117
+ bigint?: false | undefined;
2118
+ throwIfNoEntry: false;
2119
+ }) => Stats | undefined;
2120
+ /**
2121
+ * Gets the stats of a file in the virtual file system (VFS).
2122
+ *
2123
+ * @param pathOrId - The path or id of the file.
2124
+ * @returns The stats of the file if it exists, otherwise false.
2125
+ */
2126
+ stat: (pathOrId: string, options?: StatSyncOptions & {
2127
+ bigint?: false | undefined;
2128
+ throwIfNoEntry: false;
2129
+ }) => Promise<Stats>;
2130
+ /**
2131
+ * Gets the stats of a file in the virtual file system (VFS).
2132
+ *
2133
+ * @param pathOrId - The path or id of the file.
2134
+ * @returns The stats of the file if it exists, otherwise false.
2135
+ */
2136
+ statSync: (pathOrId: string, options?: StatSyncOptions & {
2137
+ bigint?: false | undefined;
2138
+ throwIfNoEntry: false;
2139
+ }) => Stats | undefined;
2140
+ /**
2141
+ * Lists files in a given path.
2142
+ *
2143
+ * @param path - The path to list files from.
2144
+ * @param options - Options for listing files, such as encoding and recursion.
2145
+ * @returns An array of file names in the specified path.
2146
+ */
2147
+ readdirSync: (path: string, options?: {
2148
+ encoding: BufferEncoding | null;
2149
+ withFileTypes?: false | undefined;
2150
+ recursive?: boolean | undefined;
2151
+ } | BufferEncoding) => string[];
2152
+ /**
2153
+ * Lists files in a given path.
2154
+ *
2155
+ * @param path - The path to list files from.
2156
+ * @param options - Options for listing files, such as encoding and recursion.
2157
+ * @returns An array of file names in the specified path.
2158
+ */
2159
+ readdir: (path: string, options?: {
2160
+ encoding: BufferEncoding | null;
2161
+ withFileTypes?: false | undefined;
2162
+ recursive?: boolean | undefined;
2163
+ } | BufferEncoding) => Promise<string[]>;
2164
+ /**
2165
+ * Removes a file or symbolic link in the virtual file system (VFS).
2166
+ *
2167
+ * @param path - The path to the file to remove.
2168
+ * @returns A promise that resolves when the file is removed.
2169
+ */
2170
+ unlinkSync: (path: PathLike, options?: ResolveFSOptions) => void;
2171
+ /**
2172
+ * Asynchronously removes a file or symbolic link in the virtual file system (VFS).
2173
+ *
2174
+ * @param path - The path to the file to remove.
2175
+ * @returns A promise that resolves when the file is removed.
2176
+ */
2177
+ unlink: (path: string, options?: ResolveFSOptions) => Promise<void>;
2178
+ /**
2179
+ * Removes a directory in the virtual file system (VFS).
2180
+ *
2181
+ * @param path - The path to create the directory at.
2182
+ * @param options - Options for creating the directory.
2183
+ */
2184
+ rmdirSync: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => any;
2185
+ /**
2186
+ * Removes a directory in the virtual file system (VFS).
2187
+ *
2188
+ * @param path - The path to create the directory at.
2189
+ * @param options - Options for creating the directory.
2190
+ * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
2191
+ */
2192
+ rmdir: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
2193
+ /**
2194
+ * Removes a file in the virtual file system (VFS).
2195
+ *
2196
+ * @param path - The path to the file to remove.
2197
+ * @param options - Options for removing the file.
2198
+ * @returns A promise that resolves when the file is removed.
2199
+ */
2200
+ rm: (path: PathLike, options?: RmOptions & ResolveFSOptions) => Promise<void>;
2201
+ /**
2202
+ * Creates a directory in the virtual file system (VFS).
2203
+ *
2204
+ * @param path - The path to create the directory at.
2205
+ * @param options - Options for creating the directory.
2206
+ * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
2207
+ */
2208
+ mkdirSync: (path: PathLike, options?: MakeDirectoryOptions) => string | undefined;
2209
+ /**
2210
+ * Creates a directory in the virtual file system (VFS).
2211
+ *
2212
+ * @param path - The path to create the directory at.
2213
+ * @param options - Options for creating the directory.
2214
+ * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
2215
+ */
2216
+ mkdir: (path: PathLike, options?: MakeDirectoryOptions) => Promise<string | undefined>;
2217
+ /**
2218
+ * Reads a file from the virtual file system (VFS).
2219
+ *
2220
+ * @param pathOrId - The path or id of the file.
2221
+ * @returns The contents of the file if it exists, otherwise undefined.
2222
+ */
2223
+ readFile: (pathOrId: string) => Promise<string | undefined>;
2224
+ /**
2225
+ * Reads a file from the virtual file system (VFS).
2226
+ *
2227
+ * @param pathOrId - The path or id of the file.
2228
+ */
2229
+ readFileSync: (pathOrId: string) => string | undefined;
2230
+ /**
2231
+ * Writes a file to the virtual file system (VFS).
2232
+ *
2233
+ * @param file - The path to the file.
2234
+ * @param data - The contents of the file.
2235
+ * @param options - Optional parameters for writing the file.
2236
+ * @returns A promise that resolves when the file is written.
2237
+ */
2238
+ writeFile: (file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions) => Promise<void>;
2239
+ /**
2240
+ * Writes a file to the virtual file system (VFS).
2241
+ *
2242
+ * @param file - The path to the file.
2243
+ * @param data - The contents of the file.
2244
+ * @param options - Optional parameters for writing the file.
2245
+ */
2246
+ writeFileSync: (file: PathOrFileDescriptor, data: string | NodeJS.ArrayBufferView, options?: WriteFileOptions) => void;
2247
+ /**
2248
+ * Adds a builtin module file to the virtual file system.
2249
+ *
2250
+ * @param id - The unique identifier for the builtin module file.
2251
+ * @param path - The path to the builtin module file.
2252
+ * @param contents - The contents of the builtin module file.
2253
+ * @param options - Optional parameters for writing the builtin module file.
2254
+ */
2255
+ writeBuiltinFile: (id: string, path: string, contents: string, options?: WriteBuiltinFileOptions) => Promise<void>;
2256
+ /**
2257
+ * Adds an entry file to the virtual file system.
2258
+ *
2259
+ * @param name - The unique identifier for the entry file.
2260
+ * @param contents - The contents of the entry file.
2261
+ * @param options - Optional parameters for writing the entry file.
2262
+ */
2263
+ writeEntryFile: (name: string, contents: string, options?: WriteBuiltinFileOptions) => Promise<void>;
2264
+ /**
2265
+ * Writes a file to disk from the physical file system (on disk).
2266
+ *
2267
+ * @param path - The path to the file to write.
2268
+ * @param contents - The contents of the file to write.
2269
+ * @param options - Optional parameters for writing the file.
2270
+ * @returns A promise that resolves when the file is written.
2271
+ */
2272
+ writeFileToDisk: (path: string, contents: string, options?: {
2273
+ skipFormat?: boolean;
2274
+ }) => Promise<void>;
2275
+ /**
2276
+ * Resolves a path or ID to a file path in the virtual file system.
2277
+ *
2278
+ * @param pathOrId - The path or id of the file to resolve.
2279
+ * @param options - Optional parameters for resolving the path.
2280
+ * @returns The resolved path of the file if it exists, otherwise false.
2281
+ */
2282
+ resolvePath: (pathOrId: string, options?: ResolvePathOptions) => string | false;
2283
+ /**
2284
+ * Resolves a path or ID to a file path in the virtual file system.
2285
+ *
2286
+ * @param pathOrId - The path or id of the file to resolve.
2287
+ * @returns The resolved path of the file if it exists, otherwise false.
2288
+ */
2289
+ realpathSync: (pathOrId: string) => string;
2290
+ /**
2291
+ * Resolves a path or ID to a builtin module file id in the virtual file system.
2292
+ *
2293
+ * @param pathOrId - The path or id of the file to resolve.
2294
+ * @param paths - Optional array of paths to search for the file.
2295
+ * @returns The resolved id of the builtin module file if it exists, otherwise false.
2296
+ */
2297
+ resolveId: (pathOrId: string) => string | false;
2298
+ /**
2299
+ * Resolves a path based on TypeScript's `tsconfig.json` paths.
2300
+ *
2301
+ * @see https://www.typescriptlang.org/tsconfig#paths
2302
+ *
2303
+ * @param path - The path to check.
2304
+ * @returns The resolved file path if it exists, otherwise undefined.
2305
+ */
2306
+ resolveTsconfigPath: (path: string) => string | false;
2307
+ /**
2308
+ * Resolves a package name based on TypeScript's `tsconfig.json` paths.
2309
+ *
2310
+ * @see https://www.typescriptlang.org/tsconfig#paths
2311
+ *
2312
+ * @param path - The path to check.
2313
+ * @returns The resolved package name if it exists, otherwise undefined.
2314
+ */
2315
+ resolveTsconfigPathPackage: (path: string) => string | false;
2316
+ /**
2317
+ * A map of cached file paths to their underlying file content.
2318
+ */
2319
+ [__VFS_CACHE__]: Map<string, string>;
2320
+ /**
2321
+ * A reference to the underlying virtual file system.
2322
+ */
2323
+ [__VFS_VIRTUAL__]: Volume;
2324
+ /**
2325
+ * A reference to the underlying unified file system.
2326
+ */
2327
+ [__VFS_UNIFIED__]: IUnionFs;
2328
+ }
2329
+
2330
+ interface MetaInfo {
2331
+ /**
2332
+ * The checksum generated from the resolved options
2333
+ */
2334
+ checksum: string;
2335
+ /**
2336
+ * The build id
2337
+ */
2338
+ buildId: string;
2339
+ /**
2340
+ * The release id
2341
+ */
2342
+ releaseId: string;
2343
+ /**
2344
+ * The build timestamp
2345
+ */
2346
+ timestamp: number;
2347
+ /**
2348
+ * A hash that represents the path to the project root directory
2349
+ */
2350
+ projectRootHash: string;
2351
+ /**
2352
+ * A hash that represents the path to the project root directory
2353
+ */
2354
+ configHash: string;
2355
+ /**
2356
+ * A mapping of runtime ids to their corresponding file paths
2357
+ */
2358
+ builtinIdMap: Record<string, string>;
2359
+ /**
2360
+ * A mapping of virtual file paths to their corresponding file contents
2361
+ */
2362
+ virtualFiles: Record<string, string | null>;
2363
+ }
2364
+ interface Resolver extends Jiti {
2365
+ plugin: Jiti;
2366
+ }
2367
+ type Reflection<T extends Record<string, any> = Record<string, any>> = ReflectionClass<T> & {
2368
+ dataBuffer?: ArrayBuffer;
2369
+ messageRoot?: SerializedTypes;
2370
+ };
2371
+ type ReflectionRecord<T extends Record<string, any> = Record<string, any>> = Record<string, Reflection<T>>;
2372
+ interface InitContextOptions {
2373
+ /**
2374
+ * If false, the plugin will be loaded after all other plugins.
2375
+ *
2376
+ * @defaultValue true
2377
+ */
2378
+ isHighPriority: boolean;
2379
+ }
2380
+ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
2381
+ /**
2382
+ * The Storm workspace configuration
2383
+ */
2384
+ workspaceConfig: WorkspaceConfig;
2385
+ /**
2386
+ * An object containing the options provided to Powerlines
2387
+ */
2388
+ config: TResolvedConfig;
2389
+ /**
2390
+ * A logging function for the Powerlines engine
2391
+ */
2392
+ log: LogFn;
2393
+ /**
2394
+ * The metadata information
2395
+ */
2396
+ meta: MetaInfo;
2397
+ /**
2398
+ * The metadata information currently written to disk
2399
+ */
2400
+ persistedMeta?: MetaInfo;
2401
+ /**
2402
+ * The reflections found and used by Powerlines plugins
2403
+ *
2404
+ * @remarks
2405
+ * These reflections are used by plugins to store data that will be passed around the Powerlines processes. Please note: these values are not persisted to disk by default.
2406
+ */
2407
+ reflections: {
2408
+ [P in keyof unknown]: ReflectionRecord;
2409
+ };
2410
+ /**
2411
+ * The parsed TypeScript configuration from the `tsconfig.json` file
2412
+ */
2413
+ tsconfig: ParsedTypeScriptConfig;
2414
+ /**
2415
+ * The entry points of the source code
2416
+ */
2417
+ entry: ResolvedEntryTypeDefinition[];
2418
+ /**
2419
+ * The relative path to the Powerlines workspace root directory
2420
+ */
2421
+ relativeToWorkspaceRoot: string;
2422
+ /**
2423
+ * The path to the \powerlines package
2424
+ *
2425
+ * @remarks
2426
+ * This is used to determine the path to the Powerlines core package, which contains the runtime files.
2427
+ */
2428
+ corePackagePath: string;
2429
+ /**
2430
+ * The Powerlines artifacts directory
2431
+ */
2432
+ artifactsPath: string;
2433
+ /**
2434
+ * The path to the Powerlines builtin runtime modules directory
2435
+ */
2436
+ builtinsPath: string;
2437
+ /**
2438
+ * The path to the Powerlines entry modules directory
2439
+ */
2440
+ entryPath: string;
2441
+ /**
2442
+ * The path to the Powerlines TypeScript declaration files directory
2443
+ */
2444
+ dtsPath: string;
2445
+ /**
2446
+ * The path to a directory where the reflection data buffers (used by the build processes) are stored
2447
+ */
2448
+ dataPath: string;
2449
+ /**
2450
+ * The path to a directory where the project cache (used by the build processes) is stored
2451
+ */
2452
+ cachePath: string;
2453
+ /**
2454
+ * The Powerlines environment paths
2455
+ */
2456
+ envPaths: EnvPaths;
2457
+ /**
2458
+ * The installations required by the project
2459
+ */
2460
+ dependencies: PackageDependencies;
2461
+ /**
2462
+ * The project's `package.json` file content
2463
+ */
2464
+ packageJson: PackageJson;
2465
+ /**
2466
+ * The project's `project.json` file content
2467
+ */
2468
+ projectJson?: Record<string, any>;
2469
+ /**
2470
+ * The virtual file system manager used during the build process to reference generated runtime files
2471
+ */
2472
+ fs: VirtualFileSystemInterface;
2473
+ /**
2474
+ * The Jiti module resolver
2475
+ */
2476
+ resolver: Resolver;
2477
+ /**
2478
+ * A function to update the context fields using a new user configuration options
2479
+ */
2480
+ withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
2481
+ /**
2482
+ * A function to update the context fields using inline configuration options
2483
+ */
2484
+ withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
2485
+ /**
2486
+ * Create a new logger instance
2487
+ *
2488
+ * @param name - The name to use for the logger instance
2489
+ * @returns A logger function
2490
+ */
2491
+ createLog: (name: string | null) => LogFn;
2492
+ /**
2493
+ * Extend the current logger instance with a new name
2494
+ *
2495
+ * @param name - The name to use for the extended logger instance
2496
+ * @returns A logger function
2497
+ */
2498
+ extendLog: (name: string) => LogFn;
2499
+ }
2500
+ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
2501
+ /**
2502
+ * The environment specific resolved configuration
2503
+ */
2504
+ environment: EnvironmentResolvedConfig;
2505
+ /**
2506
+ * An alternative property name for the {@link log} property
2507
+ *
2508
+ * @remarks
2509
+ * This is provided for compatibility with other logging libraries that expect a `logger` property.
2510
+ */
2511
+ logger: LogFn;
2512
+ }
2513
+ type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & UnpluginBuildContext;
2514
+
2515
+ type BabelPluginPass<TState = unknown> = PluginPass & TState;
2516
+ type BabelTransformPluginFilter = (code: string, id: string) => boolean;
2517
+ type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
2518
+ name: string;
2519
+ log: LogFn;
2520
+ api: BabelAPI;
2521
+ options: TOptions;
2522
+ context: TContext;
2523
+ dirname: string;
2524
+ }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
2525
+ $$name: string;
2526
+ };
2527
+ type BabelTransformPluginOptions<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = PluginItem | BabelTransformPlugin<TContext, TOptions, TState> | [BabelTransformPlugin<TContext, TOptions, TState>, TOptions] | [
2528
+ BabelTransformPlugin<TContext, TOptions, TState>,
2529
+ TOptions,
2530
+ BabelTransformPluginFilter
2531
+ ];
2532
+
2533
+ type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
2534
+ /**
2535
+ * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
2536
+ */
2537
+ type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
2538
+ type PluginFactory<TProps = unknown, in out TContext extends PluginContext = PluginContext> = (options: TProps) => Plugin<TContext>;
2539
+ /**
2540
+ * A configuration tuple for a Powerlines plugin.
2541
+ */
2542
+ type PluginConfigTuple<TProps = unknown, TContext extends PluginContext = PluginContext> = [string | PluginFactory<TProps, TContext>, TProps] | [Plugin<TContext>];
2543
+ /**
2544
+ * A configuration object for a Powerlines plugin.
2545
+ */
2546
+ type PluginConfigObject<TProps = unknown, TContext extends PluginContext = PluginContext> = {
2547
+ plugin: string | PluginFactory<TProps, TContext>;
2548
+ options: TProps;
2549
+ } | {
2550
+ plugin: Plugin<TContext>;
2551
+ options?: never;
2552
+ };
2553
+ /**
2554
+ * A configuration tuple for a Powerlines plugin.
2555
+ */
2556
+ type PluginConfig<TContext extends PluginContext = PluginContext, TProps = unknown> = string | PluginFactory<void, TContext> | Plugin<TContext> | PluginConfigTuple<TProps> | PluginConfigObject<TProps>;
2557
+ type ProjectType = "application" | "library";
2558
+ type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
2559
+ /**
2560
+ * The Babel plugins to be used during the build process
2561
+ */
2562
+ plugins?: BabelTransformPluginOptions[];
2563
+ /**
2564
+ * The Babel presets to be used during the build process
2565
+ */
2566
+ presets?: BabelTransformPluginOptions[];
2567
+ };
2568
+ interface ESLintConfig {
2569
+ eslintOptions?: any;
2570
+ reportErrorsOnly?: boolean;
2571
+ maxWarnings?: number;
2572
+ formatter?: string | null;
2573
+ outputFile?: string | null;
2574
+ type?: "base" | "recommended" | "strict";
2575
+ }
2576
+ interface LintConfig {
2577
+ /**
2578
+ * Configuration options for ESLint
2579
+ */
2580
+ eslint?: ESLintConfig;
2581
+ }
2582
+ interface OutputConfig {
2583
+ /**
2584
+ * The path to output the final compiled files to
2585
+ *
2586
+ * @remarks
2587
+ * If a value is not provided, Powerlines will attempt to:
2588
+ * 1. Use the `outDir` value in the `tsconfig.json` file.
2589
+ * 2. Use the `dist` directory in the project root directory.
2590
+ *
2591
+ * @defaultValue "dist/\{projectRoot\}"
2592
+ */
2593
+ outputPath?: string;
2594
+ /**
2595
+ * The format of the output files
2596
+ *
2597
+ * @defaultValue "virtual"
2598
+ */
2599
+ mode?: OutputModeType;
2600
+ /**
2601
+ * The path of the generated runtime declaration file relative to the workspace root.
2602
+ *
2603
+ * @defaultValue "\{projectRoot\}/powerlines.d.ts"
2604
+ */
2605
+ dts?: string | false;
2606
+ /**
2607
+ * A prefix to use for identifying builtin modules
2608
+ *
2609
+ * @remarks
2610
+ * This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
2611
+ *
2612
+ * @defaultValue "powerlines"
2613
+ */
2614
+ builtinPrefix?: string;
2615
+ /**
2616
+ * The folder where the generated runtime modules/builtins will be located
2617
+ *
2618
+ * @remarks
2619
+ * This folder will contain all runtime modules and builtins generated during the "prepare" phase.
2620
+ *
2621
+ * @defaultValue "\{projectRoot\}/.powerlines"
2622
+ */
2623
+ runtimeFolder?: string;
2624
+ /**
2625
+ * The module format of the output files
2626
+ *
2627
+ * @remarks
2628
+ * This option can be a single format or an array of formats. If an array is provided, multiple builds will be generated for each format.
2629
+ *
2630
+ * @defaultValue "esm"
2631
+ */
2632
+ format?: Format | Format[];
2633
+ /**
2634
+ * A list of assets to copy to the output directory
2635
+ *
2636
+ * @remarks
2637
+ * The assets can be specified as a string (path to the asset) or as an object with a `glob` property (to match multiple files). The paths are relative to the project root directory.
2638
+ */
2639
+ assets?: Array<string | AssetGlob>;
2640
+ }
2641
+ interface TransformConfig {
2642
+ /**
2643
+ * The Babel configuration options to use for the build process
2644
+ */
2645
+ babel?: BabelUserConfig;
2646
+ /**
2647
+ * Reflection configuration options for the Deepkit TSC custom transformers
2648
+ *
2649
+ * @remarks
2650
+ * These options will be merged with the `tsconfig.json` file and the `tsconfigRaw` options.
2651
+ */
2652
+ deepkit?: DeepkitOptions;
2653
+ }
2654
+ interface BaseConfig {
2655
+ /**
2656
+ * The name of the project
2657
+ */
2658
+ name?: string;
2659
+ /**
2660
+ * The project display title
2661
+ *
2662
+ * @remarks
2663
+ * This option is used in documentation generation and other places where a human-readable title is needed.
2664
+ */
2665
+ title?: string;
2666
+ /**
2667
+ * A description of the project
2668
+ *
2669
+ * @remarks
2670
+ * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
2671
+ */
2672
+ description?: string;
2673
+ /**
2674
+ * The log level to use for the Powerlines processes.
2675
+ *
2676
+ * @defaultValue "info"
2677
+ */
2678
+ logLevel?: LogLevelLabel | null;
2679
+ /**
2680
+ * A custom logger function to use for logging messages
2681
+ */
2682
+ customLogger?: LogFn;
2683
+ /**
2684
+ * Explicitly set a mode to run in. This mode will be used at various points throughout the Powerlines processes, such as when compiling the source code.
2685
+ *
2686
+ * @defaultValue "production"
2687
+ */
2688
+ mode?: "development" | "test" | "production";
2689
+ /**
2690
+ * The entry point(s) for the application
2691
+ */
2692
+ entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
2693
+ /**
2694
+ * Configuration for linting the source code
2695
+ */
2696
+ lint?: LintConfig | false;
2697
+ /**
2698
+ * Configuration for the output of the build process
2699
+ */
2700
+ output?: OutputConfig;
2701
+ /**
2702
+ * Configuration for the transformation of the source code
2703
+ */
2704
+ transform?: TransformConfig;
2705
+ /**
2706
+ * Options to to provide to the build process
2707
+ */
2708
+ build?: BuildConfig;
2709
+ /**
2710
+ * Configuration for documentation generation
2711
+ *
2712
+ * @remarks
2713
+ * This configuration will be used by the documentation generation plugins during the `docs` command.
2714
+ */
2715
+ docs?: Record<string, any>;
2716
+ /**
2717
+ * The path to the tsconfig file to be used by the compiler
2718
+ *
2719
+ * @remarks
2720
+ * If a value is not provided, the plugin will attempt to find the `tsconfig.json` file in the project root directory. The parsed tsconfig compiler options will be merged with the {@link Options.tsconfigRaw} value (if provided).
2721
+ *
2722
+ * @defaultValue "\{projectRoot\}/tsconfig.json"
2723
+ */
2724
+ tsconfig?: string;
2725
+ /**
2726
+ * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
2727
+ *
2728
+ * @see https://www.typescriptlang.org/tsconfig
2729
+ *
2730
+ * @remarks
2731
+ * If populated, this option takes higher priority than `tsconfig`
2732
+ */
2733
+ tsconfigRaw?: TSConfig;
2734
+ }
2735
+ interface EnvironmentConfig extends BaseConfig {
2736
+ /**
2737
+ * Array of strings indicating the order in which fields in a package.json file should be resolved to determine the entry point for a module.
2738
+ *
2739
+ * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
2740
+ */
2741
+ mainFields?: string[];
2742
+ /**
2743
+ * Array of strings indicating what conditions should be used for module resolution.
2744
+ */
2745
+ conditions?: string[];
2746
+ /**
2747
+ * Array of strings indicating what conditions should be used for external modules.
2748
+ */
2749
+ externalConditions?: string[];
2750
+ /**
2751
+ * Array of strings indicating what file extensions should be used for module resolution.
2752
+ *
2753
+ * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
2754
+ */
2755
+ extensions?: string[];
2756
+ /**
2757
+ * Array of strings indicating what modules should be deduplicated to a single version in the build.
2758
+ *
2759
+ * @remarks
2760
+ * This option is useful for ensuring that only one version of a module is included in the bundle, which can help reduce bundle size and avoid conflicts.
2761
+ */
2762
+ dedupe?: string[];
2763
+ /**
2764
+ * Array of strings or regular expressions that indicate what modules are builtin for the environment.
2765
+ */
2766
+ builtins?: (string | RegExp)[];
2767
+ /**
2768
+ * Configuration options for the preview server
2769
+ */
2770
+ preview?: PreviewOptions;
2771
+ /**
2772
+ * A flag indicating whether the build is for a Server-Side Rendering environment.
2773
+ */
2774
+ ssr?: boolean;
2775
+ /**
2776
+ * Define if this environment is used for Server-Side Rendering
2777
+ *
2778
+ * @defaultValue "server" (if it isn't the client environment)
2779
+ */
2780
+ consumer?: "client" | "server";
2781
+ }
2782
+ interface CommonUserConfig extends BaseConfig {
2783
+ /**
2784
+ * The type of project being built
2785
+ *
2786
+ * @defaultValue "application"
2787
+ */
2788
+ type?: ProjectType;
2789
+ /**
2790
+ * The root directory of the project
2791
+ */
2792
+ root: string;
2793
+ /**
2794
+ * The root directory of the project's source code
2795
+ *
2796
+ * @defaultValue "\{root\}/src"
2797
+ */
2798
+ sourceRoot?: string;
2799
+ /**
2800
+ * A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
2801
+ *
2802
+ * @remarks
2803
+ * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
2804
+ */
2805
+ configFile?: string;
2806
+ /**
2807
+ * Should the Powerlines CLI processes skip installing missing packages?
2808
+ *
2809
+ * @remarks
2810
+ * This option is useful for CI/CD environments where the installation of packages is handled by a different process.
2811
+ *
2812
+ * @defaultValue false
2813
+ */
2814
+ skipInstalls?: boolean;
2815
+ /**
2816
+ * Should the compiler processes skip any improvements that make use of cache?
2817
+ *
2818
+ * @defaultValue false
2819
+ */
2820
+ skipCache?: boolean;
2821
+ /**
2822
+ * A list of resolvable paths to plugins used during the build process
2823
+ */
2824
+ plugins?: PluginConfig<PluginContext<any>>[];
2825
+ /**
2826
+ * Environment-specific configurations
2827
+ */
2828
+ environments?: Record<string, EnvironmentConfig>;
2829
+ }
2830
+ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
2831
+ build?: TBuildConfig & {
2832
+ /**
2833
+ * The build variant being used by the Powerlines engine.
2834
+ */
2835
+ variant?: TBuildVariant;
2836
+ };
2837
+ override?: Partial<TBuildResolvedConfig>;
2838
+ };
2839
+ type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "release" | "clean";
2840
+ /**
2841
+ * The configuration provided while executing Powerlines commands.
2842
+ */
2843
+ type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
2844
+ /**
2845
+ * A string identifier for the Powerlines command being executed
2846
+ */
2847
+ command: PowerlinesCommand;
2848
+ };
2849
+
2850
+ interface GenerateDocsOptions {
2851
+ frontmatter?: Record<string, any>;
2852
+ outputPath?: string;
2853
+ project: ProjectReflection;
2854
+ }
2855
+ interface TypeDocPluginOptions extends Partial<Omit<TypeDocOptions, "out">> {
2856
+ /**
2857
+ * The output path for the generated documentation.
2858
+ *
2859
+ * @defaultValue "docs/generated/api-reference"
2860
+ */
2861
+ outputPath?: string;
2862
+ /**
2863
+ * The base URL for the documentation site.
2864
+ *
2865
+ * @defaultValue "/docs/"
2866
+ */
2867
+ basePath?: string;
2868
+ /**
2869
+ * Options to be passed to the TypeDoc generator.
2870
+ *
2871
+ * @remarks
2872
+ * These options will be override any other values passed to the TypeDoc generator.
2873
+ */
2874
+ override?: Partial<TypeDocOptions>;
2875
+ }
2876
+ interface TypeDocPluginUserConfig extends UserConfig {
2877
+ /**
2878
+ * Options for the TypeDoc plugin.
2879
+ */
2880
+ docs?: {
2881
+ typedoc: TypeDocPluginOptions;
2882
+ };
2883
+ }
2884
+ interface TypeDocPluginResolvedConfig extends ResolvedConfig {
2885
+ /**
2886
+ * Options for the TypeDoc plugin.
2887
+ */
2888
+ docs: {
2889
+ typedoc: TypeDocOptions & {
2890
+ outputPath: string;
2891
+ baseUrl: string;
2892
+ override?: Partial<TypeDocOptions>;
2893
+ };
2894
+ };
2895
+ }
2896
+ type TypeDocPluginContext<TResolvedConfig extends TypeDocPluginResolvedConfig = TypeDocPluginResolvedConfig> = PluginContext<TResolvedConfig> & {
2897
+ /**
2898
+ * The initialized TypeDoc application.
2899
+ */
2900
+ typedoc: Application;
2901
+ };
2902
+ declare type __ΩGenerateDocsOptions = any[];
2903
+ declare type __ΩTypeDocPluginOptions = any[];
2904
+ declare type __ΩTypeDocPluginUserConfig = any[];
2905
+ declare type __ΩTypeDocPluginResolvedConfig = any[];
2906
+ declare type __ΩTypeDocPluginContext = any[];
2907
+
2908
+ export type { GenerateDocsOptions, TypeDocPluginContext, TypeDocPluginOptions, TypeDocPluginResolvedConfig, TypeDocPluginUserConfig, __ΩGenerateDocsOptions, __ΩTypeDocPluginContext, __ΩTypeDocPluginOptions, __ΩTypeDocPluginResolvedConfig, __ΩTypeDocPluginUserConfig };