@powerlines/plugin-crypto 0.9.8 → 0.9.10

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,3876 @@
1
+ import { Children } from '@alloy-js/core/jsx-runtime';
2
+ import { ReflectionClass } from '@deepkit/type';
3
+ import * as $ from '@stryke/capnp';
4
+ import { PluginItem, PluginObj, PluginPass, transformAsync } from '@babel/core';
5
+ import { Format } from '@storm-software/build-tools/types';
6
+ import { LogLevelLabel } from '@storm-software/config-tools/types';
7
+ import { StormWorkspaceConfig } from '@storm-software/config/types';
8
+ import { MaybePromise, NonUndefined, FunctionLike } from '@stryke/types/base';
9
+ import { TypeDefinitionParameter, TypeDefinition, DotenvConfiguration } from '@stryke/types/configuration';
10
+ import { AssetGlob } from '@stryke/types/file';
11
+ import { PreviewOptions, ResolvedPreviewOptions } from 'vite';
12
+ import { BabelAPI } from '@babel/helper-plugin-utils';
13
+ import { EnvPaths } from '@stryke/env/get-env-paths';
14
+ import { PackageJson } from '@stryke/types/package-json';
15
+ import { Jiti } from 'jiti';
16
+ import { ParserOptions, ParseResult } from 'oxc-parser';
17
+ import { Range } from 'semver';
18
+ import { UnpluginContext, UnpluginBuildContext, TransformResult, ExternalIdResult, HookFilter, UnpluginOptions } from 'unplugin';
19
+ import { TsConfigJson, CompilerOptions } from '@stryke/types/tsconfig';
20
+ import ts from 'typescript';
21
+ import { PrimitiveJsonValue } from '@stryke/json/types';
22
+ import { Volume } from 'memfs';
23
+ import { PathLike, StatSyncOptions, Stats, RmDirOptions, RmOptions, Mode, MakeDirectoryOptions as MakeDirectoryOptions$1, PathOrFileDescriptor, WriteFileOptions as WriteFileOptions$1 } from 'node:fs';
24
+ import { IUnionFs } from 'unionfs';
25
+ import { ArrayValues } from '@stryke/types/array';
26
+ import { DotenvParseOutput } from '@stryke/env/types';
27
+
28
+ type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
29
+ interface BuildConfig {
30
+ /**
31
+ * The platform to build the project for
32
+ *
33
+ * @defaultValue "neutral"
34
+ */
35
+ platform?: "node" | "browser" | "neutral";
36
+ /**
37
+ * The alias mappings to use for module resolution during the build process.
38
+ *
39
+ * @remarks
40
+ * This option allows you to define custom path aliases for modules, which can be useful for simplifying imports and managing dependencies.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * {
45
+ * alias: {
46
+ * "@utils": "./src/utils",
47
+ * "@components": "./src/components"
48
+ * }
49
+ * }
50
+ * ```
51
+ */
52
+ alias?: Record<string, string>;
53
+ /**
54
+ * A list of modules that should not be bundled, even if they are external dependencies.
55
+ *
56
+ * @remarks
57
+ * 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.
58
+ */
59
+ external?: (string | RegExp)[];
60
+ /**
61
+ * A list of modules that should always be bundled, even if they are external dependencies.
62
+ */
63
+ noExternal?: (string | RegExp)[];
64
+ /**
65
+ * Should the Powerlines CLI processes skip bundling the `node_modules` directory?
66
+ */
67
+ skipNodeModulesBundle?: boolean;
68
+ /**
69
+ * Should the Powerlines processes skip the `"prepare"` task prior to building?
70
+ *
71
+ * @defaultValue false
72
+ */
73
+ skipPrepare?: boolean;
74
+ }
75
+ type BuildResolvedConfig = BuildConfig;
76
+
77
+ type BabelPluginPass<TState = unknown> = PluginPass & TState;
78
+ type BabelTransformPluginFilter = (code: string, id: string) => boolean;
79
+ type BabelTransformPlugin<TContext extends Context = Context, TOptions extends Record<string, any> = Record<string, any>, TState = unknown> = ((context: TContext) => (options: {
80
+ name: string;
81
+ log: LogFn;
82
+ api: BabelAPI;
83
+ options: TOptions;
84
+ context: TContext;
85
+ dirname: string;
86
+ }) => PluginObj<TOptions & BabelPluginPass<TState>>) & {
87
+ $$name: string;
88
+ };
89
+ 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] | [
90
+ BabelTransformPlugin<TContext, TOptions, TState>,
91
+ TOptions,
92
+ BabelTransformPluginFilter
93
+ ];
94
+
95
+ type ReflectionMode = "default" | "explicit" | "never";
96
+ type RawReflectionMode = ReflectionMode | "" | boolean | string | string[] | undefined;
97
+ /**
98
+ * Defines the level of reflection to be used during the transpilation process.
99
+ *
100
+ * @remarks
101
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
102
+ * - `minimal` - Only the essential type information is captured.
103
+ * - `normal` - Additional type information is captured, including some contextual data.
104
+ * - `verbose` - All available type information is captured, including detailed contextual data.
105
+ */
106
+ type ReflectionLevel = "minimal" | "normal" | "verbose";
107
+ interface DeepkitOptions {
108
+ /**
109
+ * Either true to activate reflection for all files compiled using this tsconfig,
110
+ * or a list of globs/file paths relative to this tsconfig.json.
111
+ * Globs/file paths can be prefixed with a ! to exclude them.
112
+ */
113
+ reflection?: RawReflectionMode;
114
+ /**
115
+ * Defines the level of reflection to be used during the transpilation process.
116
+ *
117
+ * @remarks
118
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
119
+ * - `minimal` - Only the essential type information is captured.
120
+ * - `normal` - Additional type information is captured, including some contextual data.
121
+ * - `verbose` - All available type information is captured, including detailed contextual data.
122
+ */
123
+ reflectionLevel?: ReflectionLevel;
124
+ }
125
+ type TSCompilerOptions = CompilerOptions & DeepkitOptions;
126
+ /**
127
+ * The TypeScript compiler configuration.
128
+ *
129
+ * @see https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
130
+ */
131
+ interface TSConfig extends Omit<TsConfigJson, "reflection"> {
132
+ /**
133
+ * Either true to activate reflection for all files compiled using this tsconfig,
134
+ * or a list of globs/file paths relative to this tsconfig.json.
135
+ * Globs/file paths can be prefixed with a ! to exclude them.
136
+ */
137
+ reflection?: RawReflectionMode;
138
+ /**
139
+ * Defines the level of reflection to be used during the transpilation process.
140
+ *
141
+ * @remarks
142
+ * The level determines how much extra data is captured in the byte code for each type. This can be one of the following values:
143
+ * - `minimal` - Only the essential type information is captured.
144
+ * - `normal` - Additional type information is captured, including some contextual data.
145
+ * - `verbose` - All available type information is captured, including detailed contextual data.
146
+ */
147
+ reflectionLevel?: ReflectionLevel;
148
+ /**
149
+ * Instructs the TypeScript compiler how to compile `.ts` files.
150
+ */
151
+ compilerOptions?: TSCompilerOptions;
152
+ }
153
+ type ParsedTypeScriptConfig = ts.ParsedCommandLine & {
154
+ originalTsconfigJson: TsConfigJson;
155
+ tsconfigJson: TSConfig;
156
+ tsconfigFilePath: string;
157
+ };
158
+
159
+ declare const __VFS_INIT__ = "__VFS_INIT__";
160
+ declare const __VFS_REVERT__ = "__VFS_REVERT__";
161
+ declare const __VFS_CACHE__ = "__VFS_CACHE__";
162
+ declare const __VFS_VIRTUAL__ = "__VFS_VIRTUAL__";
163
+ declare const __VFS_UNIFIED__ = "__VFS_UNIFIED__";
164
+ type OutputModeType = "fs" | "virtual";
165
+ interface VirtualFile {
166
+ /**
167
+ * The unique identifier for the virtual file.
168
+ *
169
+ * @remarks
170
+ * If no specific id is provided, it defaults to the file's {@link path}.
171
+ */
172
+ id: string;
173
+ /**
174
+ * Additional metadata associated with the virtual file.
175
+ */
176
+ details: Record<string, PrimitiveJsonValue>;
177
+ /**
178
+ * The variant of the file.
179
+ *
180
+ * @remarks
181
+ * This string represents the purpose/function of the file in the virtual file system. A potential list of variants includes:
182
+ * - `builtin`: Indicates that the file is a built-in module provided by the system.
183
+ * - `entry`: Indicates that the file is an entry point for execution.
184
+ * - `normal`: Indicates that the file is a standard file without any special role.
185
+ */
186
+ variant: string;
187
+ /**
188
+ * The output mode of the file.
189
+ *
190
+ * @remarks
191
+ * This indicates whether the file is intended to be written to the actual file system (`fs`) or kept in the virtual file system (`virtual`).
192
+ */
193
+ mode: OutputModeType;
194
+ /**
195
+ * A virtual (or actual) path to the file in the file system.
196
+ */
197
+ path: string;
198
+ /**
199
+ * The contents of the file.
200
+ */
201
+ code: string | NodeJS.ArrayBufferView;
202
+ }
203
+ type VirtualFileSystemMetadata = Pick<VirtualFile, "id" | "details" | "variant" | "mode">;
204
+ interface ResolveFSOptions {
205
+ mode?: OutputModeType;
206
+ }
207
+ type MakeDirectoryOptions = (Mode | MakeDirectoryOptions$1) & ResolveFSOptions;
208
+ interface PowerlinesWriteFileOptions extends ResolveFSOptions {
209
+ skipFormat?: boolean;
210
+ }
211
+ type NodeWriteFileOptions = WriteFileOptions$1;
212
+ type WriteFileOptions = NodeWriteFileOptions | PowerlinesWriteFileOptions;
213
+ type PowerLinesWriteFileData = Partial<Omit<VirtualFile, "path" | "mode" | "code">> & Pick<VirtualFile, "code">;
214
+ type WriteFileData = string | NodeJS.ArrayBufferView | PowerLinesWriteFileData;
215
+ interface ResolvePathOptions extends ResolveFSOptions {
216
+ /**
217
+ * Should the resolved path include the file extension?
218
+ *
219
+ * @defaultValue true
220
+ */
221
+ withExtension?: boolean;
222
+ /**
223
+ * The paths to search for the file.
224
+ */
225
+ paths?: string[];
226
+ /**
227
+ * The type of the path to resolve.
228
+ */
229
+ type?: "file" | "directory";
230
+ }
231
+ interface VirtualFileSystemInterface {
232
+ [__VFS_INIT__]: () => void;
233
+ [__VFS_REVERT__]: () => void;
234
+ /**
235
+ * The underlying file metadata.
236
+ */
237
+ meta: Record<string, VirtualFileSystemMetadata | undefined>;
238
+ /**
239
+ * A map of module ids to their file paths.
240
+ */
241
+ ids: Record<string, string>;
242
+ /**
243
+ * Check if a path or id corresponds to a virtual file **(does not actually exists on disk)**.
244
+ *
245
+ * @param pathOrId - The path or id to check.
246
+ * @param options - Optional parameters for resolving the path.
247
+ * @returns Whether the path or id corresponds to a virtual file **(does not actually exists on disk)**.
248
+ */
249
+ isVirtual: (pathOrId: string, options?: ResolvePathOptions) => boolean;
250
+ /**
251
+ * Check if a path or id corresponds to a file written to the file system **(actually exists on disk)**.
252
+ *
253
+ * @param pathOrId - The path or id to check.
254
+ * @param options - Optional parameters for resolving the path.
255
+ * @returns Whether the path or id corresponds to a file written to the file system **(actually exists on disk)**.
256
+ */
257
+ isFs: (pathOrId: string, options?: ResolvePathOptions) => boolean;
258
+ /**
259
+ * Checks if a file exists in the virtual file system (VFS).
260
+ *
261
+ * @param path - The path of the file to check.
262
+ * @returns `true` if the file exists, otherwise `false`.
263
+ */
264
+ isFile: (path: string) => boolean;
265
+ /**
266
+ * Checks if a directory exists in the virtual file system (VFS).
267
+ *
268
+ * @param path - The path of the directory to check.
269
+ * @returns `true` if the directory exists, otherwise `false`.
270
+ */
271
+ isDirectory: (path: string) => boolean;
272
+ /**
273
+ * Check if a path exists within one of the directories specified in the tsconfig.json's `path` field.
274
+ *
275
+ * @see https://www.typescriptlang.org/tsconfig#paths
276
+ *
277
+ * @param pathOrId - The path or id to check.
278
+ * @returns Whether the path or id corresponds to a virtual file.
279
+ */
280
+ isTsconfigPath: (pathOrId: string) => boolean;
281
+ /**
282
+ * Checks if a file exists in the virtual file system (VFS).
283
+ *
284
+ * @param pathOrId - The path or id of the file.
285
+ * @returns `true` if the file exists, otherwise `false`.
286
+ */
287
+ existsSync: (pathOrId: string) => boolean;
288
+ /**
289
+ * Gets the metadata of a file in the virtual file system (VFS).
290
+ *
291
+ * @param pathOrId - The path or id of the file.
292
+ * @returns The metadata of the file if it exists, otherwise undefined.
293
+ */
294
+ getMetadata: (pathOrId: PathLike) => VirtualFileSystemMetadata | undefined;
295
+ /**
296
+ * Gets the stats of a file in the virtual file system (VFS).
297
+ *
298
+ * @param pathOrId - The path or id of the file.
299
+ * @param options - Optional parameters for getting the stats.
300
+ * @returns The stats of the file if it exists, otherwise undefined.
301
+ */
302
+ lstat: (pathOrId: string, options?: StatSyncOptions & {
303
+ bigint?: false | undefined;
304
+ throwIfNoEntry: false;
305
+ }) => Promise<Stats>;
306
+ /**
307
+ * Gets the stats of a file in the virtual file system (VFS).
308
+ *
309
+ * @param pathOrId - The path or id of the file.
310
+ * @param options - Optional parameters for getting the stats.
311
+ * @returns The stats of the file if it exists, otherwise undefined.
312
+ */
313
+ lstatSync: (pathOrId: string, options?: StatSyncOptions & {
314
+ bigint?: false | undefined;
315
+ throwIfNoEntry: false;
316
+ }) => Stats | undefined;
317
+ /**
318
+ * Gets the stats of a file in the virtual file system (VFS).
319
+ *
320
+ * @param pathOrId - The path or id of the file.
321
+ * @returns The stats of the file if it exists, otherwise false.
322
+ */
323
+ stat: (pathOrId: string, options?: StatSyncOptions & {
324
+ bigint?: false | undefined;
325
+ throwIfNoEntry: false;
326
+ }) => Promise<Stats>;
327
+ /**
328
+ * Gets the stats of a file in the virtual file system (VFS).
329
+ *
330
+ * @param pathOrId - The path or id of the file.
331
+ * @returns The stats of the file if it exists, otherwise false.
332
+ */
333
+ statSync: (pathOrId: string, options?: StatSyncOptions & {
334
+ bigint?: false | undefined;
335
+ throwIfNoEntry: false;
336
+ }) => Stats | undefined;
337
+ /**
338
+ * Lists files in a given path.
339
+ *
340
+ * @param path - The path to list files from.
341
+ * @param options - Options for listing files, such as encoding and recursion.
342
+ * @returns An array of file names in the specified path.
343
+ */
344
+ readdirSync: (path: string, options?: {
345
+ encoding: BufferEncoding | null;
346
+ withFileTypes?: false | undefined;
347
+ recursive?: boolean | undefined;
348
+ } | BufferEncoding) => string[];
349
+ /**
350
+ * Lists files in a given path.
351
+ *
352
+ * @param path - The path to list files from.
353
+ * @param options - Options for listing files, such as encoding and recursion.
354
+ * @returns An array of file names in the specified path.
355
+ */
356
+ readdir: (path: string, options?: {
357
+ encoding: BufferEncoding | null;
358
+ withFileTypes?: false | undefined;
359
+ recursive?: boolean | undefined;
360
+ } | BufferEncoding) => Promise<string[]>;
361
+ /**
362
+ * Removes a file or symbolic link in the virtual file system (VFS).
363
+ *
364
+ * @param path - The path to the file to remove.
365
+ * @returns A promise that resolves when the file is removed.
366
+ */
367
+ unlinkSync: (path: PathLike, options?: ResolveFSOptions) => void;
368
+ /**
369
+ * Asynchronously removes a file or symbolic link in the virtual file system (VFS).
370
+ *
371
+ * @param path - The path to the file to remove.
372
+ * @returns A promise that resolves when the file is removed.
373
+ */
374
+ unlink: (path: string, options?: ResolveFSOptions) => Promise<void>;
375
+ /**
376
+ * Removes a directory in the virtual file system (VFS).
377
+ *
378
+ * @param path - The path to create the directory at.
379
+ * @param options - Options for creating the directory.
380
+ */
381
+ rmdirSync: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => any;
382
+ /**
383
+ * Removes a directory in the virtual file system (VFS).
384
+ *
385
+ * @param path - The path to create the directory at.
386
+ * @param options - Options for creating the directory.
387
+ * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
388
+ */
389
+ rmdir: (path: PathLike, options?: RmDirOptions & ResolveFSOptions) => Promise<void>;
390
+ /**
391
+ * Removes a file or directory in the virtual file system (VFS).
392
+ *
393
+ * @param path - The path to the file or directory to remove.
394
+ * @param options - Options for removing the file or directory.
395
+ * @returns A promise that resolves when the file or directory is removed.
396
+ */
397
+ rm: (path: PathLike, options?: RmOptions & ResolveFSOptions) => Promise<void>;
398
+ /**
399
+ * Synchronously removes a file or directory in the virtual file system (VFS).
400
+ *
401
+ * @param path - The path to the file or directory to remove.
402
+ * @param options - Options for removing the file or directory.
403
+ */
404
+ rmSync: (path: PathLike, options?: RmOptions & ResolveFSOptions) => void;
405
+ /**
406
+ * Creates a directory in the virtual file system (VFS).
407
+ *
408
+ * @param path - The path to create the directory at.
409
+ * @param options - Options for creating the directory.
410
+ * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
411
+ */
412
+ mkdirSync: (path: PathLike, options?: MakeDirectoryOptions) => string | undefined;
413
+ /**
414
+ * Creates a directory in the virtual file system (VFS).
415
+ *
416
+ * @param path - The path to create the directory at.
417
+ * @param options - Options for creating the directory.
418
+ * @returns A promise that resolves to the path of the created directory, or undefined if the directory could not be created.
419
+ */
420
+ mkdir: (path: PathLike, options?: MakeDirectoryOptions) => Promise<string | undefined>;
421
+ /**
422
+ * Reads a file from the virtual file system (VFS).
423
+ *
424
+ * @param pathOrId - The path or id of the file.
425
+ * @returns The contents of the file if it exists, otherwise undefined.
426
+ */
427
+ readFile: (pathOrId: string) => Promise<string | undefined>;
428
+ /**
429
+ * Reads a file from the virtual file system (VFS).
430
+ *
431
+ * @param pathOrId - The path or id of the file.
432
+ */
433
+ readFileSync: (pathOrId: string) => string | undefined;
434
+ /**
435
+ * Writes a file to the virtual file system (VFS).
436
+ *
437
+ * @param path - The path to the file.
438
+ * @param data - The contents of the file.
439
+ * @param options - Optional parameters for writing the file.
440
+ * @returns A promise that resolves when the file is written.
441
+ */
442
+ writeFile: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => Promise<void>;
443
+ /**
444
+ * Writes a file to the virtual file system (VFS).
445
+ *
446
+ * @param path - The path to the file.
447
+ * @param data - The contents of the file.
448
+ * @param options - Optional parameters for writing the file.
449
+ */
450
+ writeFileSync: (path: PathOrFileDescriptor, data?: WriteFileData, options?: WriteFileOptions) => void;
451
+ /**
452
+ * Moves a file from one path to another in the virtual file system (VFS).
453
+ *
454
+ * @param srcPath - The source path to move
455
+ * @param destPath - The destination path to move to
456
+ */
457
+ move: (srcPath: string, destPath: string) => Promise<void>;
458
+ /**
459
+ * Synchronously moves a file from one path to another in the virtual file system (VFS).
460
+ *
461
+ * @param srcPath - The source path to move
462
+ * @param destPath - The destination path to move to
463
+ */
464
+ moveSync: (srcPath: string, destPath: string) => void;
465
+ /**
466
+ * Copies a file from one path to another in the virtual file system (VFS).
467
+ *
468
+ * @param srcPath - The source path to copy
469
+ * @param destPath - The destination path to copy to
470
+ */
471
+ copy: (srcPath: string, destPath: string) => Promise<void>;
472
+ /**
473
+ * Synchronously copies a file from one path to another in the virtual file system (VFS).
474
+ *
475
+ * @param srcPath - The source path to copy
476
+ * @param destPath - The destination path to copy to
477
+ */
478
+ copySync: (srcPath: string, destPath: string) => void;
479
+ /**
480
+ * Glob files in the virtual file system (VFS) based on the provided pattern(s).
481
+ *
482
+ * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return
483
+ * @returns An array of file paths matching the provided pattern(s)
484
+ */
485
+ glob: (pattern: string | string[]) => Promise<string[]>;
486
+ /**
487
+ * Synchronously glob files in the virtual file system (VFS) based on the provided pattern(s).
488
+ *
489
+ * @param pattern - A pattern (or multiple patterns) to use to determine the file paths to return
490
+ * @returns An array of file paths matching the provided pattern(s)
491
+ */
492
+ globSync: (pattern: string | string[]) => string[];
493
+ /**
494
+ * Resolves a path or id to a file path in the virtual file system.
495
+ *
496
+ * @param pathOrId - The path or id of the file to resolve.
497
+ * @param options - Optional parameters for resolving the path.
498
+ * @returns The resolved path of the file if it exists, otherwise false.
499
+ */
500
+ resolve: (pathOrId: string, options?: ResolvePathOptions) => string | false;
501
+ /**
502
+ * Resolves a path based on TypeScript's `tsconfig.json` paths.
503
+ *
504
+ * @see https://www.typescriptlang.org/tsconfig#paths
505
+ *
506
+ * @param path - The path to check.
507
+ * @returns The resolved file path if it exists, otherwise undefined.
508
+ */
509
+ resolveTsconfigPath: (path: string) => string | false;
510
+ /**
511
+ * Resolves a package name based on TypeScript's `tsconfig.json` paths.
512
+ *
513
+ * @see https://www.typescriptlang.org/tsconfig#paths
514
+ *
515
+ * @param path - The path to check.
516
+ * @returns The resolved package name if it exists, otherwise undefined.
517
+ */
518
+ resolveTsconfigPathPackage: (path: string) => string | false;
519
+ /**
520
+ * Resolves a path or id to a file path in the virtual file system.
521
+ *
522
+ * @param pathOrId - The path or id of the file to resolve.
523
+ * @returns The resolved path of the file if it exists, otherwise false.
524
+ */
525
+ realpathSync: (pathOrId: string) => string;
526
+ /**
527
+ * Retrieves a partial metadata mapping of all files in the virtual file system (VFS).
528
+ *
529
+ * @returns A record mapping file paths to their partial metadata.
530
+ */
531
+ getPartialMeta: () => Record<string, Partial<VirtualFileSystemMetadata>>;
532
+ /**
533
+ * A map of cached file paths to their underlying file content.
534
+ */
535
+ [__VFS_CACHE__]: Map<string, string>;
536
+ /**
537
+ * A reference to the underlying virtual file system.
538
+ */
539
+ [__VFS_VIRTUAL__]: Volume;
540
+ /**
541
+ * A reference to the underlying unified file system.
542
+ */
543
+ [__VFS_UNIFIED__]: IUnionFs;
544
+ }
545
+
546
+ type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
547
+ /**
548
+ * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
549
+ */
550
+ type WorkspaceConfig = Partial<StormWorkspaceConfig> & Required<Pick<StormWorkspaceConfig, "workspaceRoot">>;
551
+ type PluginFactory<in out TContext extends PluginContext = PluginContext, TOptions = any> = (options: TOptions) => MaybePromise<Plugin<TContext>>;
552
+ /**
553
+ * A configuration tuple for a Powerlines plugin.
554
+ */
555
+ type PluginConfigTuple<TContext extends PluginContext = PluginContext, TOptions = any> = [string | PluginFactory<TContext, TOptions>, TOptions] | [Plugin<TContext>];
556
+ /**
557
+ * A configuration object for a Powerlines plugin.
558
+ */
559
+ type PluginConfigObject<TContext extends PluginContext = PluginContext, TOptions = any> = {
560
+ plugin: string | PluginFactory<TContext, TOptions>;
561
+ options: TOptions;
562
+ } | {
563
+ plugin: Plugin<TContext>;
564
+ options?: never;
565
+ };
566
+ /**
567
+ * A configuration tuple for a Powerlines plugin.
568
+ */
569
+ type PluginConfig<TContext extends PluginContext = PluginContext> = string | PluginFactory<TContext, void> | Plugin<TContext> | Promise<Plugin<TContext>> | PluginConfigTuple<TContext> | PluginConfigObject<TContext>;
570
+ type ProjectType = "application" | "library";
571
+ type BabelUserConfig = Parameters<typeof transformAsync>[1] & {
572
+ /**
573
+ * The Babel plugins to be used during the build process
574
+ */
575
+ plugins?: BabelTransformPluginOptions[];
576
+ /**
577
+ * The Babel presets to be used during the build process
578
+ */
579
+ presets?: BabelTransformPluginOptions[];
580
+ };
581
+ interface OutputConfig {
582
+ /**
583
+ * The path to output the final compiled files to
584
+ *
585
+ * @remarks
586
+ * If a value is not provided, Powerlines will attempt to:
587
+ * 1. Use the `outDir` value in the `tsconfig.json` file.
588
+ * 2. Use the `dist` directory in the project root directory.
589
+ *
590
+ * @defaultValue "dist/\{projectRoot\}"
591
+ */
592
+ outputPath?: string;
593
+ /**
594
+ * The format of the output files
595
+ *
596
+ * @defaultValue "virtual"
597
+ */
598
+ mode?: OutputModeType;
599
+ /**
600
+ * The path of the generated runtime declaration file relative to the workspace root.
601
+ *
602
+ * @defaultValue "\{projectRoot\}/powerlines.d.ts"
603
+ */
604
+ dts?: string | false;
605
+ /**
606
+ * A prefix to use for identifying builtin modules
607
+ *
608
+ * @remarks
609
+ * 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"`.
610
+ *
611
+ * @defaultValue "powerlines"
612
+ */
613
+ builtinPrefix?: string;
614
+ /**
615
+ * The folder where the generated runtime artifacts will be located
616
+ *
617
+ * @remarks
618
+ * This folder will contain all runtime artifacts and builtins generated during the "prepare" phase.
619
+ *
620
+ * @defaultValue "\{projectRoot\}/.powerlines"
621
+ */
622
+ artifactsFolder?: string;
623
+ /**
624
+ * The module format of the output files
625
+ *
626
+ * @remarks
627
+ * 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.
628
+ *
629
+ * @defaultValue "esm"
630
+ */
631
+ format?: Format | Format[];
632
+ /**
633
+ * A list of assets to copy to the output directory
634
+ *
635
+ * @remarks
636
+ * 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.
637
+ */
638
+ assets?: Array<string | AssetGlob>;
639
+ }
640
+ interface BaseConfig {
641
+ /**
642
+ * The name of the project
643
+ */
644
+ name?: string;
645
+ /**
646
+ * The project display title
647
+ *
648
+ * @remarks
649
+ * This option is used in documentation generation and other places where a human-readable title is needed.
650
+ */
651
+ title?: string;
652
+ /**
653
+ * A description of the project
654
+ *
655
+ * @remarks
656
+ * If this option is not provided, the build process will try to use the \`description\` value from the `\package.json\` file.
657
+ */
658
+ description?: string;
659
+ /**
660
+ * The log level to use for the Powerlines processes.
661
+ *
662
+ * @defaultValue "info"
663
+ */
664
+ logLevel?: LogLevelLabel | null;
665
+ /**
666
+ * A custom logger function to use for logging messages
667
+ */
668
+ customLogger?: LogFn;
669
+ /**
670
+ * 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.
671
+ *
672
+ * @defaultValue "production"
673
+ */
674
+ mode?: "development" | "test" | "production";
675
+ /**
676
+ * The entry point(s) for the application
677
+ */
678
+ entry?: TypeDefinitionParameter | TypeDefinitionParameter[];
679
+ /**
680
+ * Configuration for linting the source code
681
+ */
682
+ lint?: Record<string, any> | false;
683
+ /**
684
+ * Configuration for testing the source code
685
+ */
686
+ test?: Record<string, any> | false;
687
+ /**
688
+ * Configuration for the output of the build process
689
+ */
690
+ output?: OutputConfig;
691
+ /**
692
+ * Configuration for the transformation of the source code
693
+ */
694
+ transform?: Record<string, any>;
695
+ /**
696
+ * Options to to provide to the build process
697
+ */
698
+ build?: BuildConfig;
699
+ /**
700
+ * Configuration for documentation generation
701
+ *
702
+ * @remarks
703
+ * This configuration will be used by the documentation generation plugins during the `docs` command.
704
+ */
705
+ docs?: Record<string, any>;
706
+ /**
707
+ * The path to the tsconfig file to be used by the compiler
708
+ *
709
+ * @remarks
710
+ * 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).
711
+ *
712
+ * @defaultValue "\{projectRoot\}/tsconfig.json"
713
+ */
714
+ tsconfig?: string;
715
+ /**
716
+ * The raw {@link TSConfig} object to be used by the compiler. This object will be merged with the `tsconfig.json` file.
717
+ *
718
+ * @see https://www.typescriptlang.org/tsconfig
719
+ *
720
+ * @remarks
721
+ * If populated, this option takes higher priority than `tsconfig`
722
+ */
723
+ tsconfigRaw?: TSConfig;
724
+ }
725
+ interface EnvironmentConfig extends BaseConfig {
726
+ /**
727
+ * 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.
728
+ *
729
+ * @defaultValue `['browser', 'module', 'jsnext:main', 'jsnext']`
730
+ */
731
+ mainFields?: string[];
732
+ /**
733
+ * Array of strings indicating what conditions should be used for module resolution.
734
+ */
735
+ conditions?: string[];
736
+ /**
737
+ * Array of strings indicating what conditions should be used for external modules.
738
+ */
739
+ externalConditions?: string[];
740
+ /**
741
+ * Array of strings indicating what file extensions should be used for module resolution.
742
+ *
743
+ * @defaultValue `['.mjs', '.js', '.mts', '.ts', '.jsx', '.tsx', '.json']`
744
+ */
745
+ extensions?: string[];
746
+ /**
747
+ * Array of strings indicating what modules should be deduplicated to a single version in the build.
748
+ *
749
+ * @remarks
750
+ * 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.
751
+ */
752
+ dedupe?: string[];
753
+ /**
754
+ * Array of strings or regular expressions that indicate what modules are builtin for the environment.
755
+ */
756
+ builtins?: (string | RegExp)[];
757
+ /**
758
+ * Configuration options for the preview server
759
+ */
760
+ preview?: PreviewOptions;
761
+ /**
762
+ * A flag indicating whether the build is for a Server-Side Rendering environment.
763
+ */
764
+ ssr?: boolean;
765
+ /**
766
+ * Define if this environment is used for Server-Side Rendering
767
+ *
768
+ * @defaultValue "server" (if it isn't the client environment)
769
+ */
770
+ consumer?: "client" | "server";
771
+ }
772
+ interface CommonUserConfig extends BaseConfig {
773
+ /**
774
+ * The type of project being built
775
+ *
776
+ * @defaultValue "application"
777
+ */
778
+ type?: ProjectType;
779
+ /**
780
+ * The root directory of the project
781
+ */
782
+ root: string;
783
+ /**
784
+ * The root directory of the project's source code
785
+ *
786
+ * @defaultValue "\{root\}/src"
787
+ */
788
+ sourceRoot?: string;
789
+ /**
790
+ * A path to a custom configuration file to be used instead of the default `storm.json`, `powerlines.config.js`, or `powerlines.config.ts` files.
791
+ *
792
+ * @remarks
793
+ * This option is useful for running Powerlines commands with different configuration files, such as in CI/CD environments or when testing different configurations.
794
+ */
795
+ configFile?: string;
796
+ /**
797
+ * Should the Powerlines CLI processes skip installing missing packages?
798
+ *
799
+ * @remarks
800
+ * This option is useful for CI/CD environments where the installation of packages is handled by a different process.
801
+ *
802
+ * @defaultValue false
803
+ */
804
+ skipInstalls?: boolean;
805
+ /**
806
+ * Should the compiler processes skip any improvements that make use of cache?
807
+ *
808
+ * @defaultValue false
809
+ */
810
+ skipCache?: boolean;
811
+ /**
812
+ * A list of resolvable paths to plugins used during the build process
813
+ */
814
+ plugins?: PluginConfig<PluginContext<any>>[];
815
+ /**
816
+ * Environment-specific configurations
817
+ */
818
+ environments?: Record<string, EnvironmentConfig>;
819
+ /**
820
+ * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
821
+ *
822
+ * @remarks
823
+ * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsFolder | output.artifactsFolder}, this value will be used as the default.
824
+ *
825
+ * @defaultValue "powerlines"
826
+ */
827
+ framework?: string;
828
+ }
829
+ type UserConfig<TBuildConfig extends BuildConfig = BuildConfig, TBuildResolvedConfig extends BuildResolvedConfig = BuildResolvedConfig, TBuildVariant extends string = any> = CommonUserConfig & {
830
+ build?: TBuildConfig & {
831
+ /**
832
+ * The build variant being used by the Powerlines engine.
833
+ */
834
+ variant?: TBuildVariant;
835
+ };
836
+ override?: Partial<TBuildResolvedConfig>;
837
+ };
838
+ type PowerlinesCommand = "new" | "prepare" | "build" | "lint" | "test" | "docs" | "release" | "clean";
839
+ /**
840
+ * The configuration provided while executing Powerlines commands.
841
+ */
842
+ type InlineConfig<TUserConfig extends UserConfig = UserConfig> = Partial<TUserConfig> & {
843
+ /**
844
+ * A string identifier for the Powerlines command being executed
845
+ */
846
+ command: PowerlinesCommand;
847
+ };
848
+
849
+ interface ResolvedEntryTypeDefinition extends TypeDefinition {
850
+ /**
851
+ * The user provided entry point in the source code
852
+ */
853
+ input: TypeDefinition;
854
+ /**
855
+ * An optional name to use in the package export during the build process
856
+ */
857
+ output?: string;
858
+ }
859
+ type BabelResolvedConfig = Omit<BabelUserConfig, "plugins" | "presets"> & Required<Pick<BabelUserConfig, "plugins" | "presets">>;
860
+ type EnvironmentResolvedConfig = Omit<EnvironmentConfig, "consumer" | "mode" | "ssr" | "preview" | "mainFields" | "extensions"> & Required<Pick<EnvironmentConfig, "consumer" | "mode" | "ssr" | "mainFields" | "extensions">> & {
861
+ /**
862
+ * The name of the environment
863
+ */
864
+ name: string;
865
+ /**
866
+ * Configuration options for the preview server
867
+ */
868
+ preview?: ResolvedPreviewOptions;
869
+ };
870
+ type ResolvedAssetGlob = AssetGlob & Required<Pick<AssetGlob, "input">>;
871
+ type OutputResolvedConfig = Required<Omit<OutputConfig, "assets"> & {
872
+ assets: ResolvedAssetGlob[];
873
+ }>;
874
+ /**
875
+ * The resolved options for the Powerlines project configuration.
876
+ */
877
+ type ResolvedConfig<TUserConfig extends UserConfig = UserConfig> = Omit<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "platform" | "tsconfig" | "lint" | "test" | "build" | "transform" | "override" | "root" | "variant" | "type" | "output" | "logLevel" | "framework"> & Required<Pick<TUserConfig, "name" | "title" | "plugins" | "mode" | "environments" | "tsconfig" | "lint" | "test" | "build" | "transform" | "override" | "framework">> & {
878
+ /**
879
+ * The configuration options that were provided inline to the Powerlines CLI.
880
+ */
881
+ inlineConfig: InlineConfig<TUserConfig>;
882
+ /**
883
+ * The original configuration options that were provided by the user to the Powerlines process.
884
+ */
885
+ userConfig: TUserConfig;
886
+ /**
887
+ * A string identifier for the Powerlines command being executed.
888
+ */
889
+ command: NonUndefined<InlineConfig<TUserConfig>["command"]>;
890
+ /**
891
+ * The root directory of the project's source code
892
+ *
893
+ * @defaultValue "\{projectRoot\}/src"
894
+ */
895
+ sourceRoot: NonUndefined<TUserConfig["sourceRoot"]>;
896
+ /**
897
+ * The root directory of the project.
898
+ */
899
+ projectRoot: NonUndefined<TUserConfig["root"]>;
900
+ /**
901
+ * The type of project being built.
902
+ */
903
+ projectType: NonUndefined<TUserConfig["type"]>;
904
+ /**
905
+ * The output configuration options to use for the build process
906
+ */
907
+ output: OutputResolvedConfig;
908
+ /**
909
+ * The log level to use for the Powerlines processes.
910
+ *
911
+ * @defaultValue "info"
912
+ */
913
+ logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
914
+ };
915
+
916
+ /**
917
+ * The severity level of a {@link LogRecord}.
918
+ */
919
+ type LogLevel = "debug" | "info" | "warning" | "error" | "fatal";
920
+ declare const LogLevel: {
921
+ DEBUG: LogLevel;
922
+ INFO: LogLevel;
923
+ WARNING: LogLevel;
924
+ ERROR: LogLevel;
925
+ FATAL: LogLevel;
926
+ };
927
+ interface MetaInfo {
928
+ /**
929
+ * The checksum generated from the resolved options
930
+ */
931
+ checksum: string;
932
+ /**
933
+ * The build id
934
+ */
935
+ buildId: string;
936
+ /**
937
+ * The release id
938
+ */
939
+ releaseId: string;
940
+ /**
941
+ * The build timestamp
942
+ */
943
+ timestamp: number;
944
+ /**
945
+ * A hash that represents the path to the project root directory
946
+ */
947
+ projectRootHash: string;
948
+ /**
949
+ * A hash that represents the path to the project root directory
950
+ */
951
+ configHash: string;
952
+ /**
953
+ * A mapping of runtime ids to their corresponding file paths
954
+ */
955
+ builtinIdMap: Record<string, string>;
956
+ /**
957
+ * A mapping of virtual file paths to their corresponding file contents
958
+ */
959
+ virtualFiles: Record<string, string | null>;
960
+ }
961
+ interface Resolver extends Jiti {
962
+ plugin: Jiti;
963
+ }
964
+ interface InitContextOptions {
965
+ /**
966
+ * If false, the plugin will be loaded after all other plugins.
967
+ *
968
+ * @defaultValue true
969
+ */
970
+ isHighPriority: boolean;
971
+ }
972
+ interface Context<TResolvedConfig extends ResolvedConfig = ResolvedConfig> {
973
+ /**
974
+ * The Storm workspace configuration
975
+ */
976
+ workspaceConfig: WorkspaceConfig;
977
+ /**
978
+ * An object containing the options provided to Powerlines
979
+ */
980
+ config: TResolvedConfig;
981
+ /**
982
+ * A logging function for the Powerlines engine
983
+ */
984
+ log: LogFn;
985
+ /**
986
+ * The metadata information
987
+ */
988
+ meta: MetaInfo;
989
+ /**
990
+ * The metadata information currently written to disk
991
+ */
992
+ persistedMeta?: MetaInfo;
993
+ /**
994
+ * The Powerlines artifacts directory
995
+ */
996
+ artifactsPath: string;
997
+ /**
998
+ * The path to the Powerlines builtin runtime modules directory
999
+ */
1000
+ builtinsPath: string;
1001
+ /**
1002
+ * The path to the Powerlines entry modules directory
1003
+ */
1004
+ entryPath: string;
1005
+ /**
1006
+ * The path to the Powerlines TypeScript declaration files directory
1007
+ */
1008
+ dtsPath: string;
1009
+ /**
1010
+ * The path to a directory where the reflection data buffers (used by the build processes) are stored
1011
+ */
1012
+ dataPath: string;
1013
+ /**
1014
+ * The path to a directory where the project cache (used by the build processes) is stored
1015
+ */
1016
+ cachePath: string;
1017
+ /**
1018
+ * The Powerlines environment paths
1019
+ */
1020
+ envPaths: EnvPaths;
1021
+ /**
1022
+ * The file system path to the Powerlines package installation
1023
+ */
1024
+ powerlinesPath: string;
1025
+ /**
1026
+ * The relative path to the Powerlines workspace root directory
1027
+ */
1028
+ relativeToWorkspaceRoot: string;
1029
+ /**
1030
+ * The project's `package.json` file content
1031
+ */
1032
+ packageJson: PackageJson & Record<string, any>;
1033
+ /**
1034
+ * The project's `project.json` file content
1035
+ */
1036
+ projectJson?: Record<string, any>;
1037
+ /**
1038
+ * The dependency installations required by the project
1039
+ */
1040
+ dependencies: Record<string, string | Range>;
1041
+ /**
1042
+ * The development dependency installations required by the project
1043
+ */
1044
+ devDependencies: Record<string, string | Range>;
1045
+ /**
1046
+ * The parsed TypeScript configuration from the `tsconfig.json` file
1047
+ */
1048
+ tsconfig: ParsedTypeScriptConfig;
1049
+ /**
1050
+ * The entry points of the source code
1051
+ */
1052
+ entry: ResolvedEntryTypeDefinition[];
1053
+ /**
1054
+ * The virtual file system manager used during the build process to reference generated runtime files
1055
+ */
1056
+ fs: VirtualFileSystemInterface;
1057
+ /**
1058
+ * The Jiti module resolver
1059
+ */
1060
+ resolver: Resolver;
1061
+ /**
1062
+ * The builtin module id that exist in the Powerlines virtual file system
1063
+ */
1064
+ builtins: string[];
1065
+ /**
1066
+ * The Powerlines builtin virtual files
1067
+ */
1068
+ getBuiltins: () => Promise<VirtualFile[]>;
1069
+ /**
1070
+ * Resolves a builtin virtual file and writes it to the VFS if it does not already exist
1071
+ *
1072
+ * @param code - The source code of the builtin file
1073
+ * @param id - The unique identifier of the builtin file
1074
+ * @param path - An optional path to write the builtin file to
1075
+ * @param options - Options for writing the file
1076
+ */
1077
+ writeBuiltin: (code: string, id: string, path?: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
1078
+ /**
1079
+ * Resolves a entry virtual file and writes it to the VFS if it does not already exist
1080
+ *
1081
+ * @param code - The source code of the entry file
1082
+ * @param path - An optional path to write the entry file to
1083
+ * @param options - Options for writing the file
1084
+ */
1085
+ writeEntry: (code: string, path: string, options?: PowerlinesWriteFileOptions) => Promise<void>;
1086
+ /**
1087
+ * Parses the source code and returns a {@link ParseResult} object.
1088
+ */
1089
+ parse: (code: string, id: string, options?: ParserOptions | null) => Promise<ParseResult>;
1090
+ /**
1091
+ * A function to update the context fields using a new user configuration options
1092
+ */
1093
+ withUserConfig: (userConfig: UserConfig, options?: InitContextOptions) => Promise<void>;
1094
+ /**
1095
+ * A function to update the context fields using inline configuration options
1096
+ */
1097
+ withInlineConfig: (inlineConfig: InlineConfig, options?: InitContextOptions) => Promise<void>;
1098
+ /**
1099
+ * Create a new logger instance
1100
+ *
1101
+ * @param name - The name to use for the logger instance
1102
+ * @returns A logger function
1103
+ */
1104
+ createLog: (name: string | null) => LogFn;
1105
+ /**
1106
+ * Extend the current logger instance with a new name
1107
+ *
1108
+ * @param name - The name to use for the extended logger instance
1109
+ * @returns A logger function
1110
+ */
1111
+ extendLog: (name: string) => LogFn;
1112
+ }
1113
+ interface PluginContext<out TResolvedConfig extends ResolvedConfig = ResolvedConfig> extends Context<TResolvedConfig>, UnpluginContext {
1114
+ /**
1115
+ * The environment specific resolved configuration
1116
+ */
1117
+ environment: EnvironmentResolvedConfig;
1118
+ /**
1119
+ * An alternative property name for the {@link log} property
1120
+ *
1121
+ * @remarks
1122
+ * This is provided for compatibility with other logging libraries that expect a `logger` property.
1123
+ */
1124
+ logger: LogFn;
1125
+ }
1126
+ type BuildPluginContext<TResolvedConfig extends ResolvedConfig = ResolvedConfig> = PluginContext<TResolvedConfig> & Omit<UnpluginBuildContext, "parse">;
1127
+
1128
+ declare const SUPPORTED_COMMANDS: readonly ["new", "clean", "prepare", "lint", "test", "build", "docs", "release", "finalize"];
1129
+ type CommandType = ArrayValues<typeof SUPPORTED_COMMANDS>;
1130
+
1131
+ interface PluginHookObject<THookFunction extends FunctionLike, TFilter extends keyof HookFilter | undefined = undefined> {
1132
+ /**
1133
+ * The order in which the plugin should be applied.
1134
+ */
1135
+ order?: "pre" | "post" | null | undefined;
1136
+ /**
1137
+ * A filter to determine when the hook should be called.
1138
+ */
1139
+ filter?: TFilter;
1140
+ /**
1141
+ * The hook function to be called.
1142
+ */
1143
+ handler: THookFunction;
1144
+ }
1145
+ type PluginHook<THookFunction extends FunctionLike, TFilter extends keyof HookFilter | undefined = undefined> = THookFunction | PluginHookObject<THookFunction, TFilter>;
1146
+ /**
1147
+ * A result returned by the plugin from the `generateTypes` hook that describes the declaration types output file.
1148
+ */
1149
+ interface GenerateTypesResult {
1150
+ directives?: string[];
1151
+ code: string;
1152
+ }
1153
+ interface BasePluginHookFunctions<TContext extends PluginContext = PluginContext> extends Record<CommandType, (this: TContext) => MaybePromise<void>> {
1154
+ /**
1155
+ * A function that returns configuration options to be merged with the build context's options.
1156
+ *
1157
+ * @remarks
1158
+ * 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.
1159
+ *
1160
+ * @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.
1161
+ *
1162
+ * @see https://vitejs.dev/guide/api-plugin#config
1163
+ *
1164
+ * @param this - The build context.
1165
+ * @param config - The partial configuration object to be modified.
1166
+ * @returns A promise that resolves to a partial configuration object.
1167
+ */
1168
+ config: (this: Context<TContext["config"]>) => MaybePromise<Partial<TContext["config"]["userConfig"]>>;
1169
+ /**
1170
+ * 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.
1171
+ *
1172
+ * @remarks
1173
+ * 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.
1174
+ *
1175
+ * @see https://vitejs.dev/guide/api-plugin#configenvironment
1176
+ *
1177
+ * @param this - The build context.
1178
+ * @param name - The name of the environment being configured.
1179
+ * @param environment - The Vite-like environment object containing information about the current build environment.
1180
+ * @returns A promise that resolves when the hook is complete.
1181
+ */
1182
+ configEnvironment: (this: TContext, name: string, environment: EnvironmentConfig) => MaybePromise<Partial<EnvironmentResolvedConfig> | undefined | null>;
1183
+ /**
1184
+ * A hook that is called when the plugin is resolved.
1185
+ *
1186
+ * @see https://vitejs.dev/guide/api-plugin#configresolved
1187
+ *
1188
+ * @param this - The build context.
1189
+ * @returns A promise that resolves when the hook is complete.
1190
+ */
1191
+ configResolved: (this: TContext) => MaybePromise<void>;
1192
+ /**
1193
+ * A hook that is called to overwrite the generated declaration types file (.d.ts). The generated type definitions should describe the built-in modules/logic added during the `prepare` task.
1194
+ *
1195
+ * @param this - The build context.
1196
+ * @param code - The source code to generate types for.
1197
+ * @returns A promise that resolves when the hook is complete.
1198
+ */
1199
+ generateTypes: (this: TContext, code: string) => MaybePromise<GenerateTypesResult | string | undefined | null>;
1200
+ /**
1201
+ * A hook that is called at the start of the build process.
1202
+ *
1203
+ * @param this - The build context and unplugin build context.
1204
+ * @returns A promise that resolves when the hook is complete.
1205
+ */
1206
+ buildStart: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
1207
+ /**
1208
+ * A hook that is called at the end of the build process.
1209
+ *
1210
+ * @param this - The build context and unplugin build context.
1211
+ * @returns A promise that resolves when the hook is complete.
1212
+ */
1213
+ buildEnd: (this: BuildPluginContext<TContext["config"]> & TContext) => MaybePromise<void>;
1214
+ /**
1215
+ * A hook that is called to transform the source code.
1216
+ *
1217
+ * @param this - The build context, unplugin build context, and unplugin context.
1218
+ * @param code - The source code to transform.
1219
+ * @param id - The identifier of the source code.
1220
+ * @returns A promise that resolves when the hook is complete.
1221
+ */
1222
+ transform: (this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>;
1223
+ /**
1224
+ * A hook that is called to load the source code.
1225
+ *
1226
+ * @param this - The build context, unplugin build context, and unplugin context.
1227
+ * @param id - The identifier of the source code.
1228
+ * @returns A promise that resolves when the hook is complete.
1229
+ */
1230
+ load: (this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>;
1231
+ /**
1232
+ * A hook that is called to resolve the identifier of the source code.
1233
+ *
1234
+ * @param this - The build context, unplugin build context, and unplugin context.
1235
+ * @param id - The identifier of the source code.
1236
+ * @param importer - The importer of the source code.
1237
+ * @param options - The options for resolving the identifier.
1238
+ * @returns A promise that resolves when the hook is complete.
1239
+ */
1240
+ resolveId: (this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
1241
+ isEntry: boolean;
1242
+ }) => MaybePromise<string | ExternalIdResult | null | undefined>;
1243
+ /**
1244
+ * A hook that is called to write the bundle to disk.
1245
+ *
1246
+ * @param this - The build context.
1247
+ * @returns A promise that resolves when the hook is complete.
1248
+ */
1249
+ writeBundle: (this: TContext) => MaybePromise<void>;
1250
+ }
1251
+ type BuildPlugin<TContext extends PluginContext = PluginContext, TBuildVariant extends UnpluginBuildVariant = UnpluginBuildVariant, TOptions extends Required<UnpluginOptions>[TBuildVariant] = Required<UnpluginOptions>[TBuildVariant]> = {
1252
+ [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];
1253
+ };
1254
+ type PluginHooks<TContext extends PluginContext = PluginContext> = {
1255
+ [TKey in keyof BasePluginHookFunctions<TContext>]: PluginHook<BasePluginHookFunctions<TContext>[TKey]>;
1256
+ } & {
1257
+ /**
1258
+ * A function that returns configuration options to be merged with the build context's options.
1259
+ *
1260
+ * @remarks
1261
+ * 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.
1262
+ *
1263
+ * @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.
1264
+ *
1265
+ * @see https://vitejs.dev/guide/api-plugin#config
1266
+ *
1267
+ * @param this - The build context.
1268
+ * @param config - The partial configuration object to be modified.
1269
+ * @returns A promise that resolves to a partial configuration object.
1270
+ */
1271
+ config: PluginHook<(this: Context<TContext["config"]>) => MaybePromise<Partial<TContext["config"]["userConfig"]>>> | Partial<TContext["config"]["userConfig"]>;
1272
+ /**
1273
+ * A hook that is called to transform the source code.
1274
+ *
1275
+ * @param this - The build context, unplugin build context, and unplugin context.
1276
+ * @param code - The source code to transform.
1277
+ * @param id - The identifier of the source code.
1278
+ * @returns A promise that resolves when the hook is complete.
1279
+ */
1280
+ transform: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, code: string, id: string) => MaybePromise<TransformResult>, "code" | "id">;
1281
+ /**
1282
+ * A hook that is called to load the source code.
1283
+ *
1284
+ * @param this - The build context, unplugin build context, and unplugin context.
1285
+ * @param id - The identifier of the source code.
1286
+ * @returns A promise that resolves when the hook is complete.
1287
+ */
1288
+ load: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string) => MaybePromise<TransformResult>, "id">;
1289
+ /**
1290
+ * A hook that is called to resolve the identifier of the source code.
1291
+ *
1292
+ * @param this - The build context, unplugin build context, and unplugin context.
1293
+ * @param id - The identifier of the source code.
1294
+ * @param importer - The importer of the source code.
1295
+ * @param options - The options for resolving the identifier.
1296
+ * @returns A promise that resolves when the hook is complete.
1297
+ */
1298
+ resolveId: PluginHook<(this: BuildPluginContext<TContext["config"]> & TContext, id: string, importer: string | undefined, options: {
1299
+ isEntry: boolean;
1300
+ }) => MaybePromise<string | ExternalIdResult | null | undefined>, "id">;
1301
+ };
1302
+ type PluginBuildPlugins<TContext extends PluginContext = PluginContext> = {
1303
+ [TBuildVariant in UnpluginBuildVariant]?: BuildPlugin<TContext, TBuildVariant>;
1304
+ };
1305
+ interface Plugin<in out TContext extends PluginContext<ResolvedConfig> = PluginContext<ResolvedConfig>> extends Partial<PluginHooks<TContext>>, PluginBuildPlugins<TContext> {
1306
+ /**
1307
+ * The name of the plugin, for use in deduplication, error messages and logs.
1308
+ */
1309
+ name: string;
1310
+ /**
1311
+ * Enforce plugin invocation tier similar to webpack loaders. Hooks ordering is still subject to the `order` property in the hook object.
1312
+ *
1313
+ * @remarks
1314
+ * The Plugin invocation order is as follows:
1315
+ * - `enforce: 'pre'` plugins
1316
+ * - `order: 'pre'` plugin hooks
1317
+ * - any other plugins (normal)
1318
+ * - `order: 'post'` plugin hooks
1319
+ * - `enforce: 'post'` plugins
1320
+ *
1321
+ * @see https://vitejs.dev/guide/api-plugin.html#plugin-ordering
1322
+ * @see https://rollupjs.org/plugin-development/#build-hooks
1323
+ * @see https://webpack.js.org/concepts/loaders/#enforce---pre-and-post
1324
+ * @see https://esbuild.github.io/plugins/#concepts
1325
+ */
1326
+ enforce?: "pre" | "post";
1327
+ /**
1328
+ * A function to determine if two plugins are the same and can be de-duplicated.
1329
+ *
1330
+ * @remarks
1331
+ * If this is not provided, plugins are de-duplicated by comparing their names.
1332
+ *
1333
+ * @param other - The other plugin to compare against.
1334
+ * @returns `true` if the two plugins are the same, `false` otherwise.
1335
+ */
1336
+ dedupe?: false | ((other: Plugin<any>) => boolean);
1337
+ /**
1338
+ * A list of pre-requisite plugins that must be loaded before this plugin can be used.
1339
+ */
1340
+ dependsOn?: PluginConfig<any>[];
1341
+ /**
1342
+ * Define environments where this plugin should be active. By default, the plugin is active in all environments.
1343
+ *
1344
+ * @param environment - The environment to check.
1345
+ * @returns `true` if the plugin should be active in the specified environment, `false` otherwise.
1346
+ */
1347
+ applyToEnvironment?: (environment: EnvironmentResolvedConfig) => MaybePromise<boolean | Plugin<any>>;
1348
+ }
1349
+
1350
+ declare const ReflectionKind: {
1351
+ readonly NEVER: 0;
1352
+ readonly ANY: 1;
1353
+ readonly UNKNOWN: 2;
1354
+ readonly VOID: 3;
1355
+ readonly OBJECT: 4;
1356
+ readonly STRING: 5;
1357
+ readonly NUMBER: 6;
1358
+ readonly BOOLEAN: 7;
1359
+ readonly SYMBOL: 8;
1360
+ readonly BIGINT: 9;
1361
+ readonly NULL: 10;
1362
+ readonly UNDEFINED: 11;
1363
+ readonly REGEXP: 12;
1364
+ readonly LITERAL: 13;
1365
+ readonly TEMPLATE_LITERAL: 14;
1366
+ readonly PROPERTY: 15;
1367
+ readonly METHOD: 16;
1368
+ readonly FUNCTION: 17;
1369
+ readonly PARAMETER: 18;
1370
+ readonly PROMISE: 19;
1371
+ readonly CLASS: 20;
1372
+ readonly TYPE_PARAMETER: 21;
1373
+ readonly ENUM: 22;
1374
+ readonly UNION: 23;
1375
+ readonly INTERSECTION: 24;
1376
+ readonly ARRAY: 25;
1377
+ readonly TUPLE: 26;
1378
+ readonly TUPLE_MEMBER: 27;
1379
+ readonly ENUM_MEMBER: 28;
1380
+ readonly REST: 29;
1381
+ readonly OBJECT_LITERAL: 30;
1382
+ readonly INDEX_SIGNATURE: 31;
1383
+ readonly PROPERTY_SIGNATURE: 32;
1384
+ readonly METHOD_SIGNATURE: 33;
1385
+ readonly INFER: 34;
1386
+ readonly CALL_SIGNATURE: 35;
1387
+ };
1388
+ type ReflectionKind = (typeof ReflectionKind)[keyof typeof ReflectionKind];
1389
+ declare const ReflectionVisibility: {
1390
+ readonly PUBLIC: 0;
1391
+ readonly PROTECTED: 1;
1392
+ readonly PRIVATE: 2;
1393
+ };
1394
+ type ReflectionVisibility = (typeof ReflectionVisibility)[keyof typeof ReflectionVisibility];
1395
+ declare class TagsReflection extends $.Struct {
1396
+ static readonly _capnp: {
1397
+ displayName: string;
1398
+ id: string;
1399
+ size: $.ObjectSize;
1400
+ };
1401
+ _adoptAlias(value: $.Orphan<$.List<string>>): void;
1402
+ _disownAlias(): $.Orphan<$.List<string>>;
1403
+ get alias(): $.List<string>;
1404
+ _hasAlias(): boolean;
1405
+ _initAlias(length: number): $.List<string>;
1406
+ set alias(value: $.List<string>);
1407
+ get title(): string;
1408
+ set title(value: string);
1409
+ get hidden(): boolean;
1410
+ set hidden(value: boolean);
1411
+ get readonly(): boolean;
1412
+ set readonly(value: boolean);
1413
+ get ignore(): boolean;
1414
+ set ignore(value: boolean);
1415
+ get internal(): boolean;
1416
+ set internal(value: boolean);
1417
+ _adoptPermission(value: $.Orphan<$.List<string>>): void;
1418
+ _disownPermission(): $.Orphan<$.List<string>>;
1419
+ get permission(): $.List<string>;
1420
+ _hasPermission(): boolean;
1421
+ _initPermission(length: number): $.List<string>;
1422
+ set permission(value: $.List<string>);
1423
+ get domain(): string;
1424
+ set domain(value: string);
1425
+ toString(): string;
1426
+ }
1427
+ declare const DefaultValueReflection_Value_Which: {
1428
+ readonly UNDEFINED: 0;
1429
+ readonly BOOLEAN: 1;
1430
+ readonly INTEGER: 2;
1431
+ readonly FLOAT: 3;
1432
+ readonly STRING: 4;
1433
+ };
1434
+ type DefaultValueReflection_Value_Which = (typeof DefaultValueReflection_Value_Which)[keyof typeof DefaultValueReflection_Value_Which];
1435
+ declare class DefaultValueReflection_Value extends $.Struct {
1436
+ static readonly UNDEFINED: 0;
1437
+ static readonly BOOLEAN: 1;
1438
+ static readonly INTEGER: 2;
1439
+ static readonly FLOAT: 3;
1440
+ static readonly STRING: 4;
1441
+ static readonly _capnp: {
1442
+ displayName: string;
1443
+ id: string;
1444
+ size: $.ObjectSize;
1445
+ };
1446
+ get _isUndefined(): boolean;
1447
+ set undefined(_: true);
1448
+ get boolean(): boolean;
1449
+ get _isBoolean(): boolean;
1450
+ set boolean(value: boolean);
1451
+ get integer(): number;
1452
+ get _isInteger(): boolean;
1453
+ set integer(value: number);
1454
+ get float(): number;
1455
+ get _isFloat(): boolean;
1456
+ set float(value: number);
1457
+ get string(): string;
1458
+ get _isString(): boolean;
1459
+ set string(value: string);
1460
+ toString(): string;
1461
+ which(): DefaultValueReflection_Value_Which;
1462
+ }
1463
+ declare class DefaultValueReflection extends $.Struct {
1464
+ static readonly _capnp: {
1465
+ displayName: string;
1466
+ id: string;
1467
+ size: $.ObjectSize;
1468
+ };
1469
+ get value(): DefaultValueReflection_Value;
1470
+ _initValue(): DefaultValueReflection_Value;
1471
+ toString(): string;
1472
+ }
1473
+ declare class SerializedTypeReference extends $.Struct {
1474
+ static readonly _capnp: {
1475
+ displayName: string;
1476
+ id: string;
1477
+ size: $.ObjectSize;
1478
+ };
1479
+ get id(): number;
1480
+ set id(value: number);
1481
+ toString(): string;
1482
+ }
1483
+ declare class IndexAccessOrigin extends $.Struct {
1484
+ static readonly _capnp: {
1485
+ displayName: string;
1486
+ id: string;
1487
+ size: $.ObjectSize;
1488
+ };
1489
+ _adoptContainer(value: $.Orphan<SerializedTypeReference>): void;
1490
+ _disownContainer(): $.Orphan<SerializedTypeReference>;
1491
+ get container(): SerializedTypeReference;
1492
+ _hasContainer(): boolean;
1493
+ _initContainer(): SerializedTypeReference;
1494
+ set container(value: SerializedTypeReference);
1495
+ _adoptIndex(value: $.Orphan<SerializedTypeReference>): void;
1496
+ _disownIndex(): $.Orphan<SerializedTypeReference>;
1497
+ get index(): SerializedTypeReference;
1498
+ _hasIndex(): boolean;
1499
+ _initIndex(): SerializedTypeReference;
1500
+ set index(value: SerializedTypeReference);
1501
+ toString(): string;
1502
+ }
1503
+ declare class SerializedTypeObjectLiteral extends $.Struct {
1504
+ static readonly _capnp: {
1505
+ displayName: string;
1506
+ id: string;
1507
+ size: $.ObjectSize;
1508
+ };
1509
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1510
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1511
+ static _Types: $.ListCtor<SerializedTypeReference>;
1512
+ get typeName(): string;
1513
+ set typeName(value: string);
1514
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1515
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1516
+ get typeArguments(): $.List<SerializedTypeReference>;
1517
+ _hasTypeArguments(): boolean;
1518
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1519
+ set typeArguments(value: $.List<SerializedTypeReference>);
1520
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1521
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1522
+ get indexAccessOrigin(): IndexAccessOrigin;
1523
+ _hasIndexAccessOrigin(): boolean;
1524
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1525
+ set indexAccessOrigin(value: IndexAccessOrigin);
1526
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1527
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1528
+ get decorators(): $.List<SerializedTypeReference>;
1529
+ _hasDecorators(): boolean;
1530
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1531
+ set decorators(value: $.List<SerializedTypeReference>);
1532
+ get kind(): ReflectionKind;
1533
+ set kind(value: ReflectionKind);
1534
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1535
+ _disownTypes(): $.Orphan<$.List<SerializedTypeReference>>;
1536
+ get types(): $.List<SerializedTypeReference>;
1537
+ _hasTypes(): boolean;
1538
+ _initTypes(length: number): $.List<SerializedTypeReference>;
1539
+ set types(value: $.List<SerializedTypeReference>);
1540
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
1541
+ _disownTags(): $.Orphan<TagsReflection>;
1542
+ get tags(): TagsReflection;
1543
+ _hasTags(): boolean;
1544
+ _initTags(): TagsReflection;
1545
+ set tags(value: TagsReflection);
1546
+ toString(): string;
1547
+ }
1548
+ declare class SerializedTypeClassType extends $.Struct {
1549
+ static readonly _capnp: {
1550
+ displayName: string;
1551
+ id: string;
1552
+ size: $.ObjectSize;
1553
+ };
1554
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1555
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1556
+ static _ExtendsArguments: $.ListCtor<SerializedTypeReference>;
1557
+ static _Arguments: $.ListCtor<SerializedTypeReference>;
1558
+ static _Types: $.ListCtor<SerializedTypeReference>;
1559
+ get typeName(): string;
1560
+ set typeName(value: string);
1561
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1562
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1563
+ get typeArguments(): $.List<SerializedTypeReference>;
1564
+ _hasTypeArguments(): boolean;
1565
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1566
+ set typeArguments(value: $.List<SerializedTypeReference>);
1567
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1568
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1569
+ get indexAccessOrigin(): IndexAccessOrigin;
1570
+ _hasIndexAccessOrigin(): boolean;
1571
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1572
+ set indexAccessOrigin(value: IndexAccessOrigin);
1573
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1574
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1575
+ get decorators(): $.List<SerializedTypeReference>;
1576
+ _hasDecorators(): boolean;
1577
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1578
+ set decorators(value: $.List<SerializedTypeReference>);
1579
+ get kind(): ReflectionKind;
1580
+ set kind(value: ReflectionKind);
1581
+ get name(): string;
1582
+ set name(value: string);
1583
+ get globalObject(): boolean;
1584
+ set globalObject(value: boolean);
1585
+ get classType(): string;
1586
+ set classType(value: string);
1587
+ _adoptExtendsArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1588
+ _disownExtendsArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1589
+ get extendsArguments(): $.List<SerializedTypeReference>;
1590
+ _hasExtendsArguments(): boolean;
1591
+ _initExtendsArguments(length: number): $.List<SerializedTypeReference>;
1592
+ set extendsArguments(value: $.List<SerializedTypeReference>);
1593
+ _adoptArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1594
+ _disownArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1595
+ get arguments(): $.List<SerializedTypeReference>;
1596
+ _hasArguments(): boolean;
1597
+ _initArguments(length: number): $.List<SerializedTypeReference>;
1598
+ set arguments(value: $.List<SerializedTypeReference>);
1599
+ _adoptSuperClass(value: $.Orphan<SerializedTypeReference>): void;
1600
+ _disownSuperClass(): $.Orphan<SerializedTypeReference>;
1601
+ get superClass(): SerializedTypeReference;
1602
+ _hasSuperClass(): boolean;
1603
+ _initSuperClass(): SerializedTypeReference;
1604
+ set superClass(value: SerializedTypeReference);
1605
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1606
+ _disownTypes(): $.Orphan<$.List<SerializedTypeReference>>;
1607
+ get types(): $.List<SerializedTypeReference>;
1608
+ _hasTypes(): boolean;
1609
+ _initTypes(length: number): $.List<SerializedTypeReference>;
1610
+ set types(value: $.List<SerializedTypeReference>);
1611
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
1612
+ _disownTags(): $.Orphan<TagsReflection>;
1613
+ get tags(): TagsReflection;
1614
+ _hasTags(): boolean;
1615
+ _initTags(): TagsReflection;
1616
+ set tags(value: TagsReflection);
1617
+ toString(): string;
1618
+ }
1619
+ declare class SerializedTypeParameter extends $.Struct {
1620
+ static readonly _capnp: {
1621
+ displayName: string;
1622
+ id: string;
1623
+ size: $.ObjectSize;
1624
+ };
1625
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1626
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1627
+ get typeName(): string;
1628
+ set typeName(value: string);
1629
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1630
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1631
+ get typeArguments(): $.List<SerializedTypeReference>;
1632
+ _hasTypeArguments(): boolean;
1633
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1634
+ set typeArguments(value: $.List<SerializedTypeReference>);
1635
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1636
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1637
+ get indexAccessOrigin(): IndexAccessOrigin;
1638
+ _hasIndexAccessOrigin(): boolean;
1639
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1640
+ set indexAccessOrigin(value: IndexAccessOrigin);
1641
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1642
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1643
+ get decorators(): $.List<SerializedTypeReference>;
1644
+ _hasDecorators(): boolean;
1645
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1646
+ set decorators(value: $.List<SerializedTypeReference>);
1647
+ get kind(): ReflectionKind;
1648
+ set kind(value: ReflectionKind);
1649
+ get name(): string;
1650
+ set name(value: string);
1651
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
1652
+ _disownType(): $.Orphan<SerializedTypeReference>;
1653
+ get type(): SerializedTypeReference;
1654
+ _hasType(): boolean;
1655
+ _initType(): SerializedTypeReference;
1656
+ set type(value: SerializedTypeReference);
1657
+ get visibility(): ReflectionVisibility;
1658
+ set visibility(value: ReflectionVisibility);
1659
+ get readonly(): boolean;
1660
+ set readonly(value: boolean);
1661
+ get optional(): boolean;
1662
+ set optional(value: boolean);
1663
+ _adoptDefault(value: $.Orphan<DefaultValueReflection>): void;
1664
+ _disownDefault(): $.Orphan<DefaultValueReflection>;
1665
+ get default(): DefaultValueReflection;
1666
+ _hasDefault(): boolean;
1667
+ _initDefault(): DefaultValueReflection;
1668
+ set default(value: DefaultValueReflection);
1669
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
1670
+ _disownTags(): $.Orphan<TagsReflection>;
1671
+ get tags(): TagsReflection;
1672
+ _hasTags(): boolean;
1673
+ _initTags(): TagsReflection;
1674
+ set tags(value: TagsReflection);
1675
+ toString(): string;
1676
+ }
1677
+ declare class SerializedTypeMethod extends $.Struct {
1678
+ static readonly _capnp: {
1679
+ displayName: string;
1680
+ id: string;
1681
+ size: $.ObjectSize;
1682
+ };
1683
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1684
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1685
+ static _Parameters: $.ListCtor<SerializedTypeParameter>;
1686
+ get typeName(): string;
1687
+ set typeName(value: string);
1688
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1689
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1690
+ get typeArguments(): $.List<SerializedTypeReference>;
1691
+ _hasTypeArguments(): boolean;
1692
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1693
+ set typeArguments(value: $.List<SerializedTypeReference>);
1694
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1695
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1696
+ get indexAccessOrigin(): IndexAccessOrigin;
1697
+ _hasIndexAccessOrigin(): boolean;
1698
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1699
+ set indexAccessOrigin(value: IndexAccessOrigin);
1700
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1701
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1702
+ get decorators(): $.List<SerializedTypeReference>;
1703
+ _hasDecorators(): boolean;
1704
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1705
+ set decorators(value: $.List<SerializedTypeReference>);
1706
+ get visibility(): ReflectionVisibility;
1707
+ set visibility(value: ReflectionVisibility);
1708
+ get abstract(): boolean;
1709
+ set abstract(value: boolean);
1710
+ get optional(): boolean;
1711
+ set optional(value: boolean);
1712
+ get readonly(): boolean;
1713
+ set readonly(value: boolean);
1714
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
1715
+ _disownTags(): $.Orphan<TagsReflection>;
1716
+ get tags(): TagsReflection;
1717
+ _hasTags(): boolean;
1718
+ _initTags(): TagsReflection;
1719
+ set tags(value: TagsReflection);
1720
+ get kind(): ReflectionKind;
1721
+ set kind(value: ReflectionKind);
1722
+ get name(): string;
1723
+ set name(value: string);
1724
+ _adoptParameters(value: $.Orphan<$.List<SerializedTypeParameter>>): void;
1725
+ _disownParameters(): $.Orphan<$.List<SerializedTypeParameter>>;
1726
+ get parameters(): $.List<SerializedTypeParameter>;
1727
+ _hasParameters(): boolean;
1728
+ _initParameters(length: number): $.List<SerializedTypeParameter>;
1729
+ set parameters(value: $.List<SerializedTypeParameter>);
1730
+ _adoptReturn(value: $.Orphan<SerializedTypeReference>): void;
1731
+ _disownReturn(): $.Orphan<SerializedTypeReference>;
1732
+ get return(): SerializedTypeReference;
1733
+ _hasReturn(): boolean;
1734
+ _initReturn(): SerializedTypeReference;
1735
+ set return(value: SerializedTypeReference);
1736
+ toString(): string;
1737
+ }
1738
+ declare class SerializedTypeProperty extends $.Struct {
1739
+ static readonly _capnp: {
1740
+ displayName: string;
1741
+ id: string;
1742
+ size: $.ObjectSize;
1743
+ };
1744
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1745
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1746
+ get typeName(): string;
1747
+ set typeName(value: string);
1748
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1749
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1750
+ get typeArguments(): $.List<SerializedTypeReference>;
1751
+ _hasTypeArguments(): boolean;
1752
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1753
+ set typeArguments(value: $.List<SerializedTypeReference>);
1754
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1755
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1756
+ get indexAccessOrigin(): IndexAccessOrigin;
1757
+ _hasIndexAccessOrigin(): boolean;
1758
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1759
+ set indexAccessOrigin(value: IndexAccessOrigin);
1760
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1761
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1762
+ get decorators(): $.List<SerializedTypeReference>;
1763
+ _hasDecorators(): boolean;
1764
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1765
+ set decorators(value: $.List<SerializedTypeReference>);
1766
+ get visibility(): ReflectionVisibility;
1767
+ set visibility(value: ReflectionVisibility);
1768
+ get abstract(): boolean;
1769
+ set abstract(value: boolean);
1770
+ get optional(): boolean;
1771
+ set optional(value: boolean);
1772
+ get readonly(): boolean;
1773
+ set readonly(value: boolean);
1774
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
1775
+ _disownTags(): $.Orphan<TagsReflection>;
1776
+ get tags(): TagsReflection;
1777
+ _hasTags(): boolean;
1778
+ _initTags(): TagsReflection;
1779
+ set tags(value: TagsReflection);
1780
+ get kind(): ReflectionKind;
1781
+ set kind(value: ReflectionKind);
1782
+ get name(): string;
1783
+ set name(value: string);
1784
+ get description(): string;
1785
+ set description(value: string);
1786
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
1787
+ _disownType(): $.Orphan<SerializedTypeReference>;
1788
+ get type(): SerializedTypeReference;
1789
+ _hasType(): boolean;
1790
+ _initType(): SerializedTypeReference;
1791
+ set type(value: SerializedTypeReference);
1792
+ _adoptDefault(value: $.Orphan<DefaultValueReflection>): void;
1793
+ _disownDefault(): $.Orphan<DefaultValueReflection>;
1794
+ get default(): DefaultValueReflection;
1795
+ _hasDefault(): boolean;
1796
+ _initDefault(): DefaultValueReflection;
1797
+ set default(value: DefaultValueReflection);
1798
+ toString(): string;
1799
+ }
1800
+ declare class SerializedTypeFunction extends $.Struct {
1801
+ static readonly _capnp: {
1802
+ displayName: string;
1803
+ id: string;
1804
+ size: $.ObjectSize;
1805
+ };
1806
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1807
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1808
+ static _Parameters: $.ListCtor<SerializedTypeParameter>;
1809
+ get typeName(): string;
1810
+ set typeName(value: string);
1811
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1812
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1813
+ get typeArguments(): $.List<SerializedTypeReference>;
1814
+ _hasTypeArguments(): boolean;
1815
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1816
+ set typeArguments(value: $.List<SerializedTypeReference>);
1817
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1818
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1819
+ get indexAccessOrigin(): IndexAccessOrigin;
1820
+ _hasIndexAccessOrigin(): boolean;
1821
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1822
+ set indexAccessOrigin(value: IndexAccessOrigin);
1823
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1824
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1825
+ get decorators(): $.List<SerializedTypeReference>;
1826
+ _hasDecorators(): boolean;
1827
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1828
+ set decorators(value: $.List<SerializedTypeReference>);
1829
+ get visibility(): ReflectionVisibility;
1830
+ set visibility(value: ReflectionVisibility);
1831
+ get abstract(): boolean;
1832
+ set abstract(value: boolean);
1833
+ get optional(): boolean;
1834
+ set optional(value: boolean);
1835
+ get readonly(): boolean;
1836
+ set readonly(value: boolean);
1837
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
1838
+ _disownTags(): $.Orphan<TagsReflection>;
1839
+ get tags(): TagsReflection;
1840
+ _hasTags(): boolean;
1841
+ _initTags(): TagsReflection;
1842
+ set tags(value: TagsReflection);
1843
+ get kind(): ReflectionKind;
1844
+ set kind(value: ReflectionKind);
1845
+ get name(): string;
1846
+ set name(value: string);
1847
+ _adoptParameters(value: $.Orphan<$.List<SerializedTypeParameter>>): void;
1848
+ _disownParameters(): $.Orphan<$.List<SerializedTypeParameter>>;
1849
+ get parameters(): $.List<SerializedTypeParameter>;
1850
+ _hasParameters(): boolean;
1851
+ _initParameters(length: number): $.List<SerializedTypeParameter>;
1852
+ set parameters(value: $.List<SerializedTypeParameter>);
1853
+ _adoptReturn(value: $.Orphan<SerializedTypeReference>): void;
1854
+ _disownReturn(): $.Orphan<SerializedTypeReference>;
1855
+ get return(): SerializedTypeReference;
1856
+ _hasReturn(): boolean;
1857
+ _initReturn(): SerializedTypeReference;
1858
+ set return(value: SerializedTypeReference);
1859
+ toString(): string;
1860
+ }
1861
+ declare class SerializedTypePromise extends $.Struct {
1862
+ static readonly _capnp: {
1863
+ displayName: string;
1864
+ id: string;
1865
+ size: $.ObjectSize;
1866
+ };
1867
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1868
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1869
+ get typeName(): string;
1870
+ set typeName(value: string);
1871
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1872
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1873
+ get typeArguments(): $.List<SerializedTypeReference>;
1874
+ _hasTypeArguments(): boolean;
1875
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1876
+ set typeArguments(value: $.List<SerializedTypeReference>);
1877
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1878
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1879
+ get indexAccessOrigin(): IndexAccessOrigin;
1880
+ _hasIndexAccessOrigin(): boolean;
1881
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1882
+ set indexAccessOrigin(value: IndexAccessOrigin);
1883
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1884
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1885
+ get decorators(): $.List<SerializedTypeReference>;
1886
+ _hasDecorators(): boolean;
1887
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1888
+ set decorators(value: $.List<SerializedTypeReference>);
1889
+ get visibility(): ReflectionVisibility;
1890
+ set visibility(value: ReflectionVisibility);
1891
+ get abstract(): boolean;
1892
+ set abstract(value: boolean);
1893
+ toString(): string;
1894
+ }
1895
+ declare class SerializedTypeEnumEntry extends $.Struct {
1896
+ static readonly _capnp: {
1897
+ displayName: string;
1898
+ id: string;
1899
+ size: $.ObjectSize;
1900
+ };
1901
+ get name(): string;
1902
+ set name(value: string);
1903
+ get value(): string;
1904
+ set value(value: string);
1905
+ toString(): string;
1906
+ }
1907
+ declare class SerializedTypeEnum extends $.Struct {
1908
+ static readonly _capnp: {
1909
+ displayName: string;
1910
+ id: string;
1911
+ size: $.ObjectSize;
1912
+ };
1913
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1914
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1915
+ static _EnumEntries: $.ListCtor<SerializedTypeEnumEntry>;
1916
+ get typeName(): string;
1917
+ set typeName(value: string);
1918
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1919
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1920
+ get typeArguments(): $.List<SerializedTypeReference>;
1921
+ _hasTypeArguments(): boolean;
1922
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1923
+ set typeArguments(value: $.List<SerializedTypeReference>);
1924
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1925
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1926
+ get indexAccessOrigin(): IndexAccessOrigin;
1927
+ _hasIndexAccessOrigin(): boolean;
1928
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1929
+ set indexAccessOrigin(value: IndexAccessOrigin);
1930
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1931
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1932
+ get decorators(): $.List<SerializedTypeReference>;
1933
+ _hasDecorators(): boolean;
1934
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1935
+ set decorators(value: $.List<SerializedTypeReference>);
1936
+ get kind(): ReflectionKind;
1937
+ set kind(value: ReflectionKind);
1938
+ _adoptEnumEntries(value: $.Orphan<$.List<SerializedTypeEnumEntry>>): void;
1939
+ _disownEnumEntries(): $.Orphan<$.List<SerializedTypeEnumEntry>>;
1940
+ get enumEntries(): $.List<SerializedTypeEnumEntry>;
1941
+ _hasEnumEntries(): boolean;
1942
+ _initEnumEntries(length: number): $.List<SerializedTypeEnumEntry>;
1943
+ set enumEntries(value: $.List<SerializedTypeEnumEntry>);
1944
+ _adoptValues(value: $.Orphan<$.List<string>>): void;
1945
+ _disownValues(): $.Orphan<$.List<string>>;
1946
+ get values(): $.List<string>;
1947
+ _hasValues(): boolean;
1948
+ _initValues(length: number): $.List<string>;
1949
+ set values(value: $.List<string>);
1950
+ _adoptIndexType(value: $.Orphan<SerializedTypeReference>): void;
1951
+ _disownIndexType(): $.Orphan<SerializedTypeReference>;
1952
+ get indexType(): SerializedTypeReference;
1953
+ _hasIndexType(): boolean;
1954
+ _initIndexType(): SerializedTypeReference;
1955
+ set indexType(value: SerializedTypeReference);
1956
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
1957
+ _disownTags(): $.Orphan<TagsReflection>;
1958
+ get tags(): TagsReflection;
1959
+ _hasTags(): boolean;
1960
+ _initTags(): TagsReflection;
1961
+ set tags(value: TagsReflection);
1962
+ toString(): string;
1963
+ }
1964
+ declare class SerializedTypeUnion extends $.Struct {
1965
+ static readonly _capnp: {
1966
+ displayName: string;
1967
+ id: string;
1968
+ size: $.ObjectSize;
1969
+ };
1970
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
1971
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
1972
+ static _Types: $.ListCtor<SerializedTypeReference>;
1973
+ get typeName(): string;
1974
+ set typeName(value: string);
1975
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1976
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
1977
+ get typeArguments(): $.List<SerializedTypeReference>;
1978
+ _hasTypeArguments(): boolean;
1979
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
1980
+ set typeArguments(value: $.List<SerializedTypeReference>);
1981
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
1982
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
1983
+ get indexAccessOrigin(): IndexAccessOrigin;
1984
+ _hasIndexAccessOrigin(): boolean;
1985
+ _initIndexAccessOrigin(): IndexAccessOrigin;
1986
+ set indexAccessOrigin(value: IndexAccessOrigin);
1987
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1988
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
1989
+ get decorators(): $.List<SerializedTypeReference>;
1990
+ _hasDecorators(): boolean;
1991
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
1992
+ set decorators(value: $.List<SerializedTypeReference>);
1993
+ get kind(): ReflectionKind;
1994
+ set kind(value: ReflectionKind);
1995
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeReference>>): void;
1996
+ _disownTypes(): $.Orphan<$.List<SerializedTypeReference>>;
1997
+ get types(): $.List<SerializedTypeReference>;
1998
+ _hasTypes(): boolean;
1999
+ _initTypes(length: number): $.List<SerializedTypeReference>;
2000
+ set types(value: $.List<SerializedTypeReference>);
2001
+ toString(): string;
2002
+ }
2003
+ declare class SerializedTypeIntersection extends $.Struct {
2004
+ static readonly _capnp: {
2005
+ displayName: string;
2006
+ id: string;
2007
+ size: $.ObjectSize;
2008
+ };
2009
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2010
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2011
+ static _Types: $.ListCtor<SerializedTypeReference>;
2012
+ get typeName(): string;
2013
+ set typeName(value: string);
2014
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2015
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2016
+ get typeArguments(): $.List<SerializedTypeReference>;
2017
+ _hasTypeArguments(): boolean;
2018
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2019
+ set typeArguments(value: $.List<SerializedTypeReference>);
2020
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2021
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2022
+ get indexAccessOrigin(): IndexAccessOrigin;
2023
+ _hasIndexAccessOrigin(): boolean;
2024
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2025
+ set indexAccessOrigin(value: IndexAccessOrigin);
2026
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2027
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2028
+ get decorators(): $.List<SerializedTypeReference>;
2029
+ _hasDecorators(): boolean;
2030
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2031
+ set decorators(value: $.List<SerializedTypeReference>);
2032
+ get kind(): ReflectionKind;
2033
+ set kind(value: ReflectionKind);
2034
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2035
+ _disownTypes(): $.Orphan<$.List<SerializedTypeReference>>;
2036
+ get types(): $.List<SerializedTypeReference>;
2037
+ _hasTypes(): boolean;
2038
+ _initTypes(length: number): $.List<SerializedTypeReference>;
2039
+ set types(value: $.List<SerializedTypeReference>);
2040
+ toString(): string;
2041
+ }
2042
+ declare class SerializedTypeArray extends $.Struct {
2043
+ static readonly _capnp: {
2044
+ displayName: string;
2045
+ id: string;
2046
+ size: $.ObjectSize;
2047
+ };
2048
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2049
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2050
+ get typeName(): string;
2051
+ set typeName(value: string);
2052
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2053
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2054
+ get typeArguments(): $.List<SerializedTypeReference>;
2055
+ _hasTypeArguments(): boolean;
2056
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2057
+ set typeArguments(value: $.List<SerializedTypeReference>);
2058
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2059
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2060
+ get indexAccessOrigin(): IndexAccessOrigin;
2061
+ _hasIndexAccessOrigin(): boolean;
2062
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2063
+ set indexAccessOrigin(value: IndexAccessOrigin);
2064
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2065
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2066
+ get decorators(): $.List<SerializedTypeReference>;
2067
+ _hasDecorators(): boolean;
2068
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2069
+ set decorators(value: $.List<SerializedTypeReference>);
2070
+ get kind(): ReflectionKind;
2071
+ set kind(value: ReflectionKind);
2072
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
2073
+ _disownType(): $.Orphan<SerializedTypeReference>;
2074
+ get type(): SerializedTypeReference;
2075
+ _hasType(): boolean;
2076
+ _initType(): SerializedTypeReference;
2077
+ set type(value: SerializedTypeReference);
2078
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
2079
+ _disownTags(): $.Orphan<TagsReflection>;
2080
+ get tags(): TagsReflection;
2081
+ _hasTags(): boolean;
2082
+ _initTags(): TagsReflection;
2083
+ set tags(value: TagsReflection);
2084
+ toString(): string;
2085
+ }
2086
+ declare class SerializedTypeIndexSignature extends $.Struct {
2087
+ static readonly _capnp: {
2088
+ displayName: string;
2089
+ id: string;
2090
+ size: $.ObjectSize;
2091
+ };
2092
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2093
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2094
+ get typeName(): string;
2095
+ set typeName(value: string);
2096
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2097
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2098
+ get typeArguments(): $.List<SerializedTypeReference>;
2099
+ _hasTypeArguments(): boolean;
2100
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2101
+ set typeArguments(value: $.List<SerializedTypeReference>);
2102
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2103
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2104
+ get indexAccessOrigin(): IndexAccessOrigin;
2105
+ _hasIndexAccessOrigin(): boolean;
2106
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2107
+ set indexAccessOrigin(value: IndexAccessOrigin);
2108
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2109
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2110
+ get decorators(): $.List<SerializedTypeReference>;
2111
+ _hasDecorators(): boolean;
2112
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2113
+ set decorators(value: $.List<SerializedTypeReference>);
2114
+ get kind(): ReflectionKind;
2115
+ set kind(value: ReflectionKind);
2116
+ _adoptIndex(value: $.Orphan<SerializedTypeReference>): void;
2117
+ _disownIndex(): $.Orphan<SerializedTypeReference>;
2118
+ get index(): SerializedTypeReference;
2119
+ _hasIndex(): boolean;
2120
+ _initIndex(): SerializedTypeReference;
2121
+ set index(value: SerializedTypeReference);
2122
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
2123
+ _disownType(): $.Orphan<SerializedTypeReference>;
2124
+ get type(): SerializedTypeReference;
2125
+ _hasType(): boolean;
2126
+ _initType(): SerializedTypeReference;
2127
+ set type(value: SerializedTypeReference);
2128
+ toString(): string;
2129
+ }
2130
+ declare class SerializedTypePropertySignature extends $.Struct {
2131
+ static readonly _capnp: {
2132
+ displayName: string;
2133
+ id: string;
2134
+ size: $.ObjectSize;
2135
+ };
2136
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2137
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2138
+ get typeName(): string;
2139
+ set typeName(value: string);
2140
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2141
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2142
+ get typeArguments(): $.List<SerializedTypeReference>;
2143
+ _hasTypeArguments(): boolean;
2144
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2145
+ set typeArguments(value: $.List<SerializedTypeReference>);
2146
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2147
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2148
+ get indexAccessOrigin(): IndexAccessOrigin;
2149
+ _hasIndexAccessOrigin(): boolean;
2150
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2151
+ set indexAccessOrigin(value: IndexAccessOrigin);
2152
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2153
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2154
+ get decorators(): $.List<SerializedTypeReference>;
2155
+ _hasDecorators(): boolean;
2156
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2157
+ set decorators(value: $.List<SerializedTypeReference>);
2158
+ get kind(): ReflectionKind;
2159
+ set kind(value: ReflectionKind);
2160
+ get name(): string;
2161
+ set name(value: string);
2162
+ get optional(): boolean;
2163
+ set optional(value: boolean);
2164
+ get readonly(): boolean;
2165
+ set readonly(value: boolean);
2166
+ get description(): string;
2167
+ set description(value: string);
2168
+ _adoptDefault(value: $.Orphan<DefaultValueReflection>): void;
2169
+ _disownDefault(): $.Orphan<DefaultValueReflection>;
2170
+ get default(): DefaultValueReflection;
2171
+ _hasDefault(): boolean;
2172
+ _initDefault(): DefaultValueReflection;
2173
+ set default(value: DefaultValueReflection);
2174
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
2175
+ _disownType(): $.Orphan<SerializedTypeReference>;
2176
+ get type(): SerializedTypeReference;
2177
+ _hasType(): boolean;
2178
+ _initType(): SerializedTypeReference;
2179
+ set type(value: SerializedTypeReference);
2180
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
2181
+ _disownTags(): $.Orphan<TagsReflection>;
2182
+ get tags(): TagsReflection;
2183
+ _hasTags(): boolean;
2184
+ _initTags(): TagsReflection;
2185
+ set tags(value: TagsReflection);
2186
+ toString(): string;
2187
+ }
2188
+ declare class SerializedTypeMethodSignature extends $.Struct {
2189
+ static readonly _capnp: {
2190
+ displayName: string;
2191
+ id: string;
2192
+ size: $.ObjectSize;
2193
+ };
2194
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2195
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2196
+ static _Parameters: $.ListCtor<SerializedTypeParameter>;
2197
+ get typeName(): string;
2198
+ set typeName(value: string);
2199
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2200
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2201
+ get typeArguments(): $.List<SerializedTypeReference>;
2202
+ _hasTypeArguments(): boolean;
2203
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2204
+ set typeArguments(value: $.List<SerializedTypeReference>);
2205
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2206
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2207
+ get indexAccessOrigin(): IndexAccessOrigin;
2208
+ _hasIndexAccessOrigin(): boolean;
2209
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2210
+ set indexAccessOrigin(value: IndexAccessOrigin);
2211
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2212
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2213
+ get decorators(): $.List<SerializedTypeReference>;
2214
+ _hasDecorators(): boolean;
2215
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2216
+ set decorators(value: $.List<SerializedTypeReference>);
2217
+ get kind(): ReflectionKind;
2218
+ set kind(value: ReflectionKind);
2219
+ get name(): string;
2220
+ set name(value: string);
2221
+ get optional(): boolean;
2222
+ set optional(value: boolean);
2223
+ _adoptParameters(value: $.Orphan<$.List<SerializedTypeParameter>>): void;
2224
+ _disownParameters(): $.Orphan<$.List<SerializedTypeParameter>>;
2225
+ get parameters(): $.List<SerializedTypeParameter>;
2226
+ _hasParameters(): boolean;
2227
+ _initParameters(length: number): $.List<SerializedTypeParameter>;
2228
+ set parameters(value: $.List<SerializedTypeParameter>);
2229
+ _adoptReturn(value: $.Orphan<SerializedTypeReference>): void;
2230
+ _disownReturn(): $.Orphan<SerializedTypeReference>;
2231
+ get return(): SerializedTypeReference;
2232
+ _hasReturn(): boolean;
2233
+ _initReturn(): SerializedTypeReference;
2234
+ set return(value: SerializedTypeReference);
2235
+ _adoptTags(value: $.Orphan<TagsReflection>): void;
2236
+ _disownTags(): $.Orphan<TagsReflection>;
2237
+ get tags(): TagsReflection;
2238
+ _hasTags(): boolean;
2239
+ _initTags(): TagsReflection;
2240
+ set tags(value: TagsReflection);
2241
+ toString(): string;
2242
+ }
2243
+ declare class SerializedTypeTypeParameter extends $.Struct {
2244
+ static readonly _capnp: {
2245
+ displayName: string;
2246
+ id: string;
2247
+ size: $.ObjectSize;
2248
+ };
2249
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2250
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2251
+ get typeName(): string;
2252
+ set typeName(value: string);
2253
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2254
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2255
+ get typeArguments(): $.List<SerializedTypeReference>;
2256
+ _hasTypeArguments(): boolean;
2257
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2258
+ set typeArguments(value: $.List<SerializedTypeReference>);
2259
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2260
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2261
+ get indexAccessOrigin(): IndexAccessOrigin;
2262
+ _hasIndexAccessOrigin(): boolean;
2263
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2264
+ set indexAccessOrigin(value: IndexAccessOrigin);
2265
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2266
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2267
+ get decorators(): $.List<SerializedTypeReference>;
2268
+ _hasDecorators(): boolean;
2269
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2270
+ set decorators(value: $.List<SerializedTypeReference>);
2271
+ get kind(): ReflectionKind;
2272
+ set kind(value: ReflectionKind);
2273
+ get name(): string;
2274
+ set name(value: string);
2275
+ toString(): string;
2276
+ }
2277
+ declare class SerializedTypeInfer extends $.Struct {
2278
+ static readonly _capnp: {
2279
+ displayName: string;
2280
+ id: string;
2281
+ size: $.ObjectSize;
2282
+ };
2283
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2284
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2285
+ get typeName(): string;
2286
+ set typeName(value: string);
2287
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2288
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2289
+ get typeArguments(): $.List<SerializedTypeReference>;
2290
+ _hasTypeArguments(): boolean;
2291
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2292
+ set typeArguments(value: $.List<SerializedTypeReference>);
2293
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2294
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2295
+ get indexAccessOrigin(): IndexAccessOrigin;
2296
+ _hasIndexAccessOrigin(): boolean;
2297
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2298
+ set indexAccessOrigin(value: IndexAccessOrigin);
2299
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2300
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2301
+ get decorators(): $.List<SerializedTypeReference>;
2302
+ _hasDecorators(): boolean;
2303
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2304
+ set decorators(value: $.List<SerializedTypeReference>);
2305
+ get kind(): ReflectionKind;
2306
+ set kind(value: ReflectionKind);
2307
+ toString(): string;
2308
+ }
2309
+ declare class SerializedTypeTupleMember extends $.Struct {
2310
+ static readonly _capnp: {
2311
+ displayName: string;
2312
+ id: string;
2313
+ size: $.ObjectSize;
2314
+ };
2315
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2316
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2317
+ get typeName(): string;
2318
+ set typeName(value: string);
2319
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2320
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2321
+ get typeArguments(): $.List<SerializedTypeReference>;
2322
+ _hasTypeArguments(): boolean;
2323
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2324
+ set typeArguments(value: $.List<SerializedTypeReference>);
2325
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2326
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2327
+ get indexAccessOrigin(): IndexAccessOrigin;
2328
+ _hasIndexAccessOrigin(): boolean;
2329
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2330
+ set indexAccessOrigin(value: IndexAccessOrigin);
2331
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2332
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2333
+ get decorators(): $.List<SerializedTypeReference>;
2334
+ _hasDecorators(): boolean;
2335
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2336
+ set decorators(value: $.List<SerializedTypeReference>);
2337
+ get kind(): ReflectionKind;
2338
+ set kind(value: ReflectionKind);
2339
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
2340
+ _disownType(): $.Orphan<SerializedTypeReference>;
2341
+ get type(): SerializedTypeReference;
2342
+ _hasType(): boolean;
2343
+ _initType(): SerializedTypeReference;
2344
+ set type(value: SerializedTypeReference);
2345
+ get optional(): boolean;
2346
+ set optional(value: boolean);
2347
+ get name(): string;
2348
+ set name(value: string);
2349
+ toString(): string;
2350
+ }
2351
+ declare class SerializedTypeTuple extends $.Struct {
2352
+ static readonly _capnp: {
2353
+ displayName: string;
2354
+ id: string;
2355
+ size: $.ObjectSize;
2356
+ };
2357
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2358
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2359
+ static _Types: $.ListCtor<SerializedTypeTupleMember>;
2360
+ get typeName(): string;
2361
+ set typeName(value: string);
2362
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2363
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2364
+ get typeArguments(): $.List<SerializedTypeReference>;
2365
+ _hasTypeArguments(): boolean;
2366
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2367
+ set typeArguments(value: $.List<SerializedTypeReference>);
2368
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2369
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2370
+ get indexAccessOrigin(): IndexAccessOrigin;
2371
+ _hasIndexAccessOrigin(): boolean;
2372
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2373
+ set indexAccessOrigin(value: IndexAccessOrigin);
2374
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2375
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2376
+ get decorators(): $.List<SerializedTypeReference>;
2377
+ _hasDecorators(): boolean;
2378
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2379
+ set decorators(value: $.List<SerializedTypeReference>);
2380
+ get kind(): ReflectionKind;
2381
+ set kind(value: ReflectionKind);
2382
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeTupleMember>>): void;
2383
+ _disownTypes(): $.Orphan<$.List<SerializedTypeTupleMember>>;
2384
+ get types(): $.List<SerializedTypeTupleMember>;
2385
+ _hasTypes(): boolean;
2386
+ _initTypes(length: number): $.List<SerializedTypeTupleMember>;
2387
+ set types(value: $.List<SerializedTypeTupleMember>);
2388
+ toString(): string;
2389
+ }
2390
+ declare class SerializedTypeRest extends $.Struct {
2391
+ static readonly _capnp: {
2392
+ displayName: string;
2393
+ id: string;
2394
+ size: $.ObjectSize;
2395
+ };
2396
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2397
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2398
+ get typeName(): string;
2399
+ set typeName(value: string);
2400
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2401
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2402
+ get typeArguments(): $.List<SerializedTypeReference>;
2403
+ _hasTypeArguments(): boolean;
2404
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2405
+ set typeArguments(value: $.List<SerializedTypeReference>);
2406
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2407
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2408
+ get indexAccessOrigin(): IndexAccessOrigin;
2409
+ _hasIndexAccessOrigin(): boolean;
2410
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2411
+ set indexAccessOrigin(value: IndexAccessOrigin);
2412
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2413
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2414
+ get decorators(): $.List<SerializedTypeReference>;
2415
+ _hasDecorators(): boolean;
2416
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2417
+ set decorators(value: $.List<SerializedTypeReference>);
2418
+ get kind(): ReflectionKind;
2419
+ set kind(value: ReflectionKind);
2420
+ _adoptType(value: $.Orphan<SerializedTypeReference>): void;
2421
+ _disownType(): $.Orphan<SerializedTypeReference>;
2422
+ get type(): SerializedTypeReference;
2423
+ _hasType(): boolean;
2424
+ _initType(): SerializedTypeReference;
2425
+ set type(value: SerializedTypeReference);
2426
+ toString(): string;
2427
+ }
2428
+ declare class SimpleSerializedType extends $.Struct {
2429
+ static readonly _capnp: {
2430
+ displayName: string;
2431
+ id: string;
2432
+ size: $.ObjectSize;
2433
+ };
2434
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2435
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2436
+ get typeName(): string;
2437
+ set typeName(value: string);
2438
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2439
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2440
+ get typeArguments(): $.List<SerializedTypeReference>;
2441
+ _hasTypeArguments(): boolean;
2442
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2443
+ set typeArguments(value: $.List<SerializedTypeReference>);
2444
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2445
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2446
+ get indexAccessOrigin(): IndexAccessOrigin;
2447
+ _hasIndexAccessOrigin(): boolean;
2448
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2449
+ set indexAccessOrigin(value: IndexAccessOrigin);
2450
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2451
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2452
+ get decorators(): $.List<SerializedTypeReference>;
2453
+ _hasDecorators(): boolean;
2454
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2455
+ set decorators(value: $.List<SerializedTypeReference>);
2456
+ get kind(): ReflectionKind;
2457
+ set kind(value: ReflectionKind);
2458
+ _adoptOrigin(value: $.Orphan<SerializedTypeReference>): void;
2459
+ _disownOrigin(): $.Orphan<SerializedTypeReference>;
2460
+ get origin(): SerializedTypeReference;
2461
+ _hasOrigin(): boolean;
2462
+ _initOrigin(): SerializedTypeReference;
2463
+ set origin(value: SerializedTypeReference);
2464
+ toString(): string;
2465
+ }
2466
+ declare class SerializedTypeLiteralSymbol extends $.Struct {
2467
+ static readonly _capnp: {
2468
+ displayName: string;
2469
+ id: string;
2470
+ size: $.ObjectSize;
2471
+ };
2472
+ /**
2473
+ * "symbol"
2474
+ *
2475
+ */
2476
+ get type(): string;
2477
+ set type(value: string);
2478
+ get name(): string;
2479
+ set name(value: string);
2480
+ toString(): string;
2481
+ }
2482
+ declare class SerializedTypeLiteralBigInt extends $.Struct {
2483
+ static readonly _capnp: {
2484
+ displayName: string;
2485
+ id: string;
2486
+ size: $.ObjectSize;
2487
+ };
2488
+ /**
2489
+ * "bigint"
2490
+ *
2491
+ */
2492
+ get type(): string;
2493
+ set type(value: string);
2494
+ get value(): string;
2495
+ set value(value: string);
2496
+ toString(): string;
2497
+ }
2498
+ declare class SerializedTypeLiteralRegex extends $.Struct {
2499
+ static readonly _capnp: {
2500
+ displayName: string;
2501
+ id: string;
2502
+ size: $.ObjectSize;
2503
+ };
2504
+ /**
2505
+ * "regex"
2506
+ *
2507
+ */
2508
+ get type(): string;
2509
+ set type(value: string);
2510
+ get regex(): string;
2511
+ set regex(value: string);
2512
+ toString(): string;
2513
+ }
2514
+ declare const SerializedTypeLiteral_Literal_Which: {
2515
+ readonly SYMBOL: 0;
2516
+ readonly STRING: 1;
2517
+ readonly NUMBER: 2;
2518
+ readonly BOOLEAN: 3;
2519
+ readonly BIGINT: 4;
2520
+ readonly REGEX: 5;
2521
+ };
2522
+ type SerializedTypeLiteral_Literal_Which = (typeof SerializedTypeLiteral_Literal_Which)[keyof typeof SerializedTypeLiteral_Literal_Which];
2523
+ declare class SerializedTypeLiteral_Literal extends $.Struct {
2524
+ static readonly SYMBOL: 0;
2525
+ static readonly STRING: 1;
2526
+ static readonly NUMBER: 2;
2527
+ static readonly BOOLEAN: 3;
2528
+ static readonly BIGINT: 4;
2529
+ static readonly REGEX: 5;
2530
+ static readonly _capnp: {
2531
+ displayName: string;
2532
+ id: string;
2533
+ size: $.ObjectSize;
2534
+ };
2535
+ _adoptSymbol(value: $.Orphan<SerializedTypeLiteralSymbol>): void;
2536
+ _disownSymbol(): $.Orphan<SerializedTypeLiteralSymbol>;
2537
+ get symbol(): SerializedTypeLiteralSymbol;
2538
+ _hasSymbol(): boolean;
2539
+ _initSymbol(): SerializedTypeLiteralSymbol;
2540
+ get _isSymbol(): boolean;
2541
+ set symbol(value: SerializedTypeLiteralSymbol);
2542
+ get string(): string;
2543
+ get _isString(): boolean;
2544
+ set string(value: string);
2545
+ get number(): number;
2546
+ get _isNumber(): boolean;
2547
+ set number(value: number);
2548
+ get boolean(): boolean;
2549
+ get _isBoolean(): boolean;
2550
+ set boolean(value: boolean);
2551
+ _adoptBigint(value: $.Orphan<SerializedTypeLiteralBigInt>): void;
2552
+ _disownBigint(): $.Orphan<SerializedTypeLiteralBigInt>;
2553
+ get bigint(): SerializedTypeLiteralBigInt;
2554
+ _hasBigint(): boolean;
2555
+ _initBigint(): SerializedTypeLiteralBigInt;
2556
+ get _isBigint(): boolean;
2557
+ set bigint(value: SerializedTypeLiteralBigInt);
2558
+ _adoptRegex(value: $.Orphan<SerializedTypeLiteralRegex>): void;
2559
+ _disownRegex(): $.Orphan<SerializedTypeLiteralRegex>;
2560
+ get regex(): SerializedTypeLiteralRegex;
2561
+ _hasRegex(): boolean;
2562
+ _initRegex(): SerializedTypeLiteralRegex;
2563
+ get _isRegex(): boolean;
2564
+ set regex(value: SerializedTypeLiteralRegex);
2565
+ toString(): string;
2566
+ which(): SerializedTypeLiteral_Literal_Which;
2567
+ }
2568
+ declare class SerializedTypeLiteral extends $.Struct {
2569
+ static readonly _capnp: {
2570
+ displayName: string;
2571
+ id: string;
2572
+ size: $.ObjectSize;
2573
+ };
2574
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2575
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2576
+ get typeName(): string;
2577
+ set typeName(value: string);
2578
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2579
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2580
+ get typeArguments(): $.List<SerializedTypeReference>;
2581
+ _hasTypeArguments(): boolean;
2582
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2583
+ set typeArguments(value: $.List<SerializedTypeReference>);
2584
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2585
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2586
+ get indexAccessOrigin(): IndexAccessOrigin;
2587
+ _hasIndexAccessOrigin(): boolean;
2588
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2589
+ set indexAccessOrigin(value: IndexAccessOrigin);
2590
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2591
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2592
+ get decorators(): $.List<SerializedTypeReference>;
2593
+ _hasDecorators(): boolean;
2594
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2595
+ set decorators(value: $.List<SerializedTypeReference>);
2596
+ get kind(): ReflectionKind;
2597
+ set kind(value: ReflectionKind);
2598
+ get literal(): SerializedTypeLiteral_Literal;
2599
+ _initLiteral(): SerializedTypeLiteral_Literal;
2600
+ toString(): string;
2601
+ }
2602
+ declare class SerializedTypeTemplateLiteral extends $.Struct {
2603
+ static readonly _capnp: {
2604
+ displayName: string;
2605
+ id: string;
2606
+ size: $.ObjectSize;
2607
+ };
2608
+ static _TypeArguments: $.ListCtor<SerializedTypeReference>;
2609
+ static _Decorators: $.ListCtor<SerializedTypeReference>;
2610
+ static _Types: $.ListCtor<SerializedTypeReference>;
2611
+ get typeName(): string;
2612
+ set typeName(value: string);
2613
+ _adoptTypeArguments(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2614
+ _disownTypeArguments(): $.Orphan<$.List<SerializedTypeReference>>;
2615
+ get typeArguments(): $.List<SerializedTypeReference>;
2616
+ _hasTypeArguments(): boolean;
2617
+ _initTypeArguments(length: number): $.List<SerializedTypeReference>;
2618
+ set typeArguments(value: $.List<SerializedTypeReference>);
2619
+ _adoptIndexAccessOrigin(value: $.Orphan<IndexAccessOrigin>): void;
2620
+ _disownIndexAccessOrigin(): $.Orphan<IndexAccessOrigin>;
2621
+ get indexAccessOrigin(): IndexAccessOrigin;
2622
+ _hasIndexAccessOrigin(): boolean;
2623
+ _initIndexAccessOrigin(): IndexAccessOrigin;
2624
+ set indexAccessOrigin(value: IndexAccessOrigin);
2625
+ _adoptDecorators(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2626
+ _disownDecorators(): $.Orphan<$.List<SerializedTypeReference>>;
2627
+ get decorators(): $.List<SerializedTypeReference>;
2628
+ _hasDecorators(): boolean;
2629
+ _initDecorators(length: number): $.List<SerializedTypeReference>;
2630
+ set decorators(value: $.List<SerializedTypeReference>);
2631
+ get kind(): ReflectionKind;
2632
+ set kind(value: ReflectionKind);
2633
+ _adoptTypes(value: $.Orphan<$.List<SerializedTypeReference>>): void;
2634
+ _disownTypes(): $.Orphan<$.List<SerializedTypeReference>>;
2635
+ get types(): $.List<SerializedTypeReference>;
2636
+ _hasTypes(): boolean;
2637
+ _initTypes(length: number): $.List<SerializedTypeReference>;
2638
+ set types(value: $.List<SerializedTypeReference>);
2639
+ toString(): string;
2640
+ }
2641
+ declare class SerializedTypeOther extends $.Struct {
2642
+ static readonly _capnp: {
2643
+ displayName: string;
2644
+ id: string;
2645
+ size: $.ObjectSize;
2646
+ };
2647
+ get typeName(): string;
2648
+ set typeName(value: string);
2649
+ get kind(): ReflectionKind;
2650
+ set kind(value: ReflectionKind);
2651
+ toString(): string;
2652
+ }
2653
+ declare const SerializedType_Type_Which: {
2654
+ readonly SIMPLE: 0;
2655
+ readonly LITERAL: 1;
2656
+ readonly TEMPLATE_LITERAL: 2;
2657
+ readonly PARAMETER: 3;
2658
+ readonly FUNCTION: 4;
2659
+ readonly METHOD: 5;
2660
+ readonly PROPERTY: 6;
2661
+ readonly PROMISE: 7;
2662
+ readonly CLASS_TYPE: 8;
2663
+ readonly ENUM: 9;
2664
+ readonly UNION: 10;
2665
+ readonly INTERSECTION: 11;
2666
+ readonly ARRAY: 12;
2667
+ readonly OBJECT_LITERAL: 13;
2668
+ readonly INDEX_SIGNATURE: 14;
2669
+ readonly PROPERTY_SIGNATURE: 15;
2670
+ readonly METHOD_SIGNATURE: 16;
2671
+ readonly TYPE_PARAMETER: 17;
2672
+ readonly INFER: 18;
2673
+ readonly TUPLE: 19;
2674
+ readonly TUPLE_MEMBER: 20;
2675
+ readonly REST: 21;
2676
+ /**
2677
+ * For any other type that is not explicitly defined
2678
+ *
2679
+ */
2680
+ readonly OTHER: 22;
2681
+ };
2682
+ type SerializedType_Type_Which = (typeof SerializedType_Type_Which)[keyof typeof SerializedType_Type_Which];
2683
+ declare class SerializedType_Type extends $.Struct {
2684
+ static readonly SIMPLE: 0;
2685
+ static readonly LITERAL: 1;
2686
+ static readonly TEMPLATE_LITERAL: 2;
2687
+ static readonly PARAMETER: 3;
2688
+ static readonly FUNCTION: 4;
2689
+ static readonly METHOD: 5;
2690
+ static readonly PROPERTY: 6;
2691
+ static readonly PROMISE: 7;
2692
+ static readonly CLASS_TYPE: 8;
2693
+ static readonly ENUM: 9;
2694
+ static readonly UNION: 10;
2695
+ static readonly INTERSECTION: 11;
2696
+ static readonly ARRAY: 12;
2697
+ static readonly OBJECT_LITERAL: 13;
2698
+ static readonly INDEX_SIGNATURE: 14;
2699
+ static readonly PROPERTY_SIGNATURE: 15;
2700
+ static readonly METHOD_SIGNATURE: 16;
2701
+ static readonly TYPE_PARAMETER: 17;
2702
+ static readonly INFER: 18;
2703
+ static readonly TUPLE: 19;
2704
+ static readonly TUPLE_MEMBER: 20;
2705
+ static readonly REST: 21;
2706
+ static readonly OTHER: 22;
2707
+ static readonly _capnp: {
2708
+ displayName: string;
2709
+ id: string;
2710
+ size: $.ObjectSize;
2711
+ };
2712
+ _adoptSimple(value: $.Orphan<SimpleSerializedType>): void;
2713
+ _disownSimple(): $.Orphan<SimpleSerializedType>;
2714
+ get simple(): SimpleSerializedType;
2715
+ _hasSimple(): boolean;
2716
+ _initSimple(): SimpleSerializedType;
2717
+ get _isSimple(): boolean;
2718
+ set simple(value: SimpleSerializedType);
2719
+ _adoptLiteral(value: $.Orphan<SerializedTypeLiteral>): void;
2720
+ _disownLiteral(): $.Orphan<SerializedTypeLiteral>;
2721
+ get literal(): SerializedTypeLiteral;
2722
+ _hasLiteral(): boolean;
2723
+ _initLiteral(): SerializedTypeLiteral;
2724
+ get _isLiteral(): boolean;
2725
+ set literal(value: SerializedTypeLiteral);
2726
+ _adoptTemplateLiteral(value: $.Orphan<SerializedTypeTemplateLiteral>): void;
2727
+ _disownTemplateLiteral(): $.Orphan<SerializedTypeTemplateLiteral>;
2728
+ get templateLiteral(): SerializedTypeTemplateLiteral;
2729
+ _hasTemplateLiteral(): boolean;
2730
+ _initTemplateLiteral(): SerializedTypeTemplateLiteral;
2731
+ get _isTemplateLiteral(): boolean;
2732
+ set templateLiteral(value: SerializedTypeTemplateLiteral);
2733
+ _adoptParameter(value: $.Orphan<SerializedTypeParameter>): void;
2734
+ _disownParameter(): $.Orphan<SerializedTypeParameter>;
2735
+ get parameter(): SerializedTypeParameter;
2736
+ _hasParameter(): boolean;
2737
+ _initParameter(): SerializedTypeParameter;
2738
+ get _isParameter(): boolean;
2739
+ set parameter(value: SerializedTypeParameter);
2740
+ _adoptFunction(value: $.Orphan<SerializedTypeFunction>): void;
2741
+ _disownFunction(): $.Orphan<SerializedTypeFunction>;
2742
+ get function(): SerializedTypeFunction;
2743
+ _hasFunction(): boolean;
2744
+ _initFunction(): SerializedTypeFunction;
2745
+ get _isFunction(): boolean;
2746
+ set function(value: SerializedTypeFunction);
2747
+ _adoptMethod(value: $.Orphan<SerializedTypeMethod>): void;
2748
+ _disownMethod(): $.Orphan<SerializedTypeMethod>;
2749
+ get method(): SerializedTypeMethod;
2750
+ _hasMethod(): boolean;
2751
+ _initMethod(): SerializedTypeMethod;
2752
+ get _isMethod(): boolean;
2753
+ set method(value: SerializedTypeMethod);
2754
+ _adoptProperty(value: $.Orphan<SerializedTypeProperty>): void;
2755
+ _disownProperty(): $.Orphan<SerializedTypeProperty>;
2756
+ get property(): SerializedTypeProperty;
2757
+ _hasProperty(): boolean;
2758
+ _initProperty(): SerializedTypeProperty;
2759
+ get _isProperty(): boolean;
2760
+ set property(value: SerializedTypeProperty);
2761
+ _adoptPromise(value: $.Orphan<SerializedTypePromise>): void;
2762
+ _disownPromise(): $.Orphan<SerializedTypePromise>;
2763
+ get promise(): SerializedTypePromise;
2764
+ _hasPromise(): boolean;
2765
+ _initPromise(): SerializedTypePromise;
2766
+ get _isPromise(): boolean;
2767
+ set promise(value: SerializedTypePromise);
2768
+ _adoptClassType(value: $.Orphan<SerializedTypeClassType>): void;
2769
+ _disownClassType(): $.Orphan<SerializedTypeClassType>;
2770
+ get classType(): SerializedTypeClassType;
2771
+ _hasClassType(): boolean;
2772
+ _initClassType(): SerializedTypeClassType;
2773
+ get _isClassType(): boolean;
2774
+ set classType(value: SerializedTypeClassType);
2775
+ _adoptEnum(value: $.Orphan<SerializedTypeEnum>): void;
2776
+ _disownEnum(): $.Orphan<SerializedTypeEnum>;
2777
+ get enum(): SerializedTypeEnum;
2778
+ _hasEnum(): boolean;
2779
+ _initEnum(): SerializedTypeEnum;
2780
+ get _isEnum(): boolean;
2781
+ set enum(value: SerializedTypeEnum);
2782
+ _adoptUnion(value: $.Orphan<SerializedTypeUnion>): void;
2783
+ _disownUnion(): $.Orphan<SerializedTypeUnion>;
2784
+ get union(): SerializedTypeUnion;
2785
+ _hasUnion(): boolean;
2786
+ _initUnion(): SerializedTypeUnion;
2787
+ get _isUnion(): boolean;
2788
+ set union(value: SerializedTypeUnion);
2789
+ _adoptIntersection(value: $.Orphan<SerializedTypeIntersection>): void;
2790
+ _disownIntersection(): $.Orphan<SerializedTypeIntersection>;
2791
+ get intersection(): SerializedTypeIntersection;
2792
+ _hasIntersection(): boolean;
2793
+ _initIntersection(): SerializedTypeIntersection;
2794
+ get _isIntersection(): boolean;
2795
+ set intersection(value: SerializedTypeIntersection);
2796
+ _adoptArray(value: $.Orphan<SerializedTypeArray>): void;
2797
+ _disownArray(): $.Orphan<SerializedTypeArray>;
2798
+ get array(): SerializedTypeArray;
2799
+ _hasArray(): boolean;
2800
+ _initArray(): SerializedTypeArray;
2801
+ get _isArray(): boolean;
2802
+ set array(value: SerializedTypeArray);
2803
+ _adoptObjectLiteral(value: $.Orphan<SerializedTypeObjectLiteral>): void;
2804
+ _disownObjectLiteral(): $.Orphan<SerializedTypeObjectLiteral>;
2805
+ get objectLiteral(): SerializedTypeObjectLiteral;
2806
+ _hasObjectLiteral(): boolean;
2807
+ _initObjectLiteral(): SerializedTypeObjectLiteral;
2808
+ get _isObjectLiteral(): boolean;
2809
+ set objectLiteral(value: SerializedTypeObjectLiteral);
2810
+ _adoptIndexSignature(value: $.Orphan<SerializedTypeIndexSignature>): void;
2811
+ _disownIndexSignature(): $.Orphan<SerializedTypeIndexSignature>;
2812
+ get indexSignature(): SerializedTypeIndexSignature;
2813
+ _hasIndexSignature(): boolean;
2814
+ _initIndexSignature(): SerializedTypeIndexSignature;
2815
+ get _isIndexSignature(): boolean;
2816
+ set indexSignature(value: SerializedTypeIndexSignature);
2817
+ _adoptPropertySignature(value: $.Orphan<SerializedTypePropertySignature>): void;
2818
+ _disownPropertySignature(): $.Orphan<SerializedTypePropertySignature>;
2819
+ get propertySignature(): SerializedTypePropertySignature;
2820
+ _hasPropertySignature(): boolean;
2821
+ _initPropertySignature(): SerializedTypePropertySignature;
2822
+ get _isPropertySignature(): boolean;
2823
+ set propertySignature(value: SerializedTypePropertySignature);
2824
+ _adoptMethodSignature(value: $.Orphan<SerializedTypeMethodSignature>): void;
2825
+ _disownMethodSignature(): $.Orphan<SerializedTypeMethodSignature>;
2826
+ get methodSignature(): SerializedTypeMethodSignature;
2827
+ _hasMethodSignature(): boolean;
2828
+ _initMethodSignature(): SerializedTypeMethodSignature;
2829
+ get _isMethodSignature(): boolean;
2830
+ set methodSignature(value: SerializedTypeMethodSignature);
2831
+ _adoptTypeParameter(value: $.Orphan<SerializedTypeTypeParameter>): void;
2832
+ _disownTypeParameter(): $.Orphan<SerializedTypeTypeParameter>;
2833
+ get typeParameter(): SerializedTypeTypeParameter;
2834
+ _hasTypeParameter(): boolean;
2835
+ _initTypeParameter(): SerializedTypeTypeParameter;
2836
+ get _isTypeParameter(): boolean;
2837
+ set typeParameter(value: SerializedTypeTypeParameter);
2838
+ _adoptInfer(value: $.Orphan<SerializedTypeInfer>): void;
2839
+ _disownInfer(): $.Orphan<SerializedTypeInfer>;
2840
+ get infer(): SerializedTypeInfer;
2841
+ _hasInfer(): boolean;
2842
+ _initInfer(): SerializedTypeInfer;
2843
+ get _isInfer(): boolean;
2844
+ set infer(value: SerializedTypeInfer);
2845
+ _adoptTuple(value: $.Orphan<SerializedTypeTuple>): void;
2846
+ _disownTuple(): $.Orphan<SerializedTypeTuple>;
2847
+ get tuple(): SerializedTypeTuple;
2848
+ _hasTuple(): boolean;
2849
+ _initTuple(): SerializedTypeTuple;
2850
+ get _isTuple(): boolean;
2851
+ set tuple(value: SerializedTypeTuple);
2852
+ _adoptTupleMember(value: $.Orphan<SerializedTypeTupleMember>): void;
2853
+ _disownTupleMember(): $.Orphan<SerializedTypeTupleMember>;
2854
+ get tupleMember(): SerializedTypeTupleMember;
2855
+ _hasTupleMember(): boolean;
2856
+ _initTupleMember(): SerializedTypeTupleMember;
2857
+ get _isTupleMember(): boolean;
2858
+ set tupleMember(value: SerializedTypeTupleMember);
2859
+ _adoptRest(value: $.Orphan<SerializedTypeRest>): void;
2860
+ _disownRest(): $.Orphan<SerializedTypeRest>;
2861
+ get rest(): SerializedTypeRest;
2862
+ _hasRest(): boolean;
2863
+ _initRest(): SerializedTypeRest;
2864
+ get _isRest(): boolean;
2865
+ set rest(value: SerializedTypeRest);
2866
+ _adoptOther(value: $.Orphan<SerializedTypeOther>): void;
2867
+ _disownOther(): $.Orphan<SerializedTypeOther>;
2868
+ /**
2869
+ * For any other type that is not explicitly defined
2870
+ *
2871
+ */
2872
+ get other(): SerializedTypeOther;
2873
+ _hasOther(): boolean;
2874
+ _initOther(): SerializedTypeOther;
2875
+ get _isOther(): boolean;
2876
+ set other(value: SerializedTypeOther);
2877
+ toString(): string;
2878
+ which(): SerializedType_Type_Which;
2879
+ }
2880
+ declare class SerializedType extends $.Struct {
2881
+ static readonly _capnp: {
2882
+ displayName: string;
2883
+ id: string;
2884
+ size: $.ObjectSize;
2885
+ };
2886
+ get type(): SerializedType_Type;
2887
+ _initType(): SerializedType_Type;
2888
+ toString(): string;
2889
+ }
2890
+ declare class SerializedTypes extends $.Struct {
2891
+ static readonly _capnp: {
2892
+ displayName: string;
2893
+ id: string;
2894
+ size: $.ObjectSize;
2895
+ };
2896
+ static _Types: $.ListCtor<SerializedType>;
2897
+ _adoptTypes(value: $.Orphan<$.List<SerializedType>>): void;
2898
+ _disownTypes(): $.Orphan<$.List<SerializedType>>;
2899
+ get types(): $.List<SerializedType>;
2900
+ _hasTypes(): boolean;
2901
+ _initTypes(length: number): $.List<SerializedType>;
2902
+ set types(value: $.List<SerializedType>);
2903
+ toString(): string;
2904
+ }
2905
+
2906
+ type Reflection<T extends Record<string, any> = Record<string, any>> = ReflectionClass<T> & {
2907
+ dataBuffer?: ArrayBuffer;
2908
+ messageRoot?: SerializedTypes;
2909
+ };
2910
+
2911
+ type BabelPluginOptions = Partial<BabelUserConfig>;
2912
+ type BabelPluginUserConfig = UserConfig;
2913
+ interface BabelPluginResolvedConfig extends ResolvedConfig {
2914
+ transform: {
2915
+ babel: BabelResolvedConfig;
2916
+ };
2917
+ }
2918
+ type BabelPluginContext<TResolvedConfig extends BabelPluginResolvedConfig = BabelPluginResolvedConfig> = PluginContext<TResolvedConfig>;
2919
+
2920
+ /**
2921
+ * The base environment configuration used by Powerlines applications
2922
+ *
2923
+ * @remarks
2924
+ * This interface is used to define the environment variables, configuration options, and runtime settings used by applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \`powerlines docs\` command.
2925
+ *
2926
+ * @categoryDescription Platform
2927
+ * The name of the platform the configuration parameter is intended for use in.
2928
+ *
2929
+ * @showCategories
2930
+ */
2931
+ interface EnvInterface {
2932
+ /**
2933
+ * An indicator that specifies the application is running in the local development environment.
2934
+ *
2935
+ * @hidden
2936
+ * @readonly
2937
+ * @category node
2938
+ */
2939
+ readonly POWERLINES_LOCAL: boolean;
2940
+ /**
2941
+ * The name of the application.
2942
+ *
2943
+ * @readonly
2944
+ * @category neutral
2945
+ */
2946
+ readonly APP_NAME: string;
2947
+ /**
2948
+ * The version of the application.
2949
+ *
2950
+ * @defaultValue "1.0.0"
2951
+ *
2952
+ * @readonly
2953
+ * @category neutral
2954
+ */
2955
+ readonly APP_VERSION: string;
2956
+ /**
2957
+ * The unique identifier for the build.
2958
+ *
2959
+ * @readonly
2960
+ * @category neutral
2961
+ */
2962
+ readonly BUILD_ID: string;
2963
+ /**
2964
+ * The timestamp the build was ran at.
2965
+ *
2966
+ * @readonly
2967
+ * @category neutral
2968
+ */
2969
+ readonly BUILD_TIMESTAMP: string;
2970
+ /**
2971
+ * A checksum hash created during the build.
2972
+ *
2973
+ * @readonly
2974
+ * @category neutral
2975
+ */
2976
+ readonly BUILD_CHECKSUM: string;
2977
+ /**
2978
+ * The unique identifier for the release.
2979
+ *
2980
+ * @readonly
2981
+ * @category neutral
2982
+ */
2983
+ readonly RELEASE_ID: string;
2984
+ /**
2985
+ * The tag for the release. This is generally in the format of "\<APP_NAME\>\@\<APP_VERSION\>".
2986
+ *
2987
+ * @readonly
2988
+ * @category neutral
2989
+ */
2990
+ readonly RELEASE_TAG: string;
2991
+ /**
2992
+ * The name of the organization that maintains the application.
2993
+ *
2994
+ * @remarks
2995
+ * This variable is used to specify the name of the organization that maintains the application. If not provided in an environment, it will try to use the value in {@link @storm-software/config-tools/StormWorkspaceConfig#organization}.
2996
+ *
2997
+ * @alias ORG
2998
+ * @alias ORG_ID
2999
+ * @category neutral
3000
+ */
3001
+ ORGANIZATION: string;
3002
+ /**
3003
+ * The platform for which the application was built.
3004
+ *
3005
+ * @defaultValue "neutral"
3006
+ *
3007
+ * @category neutral
3008
+ */
3009
+ PLATFORM: "node" | "neutral" | "browser";
3010
+ /**
3011
+ * The mode in which the application is running.
3012
+ *
3013
+ * @defaultValue "production"
3014
+ *
3015
+ * @alias NODE_ENV
3016
+ *
3017
+ * @category neutral
3018
+ */
3019
+ MODE: "development" | "test" | "production";
3020
+ /**
3021
+ * The environment the application is running in. This value will be populated with the value of `MODE` if not provided.
3022
+ *
3023
+ * @defaultValue "production"
3024
+ *
3025
+ * @alias ENV
3026
+ * @alias VERCEL_ENV
3027
+ * @category neutral
3028
+ */
3029
+ ENVIRONMENT: string;
3030
+ /**
3031
+ * Indicates if the application is running in debug mode.
3032
+ *
3033
+ * @category neutral
3034
+ */
3035
+ DEBUG: boolean;
3036
+ /**
3037
+ * An indicator that specifies the current runtime is a test environment.
3038
+ *
3039
+ * @category neutral
3040
+ */
3041
+ TEST: boolean;
3042
+ /**
3043
+ * An indicator that specifies the current runtime is a minimal environment.
3044
+ *
3045
+ * @category node
3046
+ */
3047
+ MINIMAL: boolean;
3048
+ /**
3049
+ * An indicator that specifies the current runtime is a no color environment.
3050
+ *
3051
+ * @category node
3052
+ */
3053
+ NO_COLOR: boolean;
3054
+ /**
3055
+ * An indicator that specifies the current runtime is a force color environment.
3056
+ *
3057
+ * @category node
3058
+ */
3059
+ FORCE_COLOR: boolean | number;
3060
+ /**
3061
+ * An indicator that specifies the current runtime should force hyperlinks in terminal output.
3062
+ *
3063
+ * @remarks
3064
+ * This variable is used to force hyperlinks in terminal output, even if the terminal does not support them. This is useful for debugging and development purposes.
3065
+
3066
+ * @category node
3067
+ */
3068
+ FORCE_HYPERLINK: boolean | number;
3069
+ /**
3070
+ * The name of the agent running the application. This variable is set by certain CI/CD systems.
3071
+ *
3072
+ * @readonly
3073
+ * @category neutral
3074
+ */
3075
+ readonly AGENT_NAME?: string;
3076
+ /**
3077
+ * The color terminal type. This variable is set by certain terminal emulators.
3078
+ *
3079
+ * @readonly
3080
+ * @category node
3081
+ */
3082
+ readonly COLORTERM?: string;
3083
+ /**
3084
+ * The terminal type. This variable is set by certain CI/CD systems.
3085
+ *
3086
+ * @remarks
3087
+ * This variable is used to specify the terminal type that the application is running in. It can be used to determine how to format output for the terminal.
3088
+ *
3089
+ * @readonly
3090
+ * @category node
3091
+ */
3092
+ readonly TERM?: string;
3093
+ /**
3094
+ * The terminal program name. This variable is set by certain terminal emulators.
3095
+ *
3096
+ * @readonly
3097
+ * @category node
3098
+ */
3099
+ readonly TERM_PROGRAM?: string;
3100
+ /**
3101
+ * The terminal program version. This variable is set by certain terminal emulators.
3102
+ *
3103
+ * @readonly
3104
+ * @category node
3105
+ */
3106
+ readonly TERM_PROGRAM_VERSION?: string;
3107
+ /**
3108
+ * The terminal emulator name. This variable is set by certain terminal emulators.
3109
+ *
3110
+ * @readonly
3111
+ * @category node
3112
+ */
3113
+ readonly TERMINAL_EMULATOR?: string;
3114
+ /**
3115
+ * The terminal emulator session ID. This variable is set by certain terminal emulators.
3116
+ *
3117
+ * @readonly
3118
+ * @category node
3119
+ */
3120
+ readonly WT_SESSION?: string;
3121
+ /**
3122
+ * An indicator that specifies the current terminal is running Terminus Sublime. This variable is set by certain terminal emulators.
3123
+ *
3124
+ * @readonly
3125
+ * @category node
3126
+ */
3127
+ readonly TERMINUS_SUBLIME?: boolean;
3128
+ /**
3129
+ * The ConEmu task name. This variable is set by certain terminal emulators.
3130
+ *
3131
+ * @readonly
3132
+ * @category node
3133
+ */
3134
+ readonly ConEmuTask?: string;
3135
+ /**
3136
+ * The cursor trace ID. This variable is set by certain terminal emulators.
3137
+ *
3138
+ * @readonly
3139
+ * @category node
3140
+ */
3141
+ readonly CURSOR_TRACE_ID?: string;
3142
+ /**
3143
+ * The VTE version. This variable is set by certain terminal emulators.
3144
+ *
3145
+ * @readonly
3146
+ * @category node
3147
+ */
3148
+ readonly VTE_VERSION?: string;
3149
+ /**
3150
+ * Indicates if error stack traces should be captured.
3151
+ *
3152
+ * @category neutral
3153
+ */
3154
+ STACKTRACE: boolean;
3155
+ /**
3156
+ * Indicates if error data should be included.
3157
+ *
3158
+ * @category neutral
3159
+ */
3160
+ INCLUDE_ERROR_DATA: boolean;
3161
+ /**
3162
+ * A web page to lookup error messages and display additional information given an error code.
3163
+ *
3164
+ * @remarks
3165
+ * This variable is used to provide a URL to a page that can be used to look up error messages given an error code. This is used to provide a more user-friendly error message to the user.
3166
+ *
3167
+ * @title Error Details URL
3168
+ * @category neutral
3169
+ */
3170
+ ERROR_URL: string;
3171
+ /**
3172
+ * The default timezone for the application.
3173
+ *
3174
+ * @defaultValue "America/New_York"
3175
+ * @category neutral
3176
+ */
3177
+ DEFAULT_TIMEZONE: string;
3178
+ /**
3179
+ * The default locale to be used in the application.
3180
+ *
3181
+ * @defaultValue "en_US"
3182
+ * @category neutral
3183
+ */
3184
+ DEFAULT_LOCALE: string;
3185
+ /**
3186
+ * The default lowest log level to accept. If `null`, the logger will reject all records. This value only applies if `lowestLogLevel` is not provided to the `logs` configuration.
3187
+ *
3188
+ * @defaultValue "info"
3189
+ *
3190
+ * @category neutral
3191
+ */
3192
+ LOG_LEVEL?: LogLevel | null;
3193
+ /**
3194
+ * An indicator that specifies the current runtime is a continuous integration environment.
3195
+ *
3196
+ * @title Continuous Integration
3197
+ * @alias CONTINUOUS_INTEGRATION
3198
+ * @category neutral
3199
+ */
3200
+ CI: boolean;
3201
+ /**
3202
+ * The unique identifier for the current run. This value is set by certain CI/CD systems.
3203
+ *
3204
+ * @readonly
3205
+ * @category node
3206
+ */
3207
+ readonly RUN_ID?: string;
3208
+ /**
3209
+ * The agola git reference. This value is set by certain CI/CD systems.
3210
+ *
3211
+ * @readonly
3212
+ * @category node
3213
+ */
3214
+ readonly AGOLA_GIT_REF?: string;
3215
+ /**
3216
+ * The appcircle build ID. This value is set by certain CI/CD systems.
3217
+ *
3218
+ * @readonly
3219
+ * @category node
3220
+ */
3221
+ readonly AC_APPCIRCLE?: string;
3222
+ /**
3223
+ * The appveyor build ID. This value is set by certain CI/CD systems.
3224
+ *
3225
+ * @readonly
3226
+ * @category node
3227
+ */
3228
+ readonly APPVEYOR?: string;
3229
+ /**
3230
+ * The codebuild build ID. This value is set by certain CI/CD systems.
3231
+ *
3232
+ * @readonly
3233
+ * @category node
3234
+ */
3235
+ readonly CODEBUILD?: string;
3236
+ /**
3237
+ * The task force build ID. This value is set by certain CI/CD systems.
3238
+ *
3239
+ * @readonly
3240
+ * @category node
3241
+ */
3242
+ readonly TF_BUILD?: string;
3243
+ /**
3244
+ * The bamboo plan key. This value is set by certain CI/CD systems.
3245
+ *
3246
+ * @readonly
3247
+ * @category node
3248
+ */
3249
+ readonly bamboo_planKey?: string;
3250
+ /**
3251
+ * The bitbucket commit. This value is set by certain CI/CD systems.
3252
+ *
3253
+ * @readonly
3254
+ * @category node
3255
+ */
3256
+ readonly BITBUCKET_COMMIT?: string;
3257
+ /**
3258
+ * The bitrise build ID. This value is set by certain CI/CD systems.
3259
+ *
3260
+ * @readonly
3261
+ * @category node
3262
+ */
3263
+ readonly BITRISE_IO?: string;
3264
+ /**
3265
+ * The buddy workspace ID. This value is set by certain CI/CD systems.
3266
+ *
3267
+ * @readonly
3268
+ * @category node
3269
+ */
3270
+ readonly BUDDY_WORKSPACE_ID?: string;
3271
+ /**
3272
+ * The buildkite build ID. This value is set by certain CI/CD systems.
3273
+ *
3274
+ * @readonly
3275
+ * @category node
3276
+ */
3277
+ readonly BUILDKITE?: string;
3278
+ /**
3279
+ * The circleci build ID. This value is set by certain CI/CD systems.
3280
+ *
3281
+ * @readonly
3282
+ * @category node
3283
+ */
3284
+ readonly CIRCLECI?: string;
3285
+ /**
3286
+ * The cirrus-ci build ID. This value is set by certain CI/CD systems.
3287
+ *
3288
+ * @readonly
3289
+ * @category node
3290
+ */
3291
+ readonly CIRRUS_CI?: string;
3292
+ /**
3293
+ * The cf build ID. This value is set by certain CI/CD systems.
3294
+ *
3295
+ * @readonly
3296
+ * @category node
3297
+ */
3298
+ readonly CF_BUILD_ID?: string;
3299
+ /**
3300
+ * The cm build ID. This value is set by certain CI/CD systems.
3301
+ *
3302
+ * @readonly
3303
+ * @category node
3304
+ */
3305
+ readonly CM_BUILD_ID?: string;
3306
+ /**
3307
+ * The ci name. This value is set by certain CI/CD systems.
3308
+ *
3309
+ * @readonly
3310
+ * @category node
3311
+ */
3312
+ readonly CI_NAME?: string;
3313
+ /**
3314
+ * The drone build ID. This value is set by certain CI/CD systems.
3315
+ *
3316
+ * @readonly
3317
+ * @category node
3318
+ */
3319
+ readonly DRONE?: string;
3320
+ /**
3321
+ * The dsari build ID. This value is set by certain CI/CD systems.
3322
+ *
3323
+ * @readonly
3324
+ * @category node
3325
+ */
3326
+ readonly DSARI?: string;
3327
+ /**
3328
+ * The earthly build ID. This value is set by certain CI/CD systems.
3329
+ *
3330
+ * @readonly
3331
+ * @category node
3332
+ */
3333
+ readonly EARTHLY_CI?: string;
3334
+ /**
3335
+ * The eas build ID. This value is set by certain CI/CD systems.
3336
+ *
3337
+ * @readonly
3338
+ * @category node
3339
+ */
3340
+ readonly EAS_BUILD?: string;
3341
+ /**
3342
+ * The gerrit project. This value is set by certain CI/CD systems.
3343
+ *
3344
+ * @readonly
3345
+ * @category node
3346
+ */
3347
+ readonly GERRIT_PROJECT?: string;
3348
+ /**
3349
+ * The gitea actions build ID. This value is set by certain CI/CD systems.
3350
+ *
3351
+ * @readonly
3352
+ * @category node
3353
+ */
3354
+ readonly GITEA_ACTIONS?: string;
3355
+ /**
3356
+ * The github actions build ID. This value is set by certain CI/CD systems.
3357
+ *
3358
+ * @readonly
3359
+ * @category node
3360
+ */
3361
+ readonly GITHUB_ACTIONS?: string;
3362
+ /**
3363
+ * The gitlab ci build ID. This value is set by certain CI/CD systems.
3364
+ *
3365
+ * @readonly
3366
+ * @category node
3367
+ */
3368
+ readonly GITLAB_CI?: string;
3369
+ /**
3370
+ * The go cd build ID. This value is set by certain CI/CD systems.
3371
+ *
3372
+ * @readonly
3373
+ * @category node
3374
+ */
3375
+ readonly GOCD?: string;
3376
+ /**
3377
+ * The builder output build ID. This value is set by certain CI/CD systems.
3378
+ *
3379
+ * @readonly
3380
+ * @category node
3381
+ */
3382
+ readonly BUILDER_OUTPUT?: string;
3383
+ /**
3384
+ * The harness build ID. This value is set by certain CI/CD systems.
3385
+ *
3386
+ * @readonly
3387
+ * @category node
3388
+ */
3389
+ readonly HARNESS_BUILD_ID?: string;
3390
+ /**
3391
+ * The jenkins url. This value is set by certain CI/CD systems.
3392
+ *
3393
+ * @readonly
3394
+ * @category node
3395
+ */
3396
+ readonly JENKINS_URL?: string;
3397
+ /**
3398
+ * The layerci build ID. This value is set by certain CI/CD systems.
3399
+ *
3400
+ * @readonly
3401
+ * @category node
3402
+ */
3403
+ readonly LAYERCI?: string;
3404
+ /**
3405
+ * The magnum build ID. This value is set by certain CI/CD systems.
3406
+ *
3407
+ * @readonly
3408
+ * @category node
3409
+ */
3410
+ readonly MAGNUM?: string;
3411
+ /**
3412
+ * The netlify build ID. This value is set by certain CI/CD systems.
3413
+ *
3414
+ * @readonly
3415
+ * @category node
3416
+ */
3417
+ readonly NETLIFY?: string;
3418
+ /**
3419
+ * The nevercode build ID. This value is set by certain CI/CD systems.
3420
+ *
3421
+ * @readonly
3422
+ * @category node
3423
+ */
3424
+ readonly NEVERCODE?: string;
3425
+ /**
3426
+ * The prow job ID. This value is set by certain CI/CD systems.
3427
+ *
3428
+ * @readonly
3429
+ * @category node
3430
+ */
3431
+ readonly PROW_JOB_ID?: string;
3432
+ /**
3433
+ * The release build ID. This value is set by certain CI/CD systems.
3434
+ *
3435
+ * @readonly
3436
+ * @category node
3437
+ */
3438
+ readonly RELEASE_BUILD_ID?: string;
3439
+ /**
3440
+ * The render build ID. This value is set by certain CI/CD systems.
3441
+ *
3442
+ * @readonly
3443
+ * @category node
3444
+ */
3445
+ readonly RENDER?: string;
3446
+ /**
3447
+ * The sailci build ID. This value is set by certain CI/CD systems.
3448
+ *
3449
+ * @readonly
3450
+ * @category node
3451
+ */
3452
+ readonly SAILCI?: string;
3453
+ /**
3454
+ * The hudson build ID. This value is set by certain CI/CD systems.
3455
+ *
3456
+ * @readonly
3457
+ * @category node
3458
+ */
3459
+ readonly HUDSON?: string;
3460
+ /**
3461
+ * The screwdriver build ID. This value is set by certain CI/CD systems.
3462
+ *
3463
+ * @readonly
3464
+ * @category node
3465
+ */
3466
+ readonly SCREWDRIVER?: string;
3467
+ /**
3468
+ * The semaphore build ID. This value is set by certain CI/CD systems.
3469
+ *
3470
+ * @readonly
3471
+ * @category node
3472
+ */
3473
+ readonly SEMAPHORE?: string;
3474
+ /**
3475
+ * The sourcehut build ID. This value is set by certain CI/CD systems.
3476
+ *
3477
+ * @readonly
3478
+ * @category node
3479
+ */
3480
+ readonly SOURCEHUT?: string;
3481
+ /**
3482
+ * The spaceship build ID. This value is set by certain CI/CD systems.
3483
+ *
3484
+ * @readonly
3485
+ * @category node
3486
+ */
3487
+ readonly SPACESHIP_CI?: string;
3488
+ /**
3489
+ * The strider build ID. This value is set by certain CI/CD systems.
3490
+ *
3491
+ * @readonly
3492
+ * @category node
3493
+ */
3494
+ readonly STRIDER?: string;
3495
+ /**
3496
+ * The task ID. This value is set by certain CI/CD systems.
3497
+ *
3498
+ * @readonly
3499
+ * @category node
3500
+ */
3501
+ readonly TASK_ID?: string;
3502
+ /**
3503
+ * The teamcity version. This value is set by certain CI/CD systems.
3504
+ *
3505
+ * @readonly
3506
+ * @category node
3507
+ */
3508
+ readonly TEAMCITY_VERSION?: string;
3509
+ /**
3510
+ * The travis build ID. This value is set by certain CI/CD systems.
3511
+ *
3512
+ * @readonly
3513
+ * @category node
3514
+ */
3515
+ readonly TRAVIS?: string;
3516
+ /**
3517
+ * The vela build ID. This value is set by certain CI/CD systems.
3518
+ *
3519
+ * @readonly
3520
+ * @category node
3521
+ */
3522
+ readonly VELA?: string;
3523
+ /**
3524
+ * The now builder build ID. This value is set by certain CI/CD systems.
3525
+ *
3526
+ * @readonly
3527
+ * @category node
3528
+ */
3529
+ readonly NOW_BUILDER?: string;
3530
+ /**
3531
+ * The appcenter build ID. This value is set by certain CI/CD systems.
3532
+ *
3533
+ * @readonly
3534
+ * @category node
3535
+ */
3536
+ readonly APPCENTER_BUILD_ID?: string;
3537
+ /**
3538
+ * The xcode project build ID. This value is set by certain CI/CD systems.
3539
+ *
3540
+ * @readonly
3541
+ * @category node
3542
+ */
3543
+ readonly CI_XCODE_PROJECT?: string;
3544
+ /**
3545
+ * The xcode server build ID. This value is set by certain CI/CD systems.
3546
+ *
3547
+ * @readonly
3548
+ * @category node
3549
+ */
3550
+ readonly XCS?: string;
3551
+ /**
3552
+ * The application's runtime data directory.
3553
+ *
3554
+ * @remarks
3555
+ * This variable is used to override the base path of the system's local application data directory. This variable is used to set the \`$storm.paths.data\` property.
3556
+ *
3557
+ * @title Data Directory
3558
+ * @category node
3559
+ */
3560
+ DATA_DIR?: string;
3561
+ /**
3562
+ * The application's configuration data directory.
3563
+ *
3564
+ * @remarks
3565
+ * This variable is used to override the base path of the system's local application configuration directory. This variable is used to set the \`$storm.paths.config\` property.
3566
+ *
3567
+ * @title Configuration Directory
3568
+ * @category node
3569
+ */
3570
+ CONFIG_DIR?: string;
3571
+ /**
3572
+ * The application's cached data directory.
3573
+ *
3574
+ * @remarks
3575
+ * This variable is used to override the base path of the system's local cache data directory. This variable is used to set the \`$storm.paths.cache\` property.
3576
+ *
3577
+ * @title Cache Directory
3578
+ * @category node
3579
+ */
3580
+ CACHE_DIR?: string;
3581
+ /**
3582
+ * The application's logging directory.
3583
+ *
3584
+ * @remarks
3585
+ * This variable is used to override the base path of the system's local application log directory. This variable is used to set the \`$storm.paths.log\` property.
3586
+ *
3587
+ * @title Log Directory
3588
+ * @category node
3589
+ */
3590
+ LOG_DIR?: string;
3591
+ /**
3592
+ * The application's temporary data directory.
3593
+ *
3594
+ * @remarks
3595
+ * This variable is used to override the base path of the system's local temporary data directory. This variable is used to set the \`$storm.paths.temp\` property.
3596
+ *
3597
+ * @title Temporary Directory
3598
+ * @category node
3599
+ */
3600
+ TEMP_DIR?: string;
3601
+ /**
3602
+ * A variable that specifies the current user's local application data directory on Windows.
3603
+ *
3604
+ * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html
3605
+ *
3606
+ * @remarks
3607
+ * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \`$storm.paths.data\`, \`$storm.paths.cache\`, and \`$storm.paths.log\` properties.
3608
+ *
3609
+ * @readonly
3610
+ * @category node
3611
+ */
3612
+ readonly LOCALAPPDATA?: string;
3613
+ /**
3614
+ * A variable that specifies the application data directory on Windows.
3615
+ *
3616
+ * @see https://www.advancedinstaller.com/appdata-localappdata-programdata.html
3617
+ *
3618
+ * @remarks
3619
+ * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \`$storm.paths.config\` property.
3620
+ *
3621
+ * @readonly
3622
+ * @category node
3623
+ */
3624
+ readonly APPDATA?: string;
3625
+ /**
3626
+ * A variable that specifies the data path in the home directory on Linux systems using the XDG base directory specification.
3627
+ *
3628
+ * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
3629
+ *
3630
+ * @remarks
3631
+ * This variable is used to specify a path to application data that is specific to the current user. This variable can be used to set the \`$storm.paths.data\` property.
3632
+ *
3633
+ * @readonly
3634
+ * @category node
3635
+ */
3636
+ readonly XDG_DATA_HOME?: string;
3637
+ /**
3638
+ * A variable that specifies the configuration path in the home directory on Linux systems using the XDG base directory specification.
3639
+ *
3640
+ * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
3641
+ *
3642
+ * @remarks
3643
+ * This variable is used to specify a path to configuration data that is specific to the current user. This variable can be used to set the \`$storm.paths.config\` property.
3644
+ *
3645
+ * @readonly
3646
+ * @category node
3647
+ */
3648
+ readonly XDG_CONFIG_HOME?: string;
3649
+ /**
3650
+ * A variable that specifies the cache path in the home directory on Linux systems using the XDG base directory specification.
3651
+ *
3652
+ * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
3653
+ *
3654
+ * @remarks
3655
+ * This variable is used to specify a path to cache data that is specific to the current user. This variable can be used to set the \`$storm.paths.cache\` property.
3656
+ *
3657
+ * @readonly
3658
+ * @category node
3659
+ */
3660
+ readonly XDG_CACHE_HOME?: string;
3661
+ /**
3662
+ * A variable that specifies the state directory on Linux systems using the XDG base directory specification.
3663
+ *
3664
+ * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
3665
+ *
3666
+ * @remarks
3667
+ * This variable is used to specify a path to application state data that is specific to the current user. This variable can be used to set the \`$storm.paths.state\` property.
3668
+ *
3669
+ * @readonly
3670
+ * @category node
3671
+ */
3672
+ readonly XDG_STATE_HOME?: string;
3673
+ /**
3674
+ * A variable that specifies the runtime directory on Linux systems using the XDG base directory specification.
3675
+ *
3676
+ * @see https://gist.github.com/roalcantara/107ba66dfa3b9d023ac9329e639bc58c
3677
+ *
3678
+ * @remarks
3679
+ * This variable is used to specify a path to runtime data that is specific to the current user. This variable can be used to set the \`$storm.paths.temp\` property.
3680
+ *
3681
+ * @readonly
3682
+ * @category node
3683
+ */
3684
+ readonly XDG_RUNTIME_DIR?: string;
3685
+ /**
3686
+ * A variable that specifies the [Devenv](https://devenv.sh/) runtime directory.
3687
+ *
3688
+ * @see https://devenv.sh/files-and-variables/#devenv_dotfile
3689
+ * @see https://nixos.org/
3690
+ *
3691
+ * @remarks
3692
+ * This variable is used to specify a path to application data that is specific to the current [Nix](https://nixos.org/) environment. This variable can be used to set the \`$storm.paths.temp\` property.
3693
+ *
3694
+ * @category node
3695
+ */
3696
+ DEVENV_RUNTIME?: string;
3697
+ }
3698
+ /**
3699
+ * The base secrets configuration used by Powerlines applications
3700
+ *
3701
+ * @remarks
3702
+ * This interface is used to define the secret configuration options used by Powerlines applications. It is used to provide type safety, autocompletion, and default values for the environment variables. The comments of each variable are used to provide documentation descriptions when running the \`storm docs\` command. Since these are secrets, no default values should be provided and the values should be kept confidential (excluded from the client).
3703
+ */
3704
+ interface SecretsInterface {
3705
+ /**
3706
+ * The secret key used for encryption and decryption.
3707
+ *
3708
+ * @remarks
3709
+ * This variable is used to provide a secret key for encryption and decryption of sensitive data. It is important that this value is kept confidential and not exposed in client-side code or public repositories.
3710
+ *
3711
+ * @title Encryption Key
3712
+ */
3713
+ ENCRYPTION_KEY: string;
3714
+ }
3715
+
3716
+ type EnvPluginOptions = Omit<DotenvConfiguration, "types"> & {
3717
+ /**
3718
+ * A path to the type definition for the expected env configuration parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigConfiguration"`.
3719
+ */
3720
+ types?: TypeDefinitionParameter;
3721
+ /**
3722
+ * A path to the type definition for the expected env secret parameters. This value can include both a path to the typescript file and the name of the type definition to use separated by a `":"` or `"#"` character. For example: `"./src/types/env.ts#ConfigSecrets"`.
3723
+ */
3724
+ secrets?: TypeDefinitionParameter;
3725
+ /**
3726
+ * An additional prefix (or list of additional prefixes) to apply to the environment variables
3727
+ *
3728
+ * @remarks
3729
+ * By default, the plugin will use the `POWERLINES_` prefix. This option is useful for avoiding conflicts with other environment variables.
3730
+ */
3731
+ prefix?: string | string[];
3732
+ /**
3733
+ * Should the plugin inject the env variables in the source code with their values?
3734
+ *
3735
+ * @remarks
3736
+ * This option is set to `true` when building an application project.
3737
+ *
3738
+ * @defaultValue false
3739
+ */
3740
+ inject?: boolean;
3741
+ /**
3742
+ * The default configuration to use when loading environment variables.
3743
+ *
3744
+ * @remarks
3745
+ * This configuration is used as the base configuration when loading environment variables, and will be overridden by any values found in the `.env` file or the process environment.
3746
+ */
3747
+ defaultConfig?: Children;
3748
+ /**
3749
+ * Babel configuration options to use when injecting environment variables into the source code.
3750
+ *
3751
+ * @remarks
3752
+ * This option allows you to customize the Babel transformation process used to inject environment variables into the source code. If not provided, the plugin will use default Babel settings.
3753
+ */
3754
+ babel?: BabelPluginOptions;
3755
+ };
3756
+ type EnvPluginUserConfig = BabelPluginUserConfig & {
3757
+ env: EnvPluginOptions;
3758
+ };
3759
+ type EnvPluginResolvedConfig = BabelPluginResolvedConfig & {
3760
+ env: Required<Pick<DotenvConfiguration, "additionalFiles">> & Required<Pick<EnvPluginOptions, "defaultConfig">> & {
3761
+ /**
3762
+ * The type definition for the expected env variable parameters
3763
+ *
3764
+ * @remarks
3765
+ * This value is parsed from the {@link EnvPluginOptions.types} option.
3766
+ */
3767
+ types: TypeDefinition;
3768
+ /**
3769
+ * The type definition for the expected env secret parameters
3770
+ *
3771
+ * @remarks
3772
+ * This value is parsed from the {@link EnvPluginOptions.secrets} option.
3773
+ */
3774
+ secrets: TypeDefinition;
3775
+ /**
3776
+ * Should the plugin inject the env variables in the source code with their values?
3777
+ *
3778
+ * @remarks
3779
+ * This value is the result of reflecting the {@link EnvPluginOptions.inject} option.
3780
+ */
3781
+ inject: EnvPluginOptions["inject"];
3782
+ /**
3783
+ * The prefix used for environment variables
3784
+ *
3785
+ * @remarks
3786
+ * This value is used to filter environment variables that are loaded from the .env file and the process environment.
3787
+ */
3788
+ prefix: string[];
3789
+ };
3790
+ };
3791
+ interface EnvPluginContext<TResolvedConfig extends EnvPluginResolvedConfig = EnvPluginResolvedConfig> extends BabelPluginContext<TResolvedConfig> {
3792
+ env: {
3793
+ /**
3794
+ * The type definitions reflection for the env variables and secrets
3795
+ *
3796
+ * @remarks
3797
+ * These reflections contains the structure of the expected environment variables and secrets as defined by the type definitions provided in the plugin configuration.
3798
+ */
3799
+ types: {
3800
+ /**
3801
+ * The type definitions for the expected env variables
3802
+ */
3803
+ env: Reflection;
3804
+ /**
3805
+ * The type definitions for the expected env secrets
3806
+ */
3807
+ secrets: Reflection;
3808
+ };
3809
+ /**
3810
+ * The current **used** environment variables and secrets reflection
3811
+ *
3812
+ * @remarks
3813
+ * This reflection contains the structure of the current environment variables and secrets as defined during the plugin initialization by extracting the values from the source code.
3814
+ */
3815
+ used: {
3816
+ /**
3817
+ * The current env variables reflection
3818
+ */
3819
+ env: Reflection<EnvInterface>;
3820
+ /**
3821
+ * The current env secrets reflection
3822
+ */
3823
+ secrets: Reflection<SecretsInterface>;
3824
+ };
3825
+ /**
3826
+ * The parsed .env configuration object
3827
+ *
3828
+ * @remarks
3829
+ * This value is the result of loading the .env configuration file found in the project root directory and merging it with the values provided at {@link EnvPluginOptions.values}
3830
+ */
3831
+ parsed: DotenvParseOutput;
3832
+ /**
3833
+ * The injected environment variables and secrets reflection
3834
+ *
3835
+ * @remarks
3836
+ * This reflection contains the structure of the injected environment variables and secrets that were injected into the source code during the build process.
3837
+ */
3838
+ injected: Reflection;
3839
+ };
3840
+ }
3841
+
3842
+ interface CryptoPluginOptions {
3843
+ /**
3844
+ * The application specific secret used for encrypting and decrypting data.
3845
+ *
3846
+ * @remarks
3847
+ * If not provided, the plugin will attempt to read the key from the `SALT` environment variable.
3848
+ */
3849
+ salt?: string;
3850
+ /**
3851
+ * The encryption key used for encrypting and decrypting data.
3852
+ *
3853
+ * @remarks
3854
+ * If not provided, the plugin will attempt to read the key from the `ENCRYPTION_KEY` environment variable.
3855
+ */
3856
+ encryptionKey?: string;
3857
+ /**
3858
+ * Options for the Env plugin.
3859
+ */
3860
+ env?: EnvPluginOptions;
3861
+ }
3862
+ interface CryptoPluginUserConfig extends EnvPluginUserConfig {
3863
+ /**
3864
+ * Options for the Crypto plugin.
3865
+ */
3866
+ crypto?: Omit<CryptoPluginOptions, "env">;
3867
+ }
3868
+ interface CryptoPluginResolvedConfig extends EnvPluginResolvedConfig {
3869
+ /**
3870
+ * Options for the Crypto plugin.
3871
+ */
3872
+ crypto: Omit<CryptoPluginOptions, "env">;
3873
+ }
3874
+ type CryptoPluginContext<TResolvedConfig extends CryptoPluginResolvedConfig = CryptoPluginResolvedConfig> = EnvPluginContext<TResolvedConfig>;
3875
+
3876
+ export type { CryptoPluginOptions as C, Plugin as P, CryptoPluginContext as a, CryptoPluginUserConfig as b, CryptoPluginResolvedConfig as c };