cdk-appsync-typescript-resolver 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,657 @@
1
+ export type Platform = 'browser' | 'node' | 'neutral'
2
+ export type Format = 'iife' | 'cjs' | 'esm'
3
+ export type Loader = 'base64' | 'binary' | 'copy' | 'css' | 'dataurl' | 'default' | 'empty' | 'file' | 'js' | 'json' | 'jsx' | 'local-css' | 'text' | 'ts' | 'tsx'
4
+ export type LogLevel = 'verbose' | 'debug' | 'info' | 'warning' | 'error' | 'silent'
5
+ export type Charset = 'ascii' | 'utf8'
6
+ export type Drop = 'console' | 'debugger'
7
+
8
+ interface CommonOptions {
9
+ /** Documentation: https://esbuild.github.io/api/#sourcemap */
10
+ sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both'
11
+ /** Documentation: https://esbuild.github.io/api/#legal-comments */
12
+ legalComments?: 'none' | 'inline' | 'eof' | 'linked' | 'external'
13
+ /** Documentation: https://esbuild.github.io/api/#source-root */
14
+ sourceRoot?: string
15
+ /** Documentation: https://esbuild.github.io/api/#sources-content */
16
+ sourcesContent?: boolean
17
+
18
+ /** Documentation: https://esbuild.github.io/api/#format */
19
+ format?: Format
20
+ /** Documentation: https://esbuild.github.io/api/#global-name */
21
+ globalName?: string
22
+ /** Documentation: https://esbuild.github.io/api/#target */
23
+ target?: string | string[]
24
+ /** Documentation: https://esbuild.github.io/api/#supported */
25
+ supported?: Record<string, boolean>
26
+ /** Documentation: https://esbuild.github.io/api/#platform */
27
+ platform?: Platform
28
+
29
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
30
+ mangleProps?: RegExp
31
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
32
+ reserveProps?: RegExp
33
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
34
+ mangleQuoted?: boolean
35
+ /** Documentation: https://esbuild.github.io/api/#mangle-props */
36
+ mangleCache?: Record<string, string | false>
37
+ /** Documentation: https://esbuild.github.io/api/#drop */
38
+ drop?: Drop[]
39
+ /** Documentation: https://esbuild.github.io/api/#drop-labels */
40
+ dropLabels?: string[]
41
+ /** Documentation: https://esbuild.github.io/api/#minify */
42
+ minify?: boolean
43
+ /** Documentation: https://esbuild.github.io/api/#minify */
44
+ minifyWhitespace?: boolean
45
+ /** Documentation: https://esbuild.github.io/api/#minify */
46
+ minifyIdentifiers?: boolean
47
+ /** Documentation: https://esbuild.github.io/api/#minify */
48
+ minifySyntax?: boolean
49
+ /** Documentation: https://esbuild.github.io/api/#line-limit */
50
+ lineLimit?: number
51
+ /** Documentation: https://esbuild.github.io/api/#charset */
52
+ charset?: Charset
53
+ /** Documentation: https://esbuild.github.io/api/#tree-shaking */
54
+ treeShaking?: boolean
55
+ /** Documentation: https://esbuild.github.io/api/#ignore-annotations */
56
+ ignoreAnnotations?: boolean
57
+
58
+ /** Documentation: https://esbuild.github.io/api/#jsx */
59
+ jsx?: 'transform' | 'preserve' | 'automatic'
60
+ /** Documentation: https://esbuild.github.io/api/#jsx-factory */
61
+ jsxFactory?: string
62
+ /** Documentation: https://esbuild.github.io/api/#jsx-fragment */
63
+ jsxFragment?: string
64
+ /** Documentation: https://esbuild.github.io/api/#jsx-import-source */
65
+ jsxImportSource?: string
66
+ /** Documentation: https://esbuild.github.io/api/#jsx-development */
67
+ jsxDev?: boolean
68
+ /** Documentation: https://esbuild.github.io/api/#jsx-side-effects */
69
+ jsxSideEffects?: boolean
70
+
71
+ /** Documentation: https://esbuild.github.io/api/#define */
72
+ define?: { [key: string]: string }
73
+ /** Documentation: https://esbuild.github.io/api/#pure */
74
+ pure?: string[]
75
+ /** Documentation: https://esbuild.github.io/api/#keep-names */
76
+ keepNames?: boolean
77
+
78
+ /** Documentation: https://esbuild.github.io/api/#color */
79
+ color?: boolean
80
+ /** Documentation: https://esbuild.github.io/api/#log-level */
81
+ logLevel?: LogLevel
82
+ /** Documentation: https://esbuild.github.io/api/#log-limit */
83
+ logLimit?: number
84
+ /** Documentation: https://esbuild.github.io/api/#log-override */
85
+ logOverride?: Record<string, LogLevel>
86
+
87
+ /** Documentation: https://esbuild.github.io/api/#tsconfig-raw */
88
+ tsconfigRaw?: string | {
89
+ compilerOptions?: {
90
+ alwaysStrict?: boolean
91
+ baseUrl?: boolean
92
+ experimentalDecorators?: boolean
93
+ importsNotUsedAsValues?: 'remove' | 'preserve' | 'error'
94
+ jsx?: 'preserve' | 'react-native' | 'react' | 'react-jsx' | 'react-jsxdev'
95
+ jsxFactory?: string
96
+ jsxFragmentFactory?: string
97
+ jsxImportSource?: string
98
+ paths?: Record<string, string[]>
99
+ preserveValueImports?: boolean
100
+ strict?: boolean
101
+ target?: string
102
+ useDefineForClassFields?: boolean
103
+ verbatimModuleSyntax?: boolean
104
+ }
105
+ }
106
+ }
107
+
108
+ export interface BuildOptions extends CommonOptions {
109
+ /** Documentation: https://esbuild.github.io/api/#bundle */
110
+ bundle?: boolean
111
+ /** Documentation: https://esbuild.github.io/api/#splitting */
112
+ splitting?: boolean
113
+ /** Documentation: https://esbuild.github.io/api/#preserve-symlinks */
114
+ preserveSymlinks?: boolean
115
+ /** Documentation: https://esbuild.github.io/api/#outfile */
116
+ outfile?: string
117
+ /** Documentation: https://esbuild.github.io/api/#metafile */
118
+ metafile?: boolean
119
+ /** Documentation: https://esbuild.github.io/api/#outdir */
120
+ outdir?: string
121
+ /** Documentation: https://esbuild.github.io/api/#outbase */
122
+ outbase?: string
123
+ /** Documentation: https://esbuild.github.io/api/#external */
124
+ external?: string[]
125
+ /** Documentation: https://esbuild.github.io/api/#packages */
126
+ packages?: 'external'
127
+ /** Documentation: https://esbuild.github.io/api/#alias */
128
+ alias?: Record<string, string>
129
+ /** Documentation: https://esbuild.github.io/api/#loader */
130
+ loader?: { [ext: string]: Loader }
131
+ /** Documentation: https://esbuild.github.io/api/#resolve-extensions */
132
+ resolveExtensions?: string[]
133
+ /** Documentation: https://esbuild.github.io/api/#main-fields */
134
+ mainFields?: string[]
135
+ /** Documentation: https://esbuild.github.io/api/#conditions */
136
+ conditions?: string[]
137
+ /** Documentation: https://esbuild.github.io/api/#write */
138
+ write?: boolean
139
+ /** Documentation: https://esbuild.github.io/api/#allow-overwrite */
140
+ allowOverwrite?: boolean
141
+ /** Documentation: https://esbuild.github.io/api/#tsconfig */
142
+ tsconfig?: string
143
+ /** Documentation: https://esbuild.github.io/api/#out-extension */
144
+ outExtension?: { [ext: string]: string }
145
+ /** Documentation: https://esbuild.github.io/api/#public-path */
146
+ publicPath?: string
147
+ /** Documentation: https://esbuild.github.io/api/#entry-names */
148
+ entryNames?: string
149
+ /** Documentation: https://esbuild.github.io/api/#chunk-names */
150
+ chunkNames?: string
151
+ /** Documentation: https://esbuild.github.io/api/#asset-names */
152
+ assetNames?: string
153
+ /** Documentation: https://esbuild.github.io/api/#inject */
154
+ inject?: string[]
155
+ /** Documentation: https://esbuild.github.io/api/#banner */
156
+ banner?: { [type: string]: string }
157
+ /** Documentation: https://esbuild.github.io/api/#footer */
158
+ footer?: { [type: string]: string }
159
+ /** Documentation: https://esbuild.github.io/api/#entry-points */
160
+ entryPoints?: string[] | Record<string, string> | { in: string, out: string }[]
161
+ /** Documentation: https://esbuild.github.io/api/#stdin */
162
+ stdin?: StdinOptions
163
+ /** Documentation: https://esbuild.github.io/plugins/ */
164
+ plugins?: Plugin[]
165
+ /** Documentation: https://esbuild.github.io/api/#working-directory */
166
+ absWorkingDir?: string
167
+ /** Documentation: https://esbuild.github.io/api/#node-paths */
168
+ nodePaths?: string[]; // The "NODE_PATH" variable from Node.js
169
+ }
170
+
171
+ export interface StdinOptions {
172
+ contents: string | Uint8Array
173
+ resolveDir?: string
174
+ sourcefile?: string
175
+ loader?: Loader
176
+ }
177
+
178
+ export interface Message {
179
+ id: string
180
+ pluginName: string
181
+ text: string
182
+ location: Location | null
183
+ notes: Note[]
184
+
185
+ /**
186
+ * Optional user-specified data that is passed through unmodified. You can
187
+ * use this to stash the original error, for example.
188
+ */
189
+ detail: any
190
+ }
191
+
192
+ export interface Note {
193
+ text: string
194
+ location: Location | null
195
+ }
196
+
197
+ export interface Location {
198
+ file: string
199
+ namespace: string
200
+ /** 1-based */
201
+ line: number
202
+ /** 0-based, in bytes */
203
+ column: number
204
+ /** in bytes */
205
+ length: number
206
+ lineText: string
207
+ suggestion: string
208
+ }
209
+
210
+ export interface OutputFile {
211
+ path: string
212
+ /** "text" as bytes */
213
+ contents: Uint8Array
214
+ /** "contents" as text (changes automatically with "contents") */
215
+ readonly text: string
216
+ }
217
+
218
+ export interface BuildResult<ProvidedOptions extends BuildOptions = BuildOptions> {
219
+ errors: Message[]
220
+ warnings: Message[]
221
+ /** Only when "write: false" */
222
+ outputFiles: OutputFile[] | (ProvidedOptions['write'] extends false ? never : undefined)
223
+ /** Only when "metafile: true" */
224
+ metafile: Metafile | (ProvidedOptions['metafile'] extends true ? never : undefined)
225
+ /** Only when "mangleCache" is present */
226
+ mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
227
+ }
228
+
229
+ export interface BuildFailure extends Error {
230
+ errors: Message[]
231
+ warnings: Message[]
232
+ }
233
+
234
+ /** Documentation: https://esbuild.github.io/api/#serve-arguments */
235
+ export interface ServeOptions {
236
+ port?: number
237
+ host?: string
238
+ servedir?: string
239
+ keyfile?: string
240
+ certfile?: string
241
+ fallback?: string
242
+ onRequest?: (args: ServeOnRequestArgs) => void
243
+ }
244
+
245
+ export interface ServeOnRequestArgs {
246
+ remoteAddress: string
247
+ method: string
248
+ path: string
249
+ status: number
250
+ /** The time to generate the response, not to send it */
251
+ timeInMS: number
252
+ }
253
+
254
+ /** Documentation: https://esbuild.github.io/api/#serve-return-values */
255
+ export interface ServeResult {
256
+ port: number
257
+ host: string
258
+ }
259
+
260
+ export interface TransformOptions extends CommonOptions {
261
+ /** Documentation: https://esbuild.github.io/api/#sourcefile */
262
+ sourcefile?: string
263
+ /** Documentation: https://esbuild.github.io/api/#loader */
264
+ loader?: Loader
265
+ /** Documentation: https://esbuild.github.io/api/#banner */
266
+ banner?: string
267
+ /** Documentation: https://esbuild.github.io/api/#footer */
268
+ footer?: string
269
+ }
270
+
271
+ export interface TransformResult<ProvidedOptions extends TransformOptions = TransformOptions> {
272
+ code: string
273
+ map: string
274
+ warnings: Message[]
275
+ /** Only when "mangleCache" is present */
276
+ mangleCache: Record<string, string | false> | (ProvidedOptions['mangleCache'] extends Object ? never : undefined)
277
+ /** Only when "legalComments" is "external" */
278
+ legalComments: string | (ProvidedOptions['legalComments'] extends 'external' ? never : undefined)
279
+ }
280
+
281
+ export interface TransformFailure extends Error {
282
+ errors: Message[]
283
+ warnings: Message[]
284
+ }
285
+
286
+ export interface Plugin {
287
+ name: string
288
+ setup: (build: PluginBuild) => (void | Promise<void>)
289
+ }
290
+
291
+ export interface PluginBuild {
292
+ /** Documentation: https://esbuild.github.io/plugins/#build-options */
293
+ initialOptions: BuildOptions
294
+
295
+ /** Documentation: https://esbuild.github.io/plugins/#resolve */
296
+ resolve(path: string, options?: ResolveOptions): Promise<ResolveResult>
297
+
298
+ /** Documentation: https://esbuild.github.io/plugins/#on-start */
299
+ onStart(callback: () =>
300
+ (OnStartResult | null | void | Promise<OnStartResult | null | void>)): void
301
+
302
+ /** Documentation: https://esbuild.github.io/plugins/#on-end */
303
+ onEnd(callback: (result: BuildResult) =>
304
+ (OnEndResult | null | void | Promise<OnEndResult | null | void>)): void
305
+
306
+ /** Documentation: https://esbuild.github.io/plugins/#on-resolve */
307
+ onResolve(options: OnResolveOptions, callback: (args: OnResolveArgs) =>
308
+ (OnResolveResult | null | undefined | Promise<OnResolveResult | null | undefined>)): void
309
+
310
+ /** Documentation: https://esbuild.github.io/plugins/#on-load */
311
+ onLoad(options: OnLoadOptions, callback: (args: OnLoadArgs) =>
312
+ (OnLoadResult | null | undefined | Promise<OnLoadResult | null | undefined>)): void
313
+
314
+ /** Documentation: https://esbuild.github.io/plugins/#on-dispose */
315
+ onDispose(callback: () => void): void
316
+
317
+ // This is a full copy of the esbuild library in case you need it
318
+ esbuild: {
319
+ context: typeof context,
320
+ build: typeof build,
321
+ buildSync: typeof buildSync,
322
+ transform: typeof transform,
323
+ transformSync: typeof transformSync,
324
+ formatMessages: typeof formatMessages,
325
+ formatMessagesSync: typeof formatMessagesSync,
326
+ analyzeMetafile: typeof analyzeMetafile,
327
+ analyzeMetafileSync: typeof analyzeMetafileSync,
328
+ initialize: typeof initialize,
329
+ version: typeof version,
330
+ }
331
+ }
332
+
333
+ /** Documentation: https://esbuild.github.io/plugins/#resolve-options */
334
+ export interface ResolveOptions {
335
+ pluginName?: string
336
+ importer?: string
337
+ namespace?: string
338
+ resolveDir?: string
339
+ kind?: ImportKind
340
+ pluginData?: any
341
+ }
342
+
343
+ /** Documentation: https://esbuild.github.io/plugins/#resolve-results */
344
+ export interface ResolveResult {
345
+ errors: Message[]
346
+ warnings: Message[]
347
+
348
+ path: string
349
+ external: boolean
350
+ sideEffects: boolean
351
+ namespace: string
352
+ suffix: string
353
+ pluginData: any
354
+ }
355
+
356
+ export interface OnStartResult {
357
+ errors?: PartialMessage[]
358
+ warnings?: PartialMessage[]
359
+ }
360
+
361
+ export interface OnEndResult {
362
+ errors?: PartialMessage[]
363
+ warnings?: PartialMessage[]
364
+ }
365
+
366
+ /** Documentation: https://esbuild.github.io/plugins/#on-resolve-options */
367
+ export interface OnResolveOptions {
368
+ filter: RegExp
369
+ namespace?: string
370
+ }
371
+
372
+ /** Documentation: https://esbuild.github.io/plugins/#on-resolve-arguments */
373
+ export interface OnResolveArgs {
374
+ path: string
375
+ importer: string
376
+ namespace: string
377
+ resolveDir: string
378
+ kind: ImportKind
379
+ pluginData: any
380
+ }
381
+
382
+ export type ImportKind =
383
+ | 'entry-point'
384
+
385
+ // JS
386
+ | 'import-statement'
387
+ | 'require-call'
388
+ | 'dynamic-import'
389
+ | 'require-resolve'
390
+
391
+ // CSS
392
+ | 'import-rule'
393
+ | 'url-token'
394
+
395
+ /** Documentation: https://esbuild.github.io/plugins/#on-resolve-results */
396
+ export interface OnResolveResult {
397
+ pluginName?: string
398
+
399
+ errors?: PartialMessage[]
400
+ warnings?: PartialMessage[]
401
+
402
+ path?: string
403
+ external?: boolean
404
+ sideEffects?: boolean
405
+ namespace?: string
406
+ suffix?: string
407
+ pluginData?: any
408
+
409
+ watchFiles?: string[]
410
+ watchDirs?: string[]
411
+ }
412
+
413
+ /** Documentation: https://esbuild.github.io/plugins/#on-load-options */
414
+ export interface OnLoadOptions {
415
+ filter: RegExp
416
+ namespace?: string
417
+ }
418
+
419
+ /** Documentation: https://esbuild.github.io/plugins/#on-load-arguments */
420
+ export interface OnLoadArgs {
421
+ path: string
422
+ namespace: string
423
+ suffix: string
424
+ pluginData: any
425
+ }
426
+
427
+ /** Documentation: https://esbuild.github.io/plugins/#on-load-results */
428
+ export interface OnLoadResult {
429
+ pluginName?: string
430
+
431
+ errors?: PartialMessage[]
432
+ warnings?: PartialMessage[]
433
+
434
+ contents?: string | Uint8Array
435
+ resolveDir?: string
436
+ loader?: Loader
437
+ pluginData?: any
438
+
439
+ watchFiles?: string[]
440
+ watchDirs?: string[]
441
+ }
442
+
443
+ export interface PartialMessage {
444
+ id?: string
445
+ pluginName?: string
446
+ text?: string
447
+ location?: Partial<Location> | null
448
+ notes?: PartialNote[]
449
+ detail?: any
450
+ }
451
+
452
+ export interface PartialNote {
453
+ text?: string
454
+ location?: Partial<Location> | null
455
+ }
456
+
457
+ /** Documentation: https://esbuild.github.io/api/#metafile */
458
+ export interface Metafile {
459
+ inputs: {
460
+ [path: string]: {
461
+ bytes: number
462
+ imports: {
463
+ path: string
464
+ kind: ImportKind
465
+ external?: boolean
466
+ original?: string
467
+ }[]
468
+ format?: 'cjs' | 'esm'
469
+ }
470
+ }
471
+ outputs: {
472
+ [path: string]: {
473
+ bytes: number
474
+ inputs: {
475
+ [path: string]: {
476
+ bytesInOutput: number
477
+ }
478
+ }
479
+ imports: {
480
+ path: string
481
+ kind: ImportKind | 'file-loader'
482
+ external?: boolean
483
+ }[]
484
+ exports: string[]
485
+ entryPoint?: string
486
+ cssBundle?: string
487
+ }
488
+ }
489
+ }
490
+
491
+ export interface FormatMessagesOptions {
492
+ kind: 'error' | 'warning'
493
+ color?: boolean
494
+ terminalWidth?: number
495
+ }
496
+
497
+ export interface AnalyzeMetafileOptions {
498
+ color?: boolean
499
+ verbose?: boolean
500
+ }
501
+
502
+ export interface WatchOptions {
503
+ }
504
+
505
+ export interface BuildContext<ProvidedOptions extends BuildOptions = BuildOptions> {
506
+ /** Documentation: https://esbuild.github.io/api/#rebuild */
507
+ rebuild(): Promise<BuildResult<ProvidedOptions>>
508
+
509
+ /** Documentation: https://esbuild.github.io/api/#watch */
510
+ watch(options?: WatchOptions): Promise<void>
511
+
512
+ /** Documentation: https://esbuild.github.io/api/#serve */
513
+ serve(options?: ServeOptions): Promise<ServeResult>
514
+
515
+ cancel(): Promise<void>
516
+ dispose(): Promise<void>
517
+ }
518
+
519
+ // This is a TypeScript type-level function which replaces any keys in "In"
520
+ // that aren't in "Out" with "never". We use this to reject properties with
521
+ // typos in object literals. See: https://stackoverflow.com/questions/49580725
522
+ type SameShape<Out, In extends Out> = In & { [Key in Exclude<keyof In, keyof Out>]: never }
523
+
524
+ /**
525
+ * This function invokes the "esbuild" command-line tool for you. It returns a
526
+ * promise that either resolves with a "BuildResult" object or rejects with a
527
+ * "BuildFailure" object.
528
+ *
529
+ * - Works in node: yes
530
+ * - Works in browser: yes
531
+ *
532
+ * Documentation: https://esbuild.github.io/api/#build
533
+ */
534
+ export declare function build<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildResult<T>>
535
+
536
+ /**
537
+ * This is the advanced long-running form of "build" that supports additional
538
+ * features such as watch mode and a local development server.
539
+ *
540
+ * - Works in node: yes
541
+ * - Works in browser: no
542
+ *
543
+ * Documentation: https://esbuild.github.io/api/#build
544
+ */
545
+ export declare function context<T extends BuildOptions>(options: SameShape<BuildOptions, T>): Promise<BuildContext<T>>
546
+
547
+ /**
548
+ * This function transforms a single JavaScript file. It can be used to minify
549
+ * JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript
550
+ * to older JavaScript. It returns a promise that is either resolved with a
551
+ * "TransformResult" object or rejected with a "TransformFailure" object.
552
+ *
553
+ * - Works in node: yes
554
+ * - Works in browser: yes
555
+ *
556
+ * Documentation: https://esbuild.github.io/api/#transform
557
+ */
558
+ export declare function transform<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): Promise<TransformResult<T>>
559
+
560
+ /**
561
+ * Converts log messages to formatted message strings suitable for printing in
562
+ * the terminal. This allows you to reuse the built-in behavior of esbuild's
563
+ * log message formatter. This is a batch-oriented API for efficiency.
564
+ *
565
+ * - Works in node: yes
566
+ * - Works in browser: yes
567
+ */
568
+ export declare function formatMessages(messages: PartialMessage[], options: FormatMessagesOptions): Promise<string[]>
569
+
570
+ /**
571
+ * Pretty-prints an analysis of the metafile JSON to a string. This is just for
572
+ * convenience to be able to match esbuild's pretty-printing exactly. If you want
573
+ * to customize it, you can just inspect the data in the metafile yourself.
574
+ *
575
+ * - Works in node: yes
576
+ * - Works in browser: yes
577
+ *
578
+ * Documentation: https://esbuild.github.io/api/#analyze
579
+ */
580
+ export declare function analyzeMetafile(metafile: Metafile | string, options?: AnalyzeMetafileOptions): Promise<string>
581
+
582
+ /**
583
+ * A synchronous version of "build".
584
+ *
585
+ * - Works in node: yes
586
+ * - Works in browser: no
587
+ *
588
+ * Documentation: https://esbuild.github.io/api/#build
589
+ */
590
+ export declare function buildSync<T extends BuildOptions>(options: SameShape<BuildOptions, T>): BuildResult<T>
591
+
592
+ /**
593
+ * A synchronous version of "transform".
594
+ *
595
+ * - Works in node: yes
596
+ * - Works in browser: no
597
+ *
598
+ * Documentation: https://esbuild.github.io/api/#transform
599
+ */
600
+ export declare function transformSync<T extends TransformOptions>(input: string | Uint8Array, options?: SameShape<TransformOptions, T>): TransformResult<T>
601
+
602
+ /**
603
+ * A synchronous version of "formatMessages".
604
+ *
605
+ * - Works in node: yes
606
+ * - Works in browser: no
607
+ */
608
+ export declare function formatMessagesSync(messages: PartialMessage[], options: FormatMessagesOptions): string[]
609
+
610
+ /**
611
+ * A synchronous version of "analyzeMetafile".
612
+ *
613
+ * - Works in node: yes
614
+ * - Works in browser: no
615
+ *
616
+ * Documentation: https://esbuild.github.io/api/#analyze
617
+ */
618
+ export declare function analyzeMetafileSync(metafile: Metafile | string, options?: AnalyzeMetafileOptions): string
619
+
620
+ /**
621
+ * This configures the browser-based version of esbuild. It is necessary to
622
+ * call this first and wait for the returned promise to be resolved before
623
+ * making other API calls when using esbuild in the browser.
624
+ *
625
+ * - Works in node: yes
626
+ * - Works in browser: yes ("options" is required)
627
+ *
628
+ * Documentation: https://esbuild.github.io/api/#browser
629
+ */
630
+ export declare function initialize(options: InitializeOptions): Promise<void>
631
+
632
+ export interface InitializeOptions {
633
+ /**
634
+ * The URL of the "esbuild.wasm" file. This must be provided when running
635
+ * esbuild in the browser.
636
+ */
637
+ wasmURL?: string | URL
638
+
639
+ /**
640
+ * The result of calling "new WebAssembly.Module(buffer)" where "buffer"
641
+ * is a typed array or ArrayBuffer containing the binary code of the
642
+ * "esbuild.wasm" file.
643
+ *
644
+ * You can use this as an alternative to "wasmURL" for environments where it's
645
+ * not possible to download the WebAssembly module.
646
+ */
647
+ wasmModule?: WebAssembly.Module
648
+
649
+ /**
650
+ * By default esbuild runs the WebAssembly-based browser API in a web worker
651
+ * to avoid blocking the UI thread. This can be disabled by setting "worker"
652
+ * to false.
653
+ */
654
+ worker?: boolean
655
+ }
656
+
657
+ export let version: string