@biomejs/wasm-web 2.4.9 → 2.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/biome_wasm.js CHANGED
@@ -1,211 +1,4 @@
1
- let wasm;
2
-
3
- function addToExternrefTable0(obj) {
4
- const idx = wasm.__externref_table_alloc();
5
- wasm.__wbindgen_externrefs.set(idx, obj);
6
- return idx;
7
- }
8
-
9
- function _assertClass(instance, klass) {
10
- if (!(instance instanceof klass)) {
11
- throw new Error(`expected instance of ${klass.name}`);
12
- }
13
- }
14
-
15
- function debugString(val) {
16
- // primitive types
17
- const type = typeof val;
18
- if (type == 'number' || type == 'boolean' || val == null) {
19
- return `${val}`;
20
- }
21
- if (type == 'string') {
22
- return `"${val}"`;
23
- }
24
- if (type == 'symbol') {
25
- const description = val.description;
26
- if (description == null) {
27
- return 'Symbol';
28
- } else {
29
- return `Symbol(${description})`;
30
- }
31
- }
32
- if (type == 'function') {
33
- const name = val.name;
34
- if (typeof name == 'string' && name.length > 0) {
35
- return `Function(${name})`;
36
- } else {
37
- return 'Function';
38
- }
39
- }
40
- // objects
41
- if (Array.isArray(val)) {
42
- const length = val.length;
43
- let debug = '[';
44
- if (length > 0) {
45
- debug += debugString(val[0]);
46
- }
47
- for(let i = 1; i < length; i++) {
48
- debug += ', ' + debugString(val[i]);
49
- }
50
- debug += ']';
51
- return debug;
52
- }
53
- // Test for built-in
54
- const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
55
- let className;
56
- if (builtInMatches && builtInMatches.length > 1) {
57
- className = builtInMatches[1];
58
- } else {
59
- // Failed to match the standard '[object ClassName]'
60
- return toString.call(val);
61
- }
62
- if (className == 'Object') {
63
- // we're a user defined class or Object
64
- // JSON.stringify avoids problems with cycles, and is generally much
65
- // easier than looping through ownProperties of `val`.
66
- try {
67
- return 'Object(' + JSON.stringify(val) + ')';
68
- } catch (_) {
69
- return 'Object';
70
- }
71
- }
72
- // errors
73
- if (val instanceof Error) {
74
- return `${val.name}: ${val.message}\n${val.stack}`;
75
- }
76
- // TODO we could test for more things here, like `Set`s and `Map`s.
77
- return className;
78
- }
79
-
80
- function getArrayU8FromWasm0(ptr, len) {
81
- ptr = ptr >>> 0;
82
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
83
- }
84
-
85
- let cachedDataViewMemory0 = null;
86
- function getDataViewMemory0() {
87
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
88
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
89
- }
90
- return cachedDataViewMemory0;
91
- }
92
-
93
- function getStringFromWasm0(ptr, len) {
94
- ptr = ptr >>> 0;
95
- return decodeText(ptr, len);
96
- }
97
-
98
- let cachedUint8ArrayMemory0 = null;
99
- function getUint8ArrayMemory0() {
100
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
101
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
102
- }
103
- return cachedUint8ArrayMemory0;
104
- }
105
-
106
- function handleError(f, args) {
107
- try {
108
- return f.apply(this, args);
109
- } catch (e) {
110
- const idx = addToExternrefTable0(e);
111
- wasm.__wbindgen_exn_store(idx);
112
- }
113
- }
114
-
115
- function isLikeNone(x) {
116
- return x === undefined || x === null;
117
- }
118
-
119
- function passArray8ToWasm0(arg, malloc) {
120
- const ptr = malloc(arg.length * 1, 1) >>> 0;
121
- getUint8ArrayMemory0().set(arg, ptr / 1);
122
- WASM_VECTOR_LEN = arg.length;
123
- return ptr;
124
- }
125
-
126
- function passStringToWasm0(arg, malloc, realloc) {
127
- if (realloc === undefined) {
128
- const buf = cachedTextEncoder.encode(arg);
129
- const ptr = malloc(buf.length, 1) >>> 0;
130
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
131
- WASM_VECTOR_LEN = buf.length;
132
- return ptr;
133
- }
134
-
135
- let len = arg.length;
136
- let ptr = malloc(len, 1) >>> 0;
137
-
138
- const mem = getUint8ArrayMemory0();
139
-
140
- let offset = 0;
141
-
142
- for (; offset < len; offset++) {
143
- const code = arg.charCodeAt(offset);
144
- if (code > 0x7F) break;
145
- mem[ptr + offset] = code;
146
- }
147
- if (offset !== len) {
148
- if (offset !== 0) {
149
- arg = arg.slice(offset);
150
- }
151
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
152
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
153
- const ret = cachedTextEncoder.encodeInto(arg, view);
154
-
155
- offset += ret.written;
156
- ptr = realloc(ptr, len, offset, 1) >>> 0;
157
- }
158
-
159
- WASM_VECTOR_LEN = offset;
160
- return ptr;
161
- }
162
-
163
- function takeFromExternrefTable0(idx) {
164
- const value = wasm.__wbindgen_externrefs.get(idx);
165
- wasm.__externref_table_dealloc(idx);
166
- return value;
167
- }
168
-
169
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
170
- cachedTextDecoder.decode();
171
- const MAX_SAFARI_DECODE_BYTES = 2146435072;
172
- let numBytesDecoded = 0;
173
- function decodeText(ptr, len) {
174
- numBytesDecoded += len;
175
- if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
176
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
177
- cachedTextDecoder.decode();
178
- numBytesDecoded = len;
179
- }
180
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
181
- }
182
-
183
- const cachedTextEncoder = new TextEncoder();
184
-
185
- if (!('encodeInto' in cachedTextEncoder)) {
186
- cachedTextEncoder.encodeInto = function (arg, view) {
187
- const buf = cachedTextEncoder.encode(arg);
188
- view.set(buf);
189
- return {
190
- read: arg.length,
191
- written: buf.length
192
- };
193
- }
194
- }
195
-
196
- let WASM_VECTOR_LEN = 0;
197
-
198
- const DiagnosticPrinterFinalization = (typeof FinalizationRegistry === 'undefined')
199
- ? { register: () => {}, unregister: () => {} }
200
- : new FinalizationRegistry(ptr => wasm.__wbg_diagnosticprinter_free(ptr >>> 0, 1));
201
-
202
- const MemoryFileSystemFinalization = (typeof FinalizationRegistry === 'undefined')
203
- ? { register: () => {}, unregister: () => {} }
204
- : new FinalizationRegistry(ptr => wasm.__wbg_memoryfilesystem_free(ptr >>> 0, 1));
205
-
206
- const WorkspaceFinalization = (typeof FinalizationRegistry === 'undefined')
207
- ? { register: () => {}, unregister: () => {} }
208
- : new FinalizationRegistry(ptr => wasm.__wbg_workspace_free(ptr >>> 0, 1));
1
+ /* @ts-self-types="./biome_wasm.d.ts" */
209
2
 
210
3
  export class DiagnosticPrinter {
211
4
  __destroy_into_raw() {
@@ -218,38 +11,6 @@ export class DiagnosticPrinter {
218
11
  const ptr = this.__destroy_into_raw();
219
12
  wasm.__wbg_diagnosticprinter_free(ptr, 0);
220
13
  }
221
- /**
222
- * @param {Diagnostic} diagnostic
223
- */
224
- print_simple(diagnostic) {
225
- const ret = wasm.diagnosticprinter_print_simple(this.__wbg_ptr, diagnostic);
226
- if (ret[1]) {
227
- throw takeFromExternrefTable0(ret[0]);
228
- }
229
- }
230
- /**
231
- * @param {Diagnostic} diagnostic
232
- */
233
- print_verbose(diagnostic) {
234
- const ret = wasm.diagnosticprinter_print_verbose(this.__wbg_ptr, diagnostic);
235
- if (ret[1]) {
236
- throw takeFromExternrefTable0(ret[0]);
237
- }
238
- }
239
- /**
240
- * @param {string} file_name
241
- * @param {string} file_source
242
- */
243
- constructor(file_name, file_source) {
244
- const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
245
- const len0 = WASM_VECTOR_LEN;
246
- const ptr1 = passStringToWasm0(file_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
247
- const len1 = WASM_VECTOR_LEN;
248
- const ret = wasm.diagnosticprinter_new(ptr0, len0, ptr1, len1);
249
- this.__wbg_ptr = ret >>> 0;
250
- DiagnosticPrinterFinalization.register(this, this.__wbg_ptr, this);
251
- return this;
252
- }
253
14
  /**
254
15
  * @returns {string}
255
16
  */
@@ -272,6 +33,38 @@ export class DiagnosticPrinter {
272
33
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
273
34
  }
274
35
  }
36
+ /**
37
+ * @param {string} file_name
38
+ * @param {string} file_source
39
+ */
40
+ constructor(file_name, file_source) {
41
+ const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
42
+ const len0 = WASM_VECTOR_LEN;
43
+ const ptr1 = passStringToWasm0(file_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
44
+ const len1 = WASM_VECTOR_LEN;
45
+ const ret = wasm.diagnosticprinter_new(ptr0, len0, ptr1, len1);
46
+ this.__wbg_ptr = ret >>> 0;
47
+ DiagnosticPrinterFinalization.register(this, this.__wbg_ptr, this);
48
+ return this;
49
+ }
50
+ /**
51
+ * @param {Diagnostic} diagnostic
52
+ */
53
+ print_simple(diagnostic) {
54
+ const ret = wasm.diagnosticprinter_print_simple(this.__wbg_ptr, diagnostic);
55
+ if (ret[1]) {
56
+ throw takeFromExternrefTable0(ret[0]);
57
+ }
58
+ }
59
+ /**
60
+ * @param {Diagnostic} diagnostic
61
+ */
62
+ print_verbose(diagnostic) {
63
+ const ret = wasm.diagnosticprinter_print_verbose(this.__wbg_ptr, diagnostic);
64
+ if (ret[1]) {
65
+ throw takeFromExternrefTable0(ret[0]);
66
+ }
67
+ }
275
68
  }
276
69
  if (Symbol.dispose) DiagnosticPrinter.prototype[Symbol.dispose] = DiagnosticPrinter.prototype.free;
277
70
 
@@ -286,12 +79,6 @@ export class MemoryFileSystem {
286
79
  const ptr = this.__destroy_into_raw();
287
80
  wasm.__wbg_memoryfilesystem_free(ptr, 0);
288
81
  }
289
- constructor() {
290
- const ret = wasm.memoryfilesystem_new();
291
- this.__wbg_ptr = ret >>> 0;
292
- MemoryFileSystemFinalization.register(this, this.__wbg_ptr, this);
293
- return this;
294
- }
295
82
  /**
296
83
  * @param {string} path
297
84
  * @param {Uint8Array} data
@@ -303,6 +90,12 @@ export class MemoryFileSystem {
303
90
  const len1 = WASM_VECTOR_LEN;
304
91
  wasm.memoryfilesystem_insert(this.__wbg_ptr, ptr0, len0, ptr1, len1);
305
92
  }
93
+ constructor() {
94
+ const ret = wasm.memoryfilesystem_new();
95
+ this.__wbg_ptr = ret >>> 0;
96
+ MemoryFileSystemFinalization.register(this, this.__wbg_ptr, this);
97
+ return this;
98
+ }
306
99
  /**
307
100
  * @param {string} path
308
101
  */
@@ -332,6 +125,17 @@ export class Workspace {
332
125
  const ptr = this.__destroy_into_raw();
333
126
  wasm.__wbg_workspace_free(ptr, 0);
334
127
  }
128
+ /**
129
+ * @param {ChangeFileParams} params
130
+ * @returns {ChangeFileResult}
131
+ */
132
+ changeFile(params) {
133
+ const ret = wasm.workspace_changeFile(this.__wbg_ptr, params);
134
+ if (ret[2]) {
135
+ throw takeFromExternrefTable0(ret[1]);
136
+ }
137
+ return takeFromExternrefTable0(ret[0]);
138
+ }
335
139
  /**
336
140
  * @param {CloseFileParams} params
337
141
  */
@@ -342,15 +146,13 @@ export class Workspace {
342
146
  }
343
147
  }
344
148
  /**
345
- * @param {ChangeFileParams} params
346
- * @returns {ChangeFileResult}
149
+ * @param {DropPatternParams} params
347
150
  */
348
- changeFile(params) {
349
- const ret = wasm.workspace_changeFile(this.__wbg_ptr, params);
350
- if (ret[2]) {
351
- throw takeFromExternrefTable0(ret[1]);
151
+ dropPattern(params) {
152
+ const ret = wasm.workspace_dropPattern(this.__wbg_ptr, params);
153
+ if (ret[1]) {
154
+ throw takeFromExternrefTable0(ret[0]);
352
155
  }
353
- return takeFromExternrefTable0(ret[0]);
354
156
  }
355
157
  /**
356
158
  * @param {FileExitsParams} params
@@ -363,6 +165,28 @@ export class Workspace {
363
165
  }
364
166
  return ret[0] !== 0;
365
167
  }
168
+ /**
169
+ * @param {SupportsFeatureParams} params
170
+ * @returns {FileFeaturesResult}
171
+ */
172
+ fileFeatures(params) {
173
+ const ret = wasm.workspace_fileFeatures(this.__wbg_ptr, params);
174
+ if (ret[2]) {
175
+ throw takeFromExternrefTable0(ret[1]);
176
+ }
177
+ return takeFromExternrefTable0(ret[0]);
178
+ }
179
+ /**
180
+ * @param {FixFileParams} params
181
+ * @returns {FixFileResult}
182
+ */
183
+ fixFile(params) {
184
+ const ret = wasm.workspace_fixFile(this.__wbg_ptr, params);
185
+ if (ret[2]) {
186
+ throw takeFromExternrefTable0(ret[1]);
187
+ }
188
+ return takeFromExternrefTable0(ret[0]);
189
+ }
366
190
  /**
367
191
  * @param {FormatFileParams} params
368
192
  * @returns {any}
@@ -375,13 +199,15 @@ export class Workspace {
375
199
  return takeFromExternrefTable0(ret[0]);
376
200
  }
377
201
  /**
378
- * @param {DropPatternParams} params
202
+ * @param {FormatOnTypeParams} params
203
+ * @returns {any}
379
204
  */
380
- dropPattern(params) {
381
- const ret = wasm.workspace_dropPattern(this.__wbg_ptr, params);
382
- if (ret[1]) {
383
- throw takeFromExternrefTable0(ret[0]);
205
+ formatOnType(params) {
206
+ const ret = wasm.workspace_formatOnType(this.__wbg_ptr, params);
207
+ if (ret[2]) {
208
+ throw takeFromExternrefTable0(ret[1]);
384
209
  }
210
+ return takeFromExternrefTable0(ret[0]);
385
211
  }
386
212
  /**
387
213
  * @param {FormatRangeParams} params
@@ -395,44 +221,132 @@ export class Workspace {
395
221
  return takeFromExternrefTable0(ret[0]);
396
222
  }
397
223
  /**
398
- * @param {OpenProjectParams} params
399
- * @returns {OpenProjectResult}
224
+ * @param {GetControlFlowGraphParams} params
225
+ * @returns {string}
400
226
  */
401
- openProject(params) {
402
- const ret = wasm.workspace_openProject(this.__wbg_ptr, params);
403
- if (ret[2]) {
404
- throw takeFromExternrefTable0(ret[1]);
227
+ getControlFlowGraph(params) {
228
+ let deferred2_0;
229
+ let deferred2_1;
230
+ try {
231
+ const ret = wasm.workspace_getControlFlowGraph(this.__wbg_ptr, params);
232
+ var ptr1 = ret[0];
233
+ var len1 = ret[1];
234
+ if (ret[3]) {
235
+ ptr1 = 0; len1 = 0;
236
+ throw takeFromExternrefTable0(ret[2]);
237
+ }
238
+ deferred2_0 = ptr1;
239
+ deferred2_1 = len1;
240
+ return getStringFromWasm0(ptr1, len1);
241
+ } finally {
242
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
405
243
  }
406
- return takeFromExternrefTable0(ret[0]);
407
244
  }
408
245
  /**
409
- * @param {PullActionsParams} params
410
- * @returns {PullActionsResult}
246
+ * @param {GetFileContentParams} params
247
+ * @returns {string}
411
248
  */
412
- pullActions(params) {
413
- const ret = wasm.workspace_pullActions(this.__wbg_ptr, params);
414
- if (ret[2]) {
415
- throw takeFromExternrefTable0(ret[1]);
249
+ getFileContent(params) {
250
+ let deferred2_0;
251
+ let deferred2_1;
252
+ try {
253
+ const ret = wasm.workspace_getFileContent(this.__wbg_ptr, params);
254
+ var ptr1 = ret[0];
255
+ var len1 = ret[1];
256
+ if (ret[3]) {
257
+ ptr1 = 0; len1 = 0;
258
+ throw takeFromExternrefTable0(ret[2]);
259
+ }
260
+ deferred2_0 = ptr1;
261
+ deferred2_1 = len1;
262
+ return getStringFromWasm0(ptr1, len1);
263
+ } finally {
264
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
416
265
  }
417
- return takeFromExternrefTable0(ret[0]);
418
266
  }
419
267
  /**
420
- * @param {ScanProjectParams} params
421
- * @returns {ScanProjectResult}
268
+ * @param {GetFormatterIRParams} params
269
+ * @returns {string}
422
270
  */
423
- scanProject(params) {
424
- const ret = wasm.workspace_scanProject(this.__wbg_ptr, params);
271
+ getFormatterIr(params) {
272
+ let deferred2_0;
273
+ let deferred2_1;
274
+ try {
275
+ const ret = wasm.workspace_getFormatterIr(this.__wbg_ptr, params);
276
+ var ptr1 = ret[0];
277
+ var len1 = ret[1];
278
+ if (ret[3]) {
279
+ ptr1 = 0; len1 = 0;
280
+ throw takeFromExternrefTable0(ret[2]);
281
+ }
282
+ deferred2_0 = ptr1;
283
+ deferred2_1 = len1;
284
+ return getStringFromWasm0(ptr1, len1);
285
+ } finally {
286
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
287
+ }
288
+ }
289
+ /**
290
+ * @param {GetModuleGraphParams} params
291
+ * @returns {GetModuleGraphResult}
292
+ */
293
+ getModuleGraph(params) {
294
+ const ret = wasm.workspace_getModuleGraph(this.__wbg_ptr, params);
425
295
  if (ret[2]) {
426
296
  throw takeFromExternrefTable0(ret[1]);
427
297
  }
428
298
  return takeFromExternrefTable0(ret[0]);
429
299
  }
430
300
  /**
431
- * @param {SupportsFeatureParams} params
432
- * @returns {FileFeaturesResult}
301
+ * @param {GetRegisteredTypesParams} params
302
+ * @returns {string}
433
303
  */
434
- fileFeatures(params) {
435
- const ret = wasm.workspace_fileFeatures(this.__wbg_ptr, params);
304
+ getRegisteredTypes(params) {
305
+ let deferred2_0;
306
+ let deferred2_1;
307
+ try {
308
+ const ret = wasm.workspace_getRegisteredTypes(this.__wbg_ptr, params);
309
+ var ptr1 = ret[0];
310
+ var len1 = ret[1];
311
+ if (ret[3]) {
312
+ ptr1 = 0; len1 = 0;
313
+ throw takeFromExternrefTable0(ret[2]);
314
+ }
315
+ deferred2_0 = ptr1;
316
+ deferred2_1 = len1;
317
+ return getStringFromWasm0(ptr1, len1);
318
+ } finally {
319
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
320
+ }
321
+ }
322
+ /**
323
+ * @param {GetSemanticModelParams} params
324
+ * @returns {string}
325
+ */
326
+ getSemanticModel(params) {
327
+ let deferred2_0;
328
+ let deferred2_1;
329
+ try {
330
+ const ret = wasm.workspace_getSemanticModel(this.__wbg_ptr, params);
331
+ var ptr1 = ret[0];
332
+ var len1 = ret[1];
333
+ if (ret[3]) {
334
+ ptr1 = 0; len1 = 0;
335
+ throw takeFromExternrefTable0(ret[2]);
336
+ }
337
+ deferred2_0 = ptr1;
338
+ deferred2_1 = len1;
339
+ return getStringFromWasm0(ptr1, len1);
340
+ } finally {
341
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
342
+ }
343
+ }
344
+ /**
345
+ * @param {GetSyntaxTreeParams} params
346
+ * @returns {GetSyntaxTreeResult}
347
+ */
348
+ getSyntaxTree(params) {
349
+ const ret = wasm.workspace_getSyntaxTree(this.__wbg_ptr, params);
436
350
  if (ret[2]) {
437
351
  throw takeFromExternrefTable0(ret[1]);
438
352
  }
@@ -460,6 +374,45 @@ export class Workspace {
460
374
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
461
375
  }
462
376
  }
377
+ /**
378
+ * @param {PathIsIgnoredParams} params
379
+ * @returns {boolean}
380
+ */
381
+ isPathIgnored(params) {
382
+ const ret = wasm.workspace_isPathIgnored(this.__wbg_ptr, params);
383
+ if (ret[2]) {
384
+ throw takeFromExternrefTable0(ret[1]);
385
+ }
386
+ return ret[0] !== 0;
387
+ }
388
+ constructor() {
389
+ const ret = wasm.workspace_new();
390
+ this.__wbg_ptr = ret >>> 0;
391
+ WorkspaceFinalization.register(this, this.__wbg_ptr, this);
392
+ return this;
393
+ }
394
+ /**
395
+ * @param {OpenFileParams} params
396
+ * @returns {OpenFileResult}
397
+ */
398
+ openFile(params) {
399
+ const ret = wasm.workspace_openFile(this.__wbg_ptr, params);
400
+ if (ret[2]) {
401
+ throw takeFromExternrefTable0(ret[1]);
402
+ }
403
+ return takeFromExternrefTable0(ret[0]);
404
+ }
405
+ /**
406
+ * @param {OpenProjectParams} params
407
+ * @returns {OpenProjectResult}
408
+ */
409
+ openProject(params) {
410
+ const ret = wasm.workspace_openProject(this.__wbg_ptr, params);
411
+ if (ret[2]) {
412
+ throw takeFromExternrefTable0(ret[1]);
413
+ }
414
+ return takeFromExternrefTable0(ret[0]);
415
+ }
463
416
  /**
464
417
  * @param {ParsePatternParams} params
465
418
  * @returns {ParsePatternResult}
@@ -472,148 +425,80 @@ export class Workspace {
472
425
  return takeFromExternrefTable0(ret[0]);
473
426
  }
474
427
  /**
475
- * @param {FormatOnTypeParams} params
476
- * @returns {any}
428
+ * @param {PullActionsParams} params
429
+ * @returns {PullActionsResult}
477
430
  */
478
- formatOnType(params) {
479
- const ret = wasm.workspace_formatOnType(this.__wbg_ptr, params);
431
+ pullActions(params) {
432
+ const ret = wasm.workspace_pullActions(this.__wbg_ptr, params);
480
433
  if (ret[2]) {
481
434
  throw takeFromExternrefTable0(ret[1]);
482
435
  }
483
436
  return takeFromExternrefTable0(ret[0]);
484
437
  }
485
438
  /**
486
- * @param {SearchPatternParams} params
487
- * @returns {SearchResults}
439
+ * @param {PullDiagnosticsParams} params
440
+ * @returns {PullDiagnosticsResult}
488
441
  */
489
- searchPattern(params) {
490
- const ret = wasm.workspace_searchPattern(this.__wbg_ptr, params);
442
+ pullDiagnostics(params) {
443
+ const ret = wasm.workspace_pullDiagnostics(this.__wbg_ptr, params);
491
444
  if (ret[2]) {
492
445
  throw takeFromExternrefTable0(ret[1]);
493
446
  }
494
447
  return takeFromExternrefTable0(ret[0]);
495
448
  }
496
449
  /**
497
- * @param {GetSyntaxTreeParams} params
498
- * @returns {GetSyntaxTreeResult}
450
+ * @param {RenameParams} params
451
+ * @returns {RenameResult}
499
452
  */
500
- getSyntaxTree(params) {
501
- const ret = wasm.workspace_getSyntaxTree(this.__wbg_ptr, params);
453
+ rename(params) {
454
+ const ret = wasm.workspace_rename(this.__wbg_ptr, params);
502
455
  if (ret[2]) {
503
456
  throw takeFromExternrefTable0(ret[1]);
504
457
  }
505
458
  return takeFromExternrefTable0(ret[0]);
506
459
  }
507
460
  /**
508
- * @param {PathIsIgnoredParams} params
509
- * @returns {boolean}
461
+ * @param {ScanProjectParams} params
462
+ * @returns {ScanProjectResult}
510
463
  */
511
- isPathIgnored(params) {
512
- const ret = wasm.workspace_isPathIgnored(this.__wbg_ptr, params);
464
+ scanProject(params) {
465
+ const ret = wasm.workspace_scanProject(this.__wbg_ptr, params);
513
466
  if (ret[2]) {
514
467
  throw takeFromExternrefTable0(ret[1]);
515
468
  }
516
- return ret[0] !== 0;
469
+ return takeFromExternrefTable0(ret[0]);
517
470
  }
518
471
  /**
519
- * @param {UpdateSettingsParams} params
520
- * @returns {UpdateSettingsResult}
472
+ * @param {SearchPatternParams} params
473
+ * @returns {SearchResults}
521
474
  */
522
- updateSettings(params) {
523
- const ret = wasm.workspace_updateSettings(this.__wbg_ptr, params);
475
+ searchPattern(params) {
476
+ const ret = wasm.workspace_searchPattern(this.__wbg_ptr, params);
524
477
  if (ret[2]) {
525
478
  throw takeFromExternrefTable0(ret[1]);
526
479
  }
527
480
  return takeFromExternrefTable0(ret[0]);
528
481
  }
529
482
  /**
530
- * @param {GetFileContentParams} params
531
- * @returns {string}
532
- */
533
- getFileContent(params) {
534
- let deferred2_0;
535
- let deferred2_1;
536
- try {
537
- const ret = wasm.workspace_getFileContent(this.__wbg_ptr, params);
538
- var ptr1 = ret[0];
539
- var len1 = ret[1];
540
- if (ret[3]) {
541
- ptr1 = 0; len1 = 0;
542
- throw takeFromExternrefTable0(ret[2]);
543
- }
544
- deferred2_0 = ptr1;
545
- deferred2_1 = len1;
546
- return getStringFromWasm0(ptr1, len1);
547
- } finally {
548
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
549
- }
550
- }
551
- /**
552
- * @param {GetFormatterIRParams} params
553
- * @returns {string}
554
- */
555
- getFormatterIr(params) {
556
- let deferred2_0;
557
- let deferred2_1;
558
- try {
559
- const ret = wasm.workspace_getFormatterIr(this.__wbg_ptr, params);
560
- var ptr1 = ret[0];
561
- var len1 = ret[1];
562
- if (ret[3]) {
563
- ptr1 = 0; len1 = 0;
564
- throw takeFromExternrefTable0(ret[2]);
565
- }
566
- deferred2_0 = ptr1;
567
- deferred2_1 = len1;
568
- return getStringFromWasm0(ptr1, len1);
569
- } finally {
570
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
571
- }
572
- }
573
- /**
574
- * @param {GetModuleGraphParams} params
575
- * @returns {GetModuleGraphResult}
483
+ * @param {UpdateModuleGraphParams} params
576
484
  */
577
- getModuleGraph(params) {
578
- const ret = wasm.workspace_getModuleGraph(this.__wbg_ptr, params);
579
- if (ret[2]) {
580
- throw takeFromExternrefTable0(ret[1]);
485
+ updateModuleGraph(params) {
486
+ const ret = wasm.workspace_updateModuleGraph(this.__wbg_ptr, params);
487
+ if (ret[1]) {
488
+ throw takeFromExternrefTable0(ret[0]);
581
489
  }
582
- return takeFromExternrefTable0(ret[0]);
583
490
  }
584
491
  /**
585
- * @param {PullDiagnosticsParams} params
586
- * @returns {PullDiagnosticsResult}
492
+ * @param {UpdateSettingsParams} params
493
+ * @returns {UpdateSettingsResult}
587
494
  */
588
- pullDiagnostics(params) {
589
- const ret = wasm.workspace_pullDiagnostics(this.__wbg_ptr, params);
495
+ updateSettings(params) {
496
+ const ret = wasm.workspace_updateSettings(this.__wbg_ptr, params);
590
497
  if (ret[2]) {
591
498
  throw takeFromExternrefTable0(ret[1]);
592
499
  }
593
500
  return takeFromExternrefTable0(ret[0]);
594
501
  }
595
- /**
596
- * @param {GetSemanticModelParams} params
597
- * @returns {string}
598
- */
599
- getSemanticModel(params) {
600
- let deferred2_0;
601
- let deferred2_1;
602
- try {
603
- const ret = wasm.workspace_getSemanticModel(this.__wbg_ptr, params);
604
- var ptr1 = ret[0];
605
- var len1 = ret[1];
606
- if (ret[3]) {
607
- ptr1 = 0; len1 = 0;
608
- throw takeFromExternrefTable0(ret[2]);
609
- }
610
- deferred2_0 = ptr1;
611
- deferred2_1 = len1;
612
- return getStringFromWasm0(ptr1, len1);
613
- } finally {
614
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
615
- }
616
- }
617
502
  /**
618
503
  * @param {MemoryFileSystem} fs
619
504
  * @returns {Workspace}
@@ -623,106 +508,518 @@ export class Workspace {
623
508
  const ret = wasm.workspace_withFileSystem(fs.__wbg_ptr);
624
509
  return Workspace.__wrap(ret);
625
510
  }
626
- /**
627
- * @param {UpdateModuleGraphParams} params
628
- */
629
- updateModuleGraph(params) {
630
- const ret = wasm.workspace_updateModuleGraph(this.__wbg_ptr, params);
631
- if (ret[1]) {
632
- throw takeFromExternrefTable0(ret[0]);
511
+ }
512
+ if (Symbol.dispose) Workspace.prototype[Symbol.dispose] = Workspace.prototype.free;
513
+
514
+ export function main() {
515
+ wasm.main();
516
+ }
517
+
518
+ function __wbg_get_imports() {
519
+ const import0 = {
520
+ __proto__: null,
521
+ __wbg_Error_2e59b1b37a9a34c3: function(arg0, arg1) {
522
+ const ret = Error(getStringFromWasm0(arg0, arg1));
523
+ return ret;
524
+ },
525
+ __wbg_Number_e6ffdb596c888833: function(arg0) {
526
+ const ret = Number(arg0);
527
+ return ret;
528
+ },
529
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
530
+ const ret = String(arg1);
531
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
532
+ const len1 = WASM_VECTOR_LEN;
533
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
534
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
535
+ },
536
+ __wbg___wbindgen_bigint_get_as_i64_2c5082002e4826e2: function(arg0, arg1) {
537
+ const v = arg1;
538
+ const ret = typeof(v) === 'bigint' ? v : undefined;
539
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
540
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
541
+ },
542
+ __wbg___wbindgen_boolean_get_a86c216575a75c30: function(arg0) {
543
+ const v = arg0;
544
+ const ret = typeof(v) === 'boolean' ? v : undefined;
545
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
546
+ },
547
+ __wbg___wbindgen_debug_string_dd5d2d07ce9e6c57: function(arg0, arg1) {
548
+ const ret = debugString(arg1);
549
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
550
+ const len1 = WASM_VECTOR_LEN;
551
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
552
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
553
+ },
554
+ __wbg___wbindgen_in_4bd7a57e54337366: function(arg0, arg1) {
555
+ const ret = arg0 in arg1;
556
+ return ret;
557
+ },
558
+ __wbg___wbindgen_is_bigint_6c98f7e945dacdde: function(arg0) {
559
+ const ret = typeof(arg0) === 'bigint';
560
+ return ret;
561
+ },
562
+ __wbg___wbindgen_is_function_49868bde5eb1e745: function(arg0) {
563
+ const ret = typeof(arg0) === 'function';
564
+ return ret;
565
+ },
566
+ __wbg___wbindgen_is_object_40c5a80572e8f9d3: function(arg0) {
567
+ const val = arg0;
568
+ const ret = typeof(val) === 'object' && val !== null;
569
+ return ret;
570
+ },
571
+ __wbg___wbindgen_is_string_b29b5c5a8065ba1a: function(arg0) {
572
+ const ret = typeof(arg0) === 'string';
573
+ return ret;
574
+ },
575
+ __wbg___wbindgen_is_undefined_c0cca72b82b86f4d: function(arg0) {
576
+ const ret = arg0 === undefined;
577
+ return ret;
578
+ },
579
+ __wbg___wbindgen_jsval_eq_7d430e744a913d26: function(arg0, arg1) {
580
+ const ret = arg0 === arg1;
581
+ return ret;
582
+ },
583
+ __wbg___wbindgen_jsval_loose_eq_3a72ae764d46d944: function(arg0, arg1) {
584
+ const ret = arg0 == arg1;
585
+ return ret;
586
+ },
587
+ __wbg___wbindgen_number_get_7579aab02a8a620c: function(arg0, arg1) {
588
+ const obj = arg1;
589
+ const ret = typeof(obj) === 'number' ? obj : undefined;
590
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
591
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
592
+ },
593
+ __wbg___wbindgen_string_get_914df97fcfa788f2: function(arg0, arg1) {
594
+ const obj = arg1;
595
+ const ret = typeof(obj) === 'string' ? obj : undefined;
596
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
597
+ var len1 = WASM_VECTOR_LEN;
598
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
599
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
600
+ },
601
+ __wbg___wbindgen_throw_81fc77679af83bc6: function(arg0, arg1) {
602
+ throw new Error(getStringFromWasm0(arg0, arg1));
603
+ },
604
+ __wbg_call_7f2987183bb62793: function() { return handleError(function (arg0, arg1) {
605
+ const ret = arg0.call(arg1);
606
+ return ret;
607
+ }, arguments); },
608
+ __wbg_done_547d467e97529006: function(arg0) {
609
+ const ret = arg0.done;
610
+ return ret;
611
+ },
612
+ __wbg_entries_616b1a459b85be0b: function(arg0) {
613
+ const ret = Object.entries(arg0);
614
+ return ret;
615
+ },
616
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
617
+ let deferred0_0;
618
+ let deferred0_1;
619
+ try {
620
+ deferred0_0 = arg0;
621
+ deferred0_1 = arg1;
622
+ console.error(getStringFromWasm0(arg0, arg1));
623
+ } finally {
624
+ wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
625
+ }
626
+ },
627
+ __wbg_get_4848e350b40afc16: function(arg0, arg1) {
628
+ const ret = arg0[arg1 >>> 0];
629
+ return ret;
630
+ },
631
+ __wbg_get_ed0642c4b9d31ddf: function() { return handleError(function (arg0, arg1) {
632
+ const ret = Reflect.get(arg0, arg1);
633
+ return ret;
634
+ }, arguments); },
635
+ __wbg_get_unchecked_7d7babe32e9e6a54: function(arg0, arg1) {
636
+ const ret = arg0[arg1 >>> 0];
637
+ return ret;
638
+ },
639
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
640
+ const ret = arg0[arg1];
641
+ return ret;
642
+ },
643
+ __wbg_instanceof_ArrayBuffer_ff7c1337a5e3b33a: function(arg0) {
644
+ let result;
645
+ try {
646
+ result = arg0 instanceof ArrayBuffer;
647
+ } catch (_) {
648
+ result = false;
649
+ }
650
+ const ret = result;
651
+ return ret;
652
+ },
653
+ __wbg_instanceof_Map_a10a2795ef4bfe97: function(arg0) {
654
+ let result;
655
+ try {
656
+ result = arg0 instanceof Map;
657
+ } catch (_) {
658
+ result = false;
659
+ }
660
+ const ret = result;
661
+ return ret;
662
+ },
663
+ __wbg_instanceof_Uint8Array_4b8da683deb25d72: function(arg0) {
664
+ let result;
665
+ try {
666
+ result = arg0 instanceof Uint8Array;
667
+ } catch (_) {
668
+ result = false;
669
+ }
670
+ const ret = result;
671
+ return ret;
672
+ },
673
+ __wbg_isArray_db61795ad004c139: function(arg0) {
674
+ const ret = Array.isArray(arg0);
675
+ return ret;
676
+ },
677
+ __wbg_isSafeInteger_ea83862ba994770c: function(arg0) {
678
+ const ret = Number.isSafeInteger(arg0);
679
+ return ret;
680
+ },
681
+ __wbg_iterator_de403ef31815a3e6: function() {
682
+ const ret = Symbol.iterator;
683
+ return ret;
684
+ },
685
+ __wbg_length_0c32cb8543c8e4c8: function(arg0) {
686
+ const ret = arg0.length;
687
+ return ret;
688
+ },
689
+ __wbg_length_6e821edde497a532: function(arg0) {
690
+ const ret = arg0.length;
691
+ return ret;
692
+ },
693
+ __wbg_new_227d7c05414eb861: function() {
694
+ const ret = new Error();
695
+ return ret;
696
+ },
697
+ __wbg_new_4f9fafbb3909af72: function() {
698
+ const ret = new Object();
699
+ return ret;
700
+ },
701
+ __wbg_new_99cabae501c0a8a0: function() {
702
+ const ret = new Map();
703
+ return ret;
704
+ },
705
+ __wbg_new_a560378ea1240b14: function(arg0) {
706
+ const ret = new Uint8Array(arg0);
707
+ return ret;
708
+ },
709
+ __wbg_new_e3b04b4d53d1b593: function(arg0, arg1) {
710
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
711
+ return ret;
712
+ },
713
+ __wbg_new_f3c9df4f38f3f798: function() {
714
+ const ret = new Array();
715
+ return ret;
716
+ },
717
+ __wbg_next_01132ed6134b8ef5: function(arg0) {
718
+ const ret = arg0.next;
719
+ return ret;
720
+ },
721
+ __wbg_next_b3713ec761a9dbfd: function() { return handleError(function (arg0) {
722
+ const ret = arg0.next();
723
+ return ret;
724
+ }, arguments); },
725
+ __wbg_now_e7c6795a7f81e10f: function(arg0) {
726
+ const ret = arg0.now();
727
+ return ret;
728
+ },
729
+ __wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
730
+ const ret = arg0.performance;
731
+ return ret;
732
+ },
733
+ __wbg_prototypesetcall_3e05eb9545565046: function(arg0, arg1, arg2) {
734
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
735
+ },
736
+ __wbg_set_08463b1df38a7e29: function(arg0, arg1, arg2) {
737
+ const ret = arg0.set(arg1, arg2);
738
+ return ret;
739
+ },
740
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
741
+ arg0[arg1] = arg2;
742
+ },
743
+ __wbg_set_6c60b2e8ad0e9383: function(arg0, arg1, arg2) {
744
+ arg0[arg1 >>> 0] = arg2;
745
+ },
746
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
747
+ const ret = arg1.stack;
748
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
749
+ const len1 = WASM_VECTOR_LEN;
750
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
751
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
752
+ },
753
+ __wbg_static_accessor_GLOBAL_THIS_a1248013d790bf5f: function() {
754
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
755
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
756
+ },
757
+ __wbg_static_accessor_GLOBAL_f2e0f995a21329ff: function() {
758
+ const ret = typeof global === 'undefined' ? null : global;
759
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
760
+ },
761
+ __wbg_static_accessor_SELF_24f78b6d23f286ea: function() {
762
+ const ret = typeof self === 'undefined' ? null : self;
763
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
764
+ },
765
+ __wbg_static_accessor_WINDOW_59fd959c540fe405: function() {
766
+ const ret = typeof window === 'undefined' ? null : window;
767
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
768
+ },
769
+ __wbg_value_7f6052747ccf940f: function(arg0) {
770
+ const ret = arg0.value;
771
+ return ret;
772
+ },
773
+ __wbindgen_cast_0000000000000001: function(arg0) {
774
+ // Cast intrinsic for `F64 -> Externref`.
775
+ const ret = arg0;
776
+ return ret;
777
+ },
778
+ __wbindgen_cast_0000000000000002: function(arg0) {
779
+ // Cast intrinsic for `I64 -> Externref`.
780
+ const ret = arg0;
781
+ return ret;
782
+ },
783
+ __wbindgen_cast_0000000000000003: function(arg0, arg1) {
784
+ // Cast intrinsic for `Ref(String) -> Externref`.
785
+ const ret = getStringFromWasm0(arg0, arg1);
786
+ return ret;
787
+ },
788
+ __wbindgen_cast_0000000000000004: function(arg0) {
789
+ // Cast intrinsic for `U64 -> Externref`.
790
+ const ret = BigInt.asUintN(64, arg0);
791
+ return ret;
792
+ },
793
+ __wbindgen_init_externref_table: function() {
794
+ const table = wasm.__wbindgen_externrefs;
795
+ const offset = table.grow(4);
796
+ table.set(0, undefined);
797
+ table.set(offset + 0, undefined);
798
+ table.set(offset + 1, null);
799
+ table.set(offset + 2, true);
800
+ table.set(offset + 3, false);
801
+ },
802
+ };
803
+ return {
804
+ __proto__: null,
805
+ "./biome_wasm_bg.js": import0,
806
+ };
807
+ }
808
+
809
+ const DiagnosticPrinterFinalization = (typeof FinalizationRegistry === 'undefined')
810
+ ? { register: () => {}, unregister: () => {} }
811
+ : new FinalizationRegistry(ptr => wasm.__wbg_diagnosticprinter_free(ptr >>> 0, 1));
812
+ const MemoryFileSystemFinalization = (typeof FinalizationRegistry === 'undefined')
813
+ ? { register: () => {}, unregister: () => {} }
814
+ : new FinalizationRegistry(ptr => wasm.__wbg_memoryfilesystem_free(ptr >>> 0, 1));
815
+ const WorkspaceFinalization = (typeof FinalizationRegistry === 'undefined')
816
+ ? { register: () => {}, unregister: () => {} }
817
+ : new FinalizationRegistry(ptr => wasm.__wbg_workspace_free(ptr >>> 0, 1));
818
+
819
+ function addToExternrefTable0(obj) {
820
+ const idx = wasm.__externref_table_alloc();
821
+ wasm.__wbindgen_externrefs.set(idx, obj);
822
+ return idx;
823
+ }
824
+
825
+ function _assertClass(instance, klass) {
826
+ if (!(instance instanceof klass)) {
827
+ throw new Error(`expected instance of ${klass.name}`);
828
+ }
829
+ }
830
+
831
+ function debugString(val) {
832
+ // primitive types
833
+ const type = typeof val;
834
+ if (type == 'number' || type == 'boolean' || val == null) {
835
+ return `${val}`;
836
+ }
837
+ if (type == 'string') {
838
+ return `"${val}"`;
839
+ }
840
+ if (type == 'symbol') {
841
+ const description = val.description;
842
+ if (description == null) {
843
+ return 'Symbol';
844
+ } else {
845
+ return `Symbol(${description})`;
633
846
  }
634
847
  }
635
- /**
636
- * @param {GetRegisteredTypesParams} params
637
- * @returns {string}
638
- */
639
- getRegisteredTypes(params) {
640
- let deferred2_0;
641
- let deferred2_1;
642
- try {
643
- const ret = wasm.workspace_getRegisteredTypes(this.__wbg_ptr, params);
644
- var ptr1 = ret[0];
645
- var len1 = ret[1];
646
- if (ret[3]) {
647
- ptr1 = 0; len1 = 0;
648
- throw takeFromExternrefTable0(ret[2]);
649
- }
650
- deferred2_0 = ptr1;
651
- deferred2_1 = len1;
652
- return getStringFromWasm0(ptr1, len1);
653
- } finally {
654
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
848
+ if (type == 'function') {
849
+ const name = val.name;
850
+ if (typeof name == 'string' && name.length > 0) {
851
+ return `Function(${name})`;
852
+ } else {
853
+ return 'Function';
655
854
  }
656
855
  }
657
- /**
658
- * @param {GetControlFlowGraphParams} params
659
- * @returns {string}
660
- */
661
- getControlFlowGraph(params) {
662
- let deferred2_0;
663
- let deferred2_1;
664
- try {
665
- const ret = wasm.workspace_getControlFlowGraph(this.__wbg_ptr, params);
666
- var ptr1 = ret[0];
667
- var len1 = ret[1];
668
- if (ret[3]) {
669
- ptr1 = 0; len1 = 0;
670
- throw takeFromExternrefTable0(ret[2]);
671
- }
672
- deferred2_0 = ptr1;
673
- deferred2_1 = len1;
674
- return getStringFromWasm0(ptr1, len1);
675
- } finally {
676
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
856
+ // objects
857
+ if (Array.isArray(val)) {
858
+ const length = val.length;
859
+ let debug = '[';
860
+ if (length > 0) {
861
+ debug += debugString(val[0]);
862
+ }
863
+ for(let i = 1; i < length; i++) {
864
+ debug += ', ' + debugString(val[i]);
865
+ }
866
+ debug += ']';
867
+ return debug;
868
+ }
869
+ // Test for built-in
870
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
871
+ let className;
872
+ if (builtInMatches && builtInMatches.length > 1) {
873
+ className = builtInMatches[1];
874
+ } else {
875
+ // Failed to match the standard '[object ClassName]'
876
+ return toString.call(val);
877
+ }
878
+ if (className == 'Object') {
879
+ // we're a user defined class or Object
880
+ // JSON.stringify avoids problems with cycles, and is generally much
881
+ // easier than looping through ownProperties of `val`.
882
+ try {
883
+ return 'Object(' + JSON.stringify(val) + ')';
884
+ } catch (_) {
885
+ return 'Object';
677
886
  }
678
887
  }
679
- constructor() {
680
- const ret = wasm.workspace_new();
681
- this.__wbg_ptr = ret >>> 0;
682
- WorkspaceFinalization.register(this, this.__wbg_ptr, this);
683
- return this;
888
+ // errors
889
+ if (val instanceof Error) {
890
+ return `${val.name}: ${val.message}\n${val.stack}`;
684
891
  }
685
- /**
686
- * @param {RenameParams} params
687
- * @returns {RenameResult}
688
- */
689
- rename(params) {
690
- const ret = wasm.workspace_rename(this.__wbg_ptr, params);
691
- if (ret[2]) {
692
- throw takeFromExternrefTable0(ret[1]);
693
- }
694
- return takeFromExternrefTable0(ret[0]);
892
+ // TODO we could test for more things here, like `Set`s and `Map`s.
893
+ return className;
894
+ }
895
+
896
+ function getArrayU8FromWasm0(ptr, len) {
897
+ ptr = ptr >>> 0;
898
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
899
+ }
900
+
901
+ let cachedDataViewMemory0 = null;
902
+ function getDataViewMemory0() {
903
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
904
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
695
905
  }
696
- /**
697
- * @param {FixFileParams} params
698
- * @returns {FixFileResult}
699
- */
700
- fixFile(params) {
701
- const ret = wasm.workspace_fixFile(this.__wbg_ptr, params);
702
- if (ret[2]) {
703
- throw takeFromExternrefTable0(ret[1]);
704
- }
705
- return takeFromExternrefTable0(ret[0]);
906
+ return cachedDataViewMemory0;
907
+ }
908
+
909
+ function getStringFromWasm0(ptr, len) {
910
+ ptr = ptr >>> 0;
911
+ return decodeText(ptr, len);
912
+ }
913
+
914
+ let cachedUint8ArrayMemory0 = null;
915
+ function getUint8ArrayMemory0() {
916
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
917
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
706
918
  }
707
- /**
708
- * @param {OpenFileParams} params
709
- * @returns {OpenFileResult}
710
- */
711
- openFile(params) {
712
- const ret = wasm.workspace_openFile(this.__wbg_ptr, params);
713
- if (ret[2]) {
714
- throw takeFromExternrefTable0(ret[1]);
919
+ return cachedUint8ArrayMemory0;
920
+ }
921
+
922
+ function handleError(f, args) {
923
+ try {
924
+ return f.apply(this, args);
925
+ } catch (e) {
926
+ const idx = addToExternrefTable0(e);
927
+ wasm.__wbindgen_exn_store(idx);
928
+ }
929
+ }
930
+
931
+ function isLikeNone(x) {
932
+ return x === undefined || x === null;
933
+ }
934
+
935
+ function passArray8ToWasm0(arg, malloc) {
936
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
937
+ getUint8ArrayMemory0().set(arg, ptr / 1);
938
+ WASM_VECTOR_LEN = arg.length;
939
+ return ptr;
940
+ }
941
+
942
+ function passStringToWasm0(arg, malloc, realloc) {
943
+ if (realloc === undefined) {
944
+ const buf = cachedTextEncoder.encode(arg);
945
+ const ptr = malloc(buf.length, 1) >>> 0;
946
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
947
+ WASM_VECTOR_LEN = buf.length;
948
+ return ptr;
949
+ }
950
+
951
+ let len = arg.length;
952
+ let ptr = malloc(len, 1) >>> 0;
953
+
954
+ const mem = getUint8ArrayMemory0();
955
+
956
+ let offset = 0;
957
+
958
+ for (; offset < len; offset++) {
959
+ const code = arg.charCodeAt(offset);
960
+ if (code > 0x7F) break;
961
+ mem[ptr + offset] = code;
962
+ }
963
+ if (offset !== len) {
964
+ if (offset !== 0) {
965
+ arg = arg.slice(offset);
715
966
  }
716
- return takeFromExternrefTable0(ret[0]);
967
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
968
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
969
+ const ret = cachedTextEncoder.encodeInto(arg, view);
970
+
971
+ offset += ret.written;
972
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
973
+ }
974
+
975
+ WASM_VECTOR_LEN = offset;
976
+ return ptr;
977
+ }
978
+
979
+ function takeFromExternrefTable0(idx) {
980
+ const value = wasm.__wbindgen_externrefs.get(idx);
981
+ wasm.__externref_table_dealloc(idx);
982
+ return value;
983
+ }
984
+
985
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
986
+ cachedTextDecoder.decode();
987
+ const MAX_SAFARI_DECODE_BYTES = 2146435072;
988
+ let numBytesDecoded = 0;
989
+ function decodeText(ptr, len) {
990
+ numBytesDecoded += len;
991
+ if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
992
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
993
+ cachedTextDecoder.decode();
994
+ numBytesDecoded = len;
717
995
  }
996
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
718
997
  }
719
- if (Symbol.dispose) Workspace.prototype[Symbol.dispose] = Workspace.prototype.free;
720
998
 
721
- export function main() {
722
- wasm.main();
999
+ const cachedTextEncoder = new TextEncoder();
1000
+
1001
+ if (!('encodeInto' in cachedTextEncoder)) {
1002
+ cachedTextEncoder.encodeInto = function (arg, view) {
1003
+ const buf = cachedTextEncoder.encode(arg);
1004
+ view.set(buf);
1005
+ return {
1006
+ read: arg.length,
1007
+ written: buf.length
1008
+ };
1009
+ };
723
1010
  }
724
1011
 
725
- const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
1012
+ let WASM_VECTOR_LEN = 0;
1013
+
1014
+ let wasmModule, wasm;
1015
+ function __wbg_finalize_init(instance, module) {
1016
+ wasm = instance.exports;
1017
+ wasmModule = module;
1018
+ cachedDataViewMemory0 = null;
1019
+ cachedUint8ArrayMemory0 = null;
1020
+ wasm.__wbindgen_start();
1021
+ return wasm;
1022
+ }
726
1023
 
727
1024
  async function __wbg_load(module, imports) {
728
1025
  if (typeof Response === 'function' && module instanceof Response) {
@@ -730,14 +1027,12 @@ async function __wbg_load(module, imports) {
730
1027
  try {
731
1028
  return await WebAssembly.instantiateStreaming(module, imports);
732
1029
  } catch (e) {
733
- const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);
1030
+ const validResponse = module.ok && expectedResponseType(module.type);
734
1031
 
735
1032
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
736
1033
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
737
1034
 
738
- } else {
739
- throw e;
740
- }
1035
+ } else { throw e; }
741
1036
  }
742
1037
  }
743
1038
 
@@ -752,312 +1047,20 @@ async function __wbg_load(module, imports) {
752
1047
  return instance;
753
1048
  }
754
1049
  }
755
- }
756
1050
 
757
- function __wbg_get_imports() {
758
- const imports = {};
759
- imports.wbg = {};
760
- imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {
761
- const ret = Error(getStringFromWasm0(arg0, arg1));
762
- return ret;
763
- };
764
- imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {
765
- const ret = Number(arg0);
766
- return ret;
767
- };
768
- imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
769
- const ret = String(arg1);
770
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
771
- const len1 = WASM_VECTOR_LEN;
772
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
773
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
774
- };
775
- imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {
776
- const v = arg1;
777
- const ret = typeof(v) === 'bigint' ? v : undefined;
778
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
779
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
780
- };
781
- imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {
782
- const v = arg0;
783
- const ret = typeof(v) === 'boolean' ? v : undefined;
784
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
785
- };
786
- imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {
787
- const ret = debugString(arg1);
788
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
789
- const len1 = WASM_VECTOR_LEN;
790
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
791
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
792
- };
793
- imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {
794
- const ret = arg0 in arg1;
795
- return ret;
796
- };
797
- imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {
798
- const ret = typeof(arg0) === 'bigint';
799
- return ret;
800
- };
801
- imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
802
- const ret = typeof(arg0) === 'function';
803
- return ret;
804
- };
805
- imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {
806
- const val = arg0;
807
- const ret = typeof(val) === 'object' && val !== null;
808
- return ret;
809
- };
810
- imports.wbg.__wbg___wbindgen_is_string_704ef9c8fc131030 = function(arg0) {
811
- const ret = typeof(arg0) === 'string';
812
- return ret;
813
- };
814
- imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {
815
- const ret = arg0 === undefined;
816
- return ret;
817
- };
818
- imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {
819
- const ret = arg0 === arg1;
820
- return ret;
821
- };
822
- imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {
823
- const ret = arg0 == arg1;
824
- return ret;
825
- };
826
- imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {
827
- const obj = arg1;
828
- const ret = typeof(obj) === 'number' ? obj : undefined;
829
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
830
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
831
- };
832
- imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {
833
- const obj = arg1;
834
- const ret = typeof(obj) === 'string' ? obj : undefined;
835
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
836
- var len1 = WASM_VECTOR_LEN;
837
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
838
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
839
- };
840
- imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {
841
- throw new Error(getStringFromWasm0(arg0, arg1));
842
- };
843
- imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {
844
- const ret = arg0.call(arg1);
845
- return ret;
846
- }, arguments) };
847
- imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
848
- const ret = arg0.done;
849
- return ret;
850
- };
851
- imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {
852
- const ret = Object.entries(arg0);
853
- return ret;
854
- };
855
- imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
856
- let deferred0_0;
857
- let deferred0_1;
858
- try {
859
- deferred0_0 = arg0;
860
- deferred0_1 = arg1;
861
- console.error(getStringFromWasm0(arg0, arg1));
862
- } finally {
863
- wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
864
- }
865
- };
866
- imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {
867
- const ret = arg0[arg1 >>> 0];
868
- return ret;
869
- };
870
- imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {
871
- const ret = Reflect.get(arg0, arg1);
872
- return ret;
873
- }, arguments) };
874
- imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
875
- const ret = arg0[arg1];
876
- return ret;
877
- };
878
- imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {
879
- let result;
880
- try {
881
- result = arg0 instanceof ArrayBuffer;
882
- } catch (_) {
883
- result = false;
884
- }
885
- const ret = result;
886
- return ret;
887
- };
888
- imports.wbg.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {
889
- let result;
890
- try {
891
- result = arg0 instanceof Map;
892
- } catch (_) {
893
- result = false;
1051
+ function expectedResponseType(type) {
1052
+ switch (type) {
1053
+ case 'basic': case 'cors': case 'default': return true;
894
1054
  }
895
- const ret = result;
896
- return ret;
897
- };
898
- imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {
899
- let result;
900
- try {
901
- result = arg0 instanceof Uint8Array;
902
- } catch (_) {
903
- result = false;
904
- }
905
- const ret = result;
906
- return ret;
907
- };
908
- imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {
909
- const ret = Array.isArray(arg0);
910
- return ret;
911
- };
912
- imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {
913
- const ret = Number.isSafeInteger(arg0);
914
- return ret;
915
- };
916
- imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {
917
- const ret = Symbol.iterator;
918
- return ret;
919
- };
920
- imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {
921
- const ret = arg0.length;
922
- return ret;
923
- };
924
- imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {
925
- const ret = arg0.length;
926
- return ret;
927
- };
928
- imports.wbg.__wbg_new_1ba21ce319a06297 = function() {
929
- const ret = new Object();
930
- return ret;
931
- };
932
- imports.wbg.__wbg_new_25f239778d6112b9 = function() {
933
- const ret = new Array();
934
- return ret;
935
- };
936
- imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {
937
- const ret = new Uint8Array(arg0);
938
- return ret;
939
- };
940
- imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
941
- const ret = new Error();
942
- return ret;
943
- };
944
- imports.wbg.__wbg_new_b546ae120718850e = function() {
945
- const ret = new Map();
946
- return ret;
947
- };
948
- imports.wbg.__wbg_new_df1173567d5ff028 = function(arg0, arg1) {
949
- const ret = new Error(getStringFromWasm0(arg0, arg1));
950
- return ret;
951
- };
952
- imports.wbg.__wbg_new_no_args_cb138f77cf6151ee = function(arg0, arg1) {
953
- const ret = new Function(getStringFromWasm0(arg0, arg1));
954
- return ret;
955
- };
956
- imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {
957
- const ret = arg0.next;
958
- return ret;
959
- };
960
- imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {
961
- const ret = arg0.next();
962
- return ret;
963
- }, arguments) };
964
- imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) {
965
- const ret = arg0.now();
966
- return ret;
967
- };
968
- imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
969
- const ret = arg0.performance;
970
- return ret;
971
- };
972
- imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {
973
- Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
974
- };
975
- imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
976
- arg0[arg1] = arg2;
977
- };
978
- imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {
979
- arg0[arg1 >>> 0] = arg2;
980
- };
981
- imports.wbg.__wbg_set_efaaf145b9377369 = function(arg0, arg1, arg2) {
982
- const ret = arg0.set(arg1, arg2);
983
- return ret;
984
- };
985
- imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
986
- const ret = arg1.stack;
987
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
988
- const len1 = WASM_VECTOR_LEN;
989
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
990
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
991
- };
992
- imports.wbg.__wbg_static_accessor_GLOBAL_769e6b65d6557335 = function() {
993
- const ret = typeof global === 'undefined' ? null : global;
994
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
995
- };
996
- imports.wbg.__wbg_static_accessor_GLOBAL_THIS_60cf02db4de8e1c1 = function() {
997
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
998
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
999
- };
1000
- imports.wbg.__wbg_static_accessor_SELF_08f5a74c69739274 = function() {
1001
- const ret = typeof self === 'undefined' ? null : self;
1002
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1003
- };
1004
- imports.wbg.__wbg_static_accessor_WINDOW_a8924b26aa92d024 = function() {
1005
- const ret = typeof window === 'undefined' ? null : window;
1006
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
1007
- };
1008
- imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {
1009
- const ret = arg0.value;
1010
- return ret;
1011
- };
1012
- imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
1013
- // Cast intrinsic for `Ref(String) -> Externref`.
1014
- const ret = getStringFromWasm0(arg0, arg1);
1015
- return ret;
1016
- };
1017
- imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
1018
- // Cast intrinsic for `U64 -> Externref`.
1019
- const ret = BigInt.asUintN(64, arg0);
1020
- return ret;
1021
- };
1022
- imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {
1023
- // Cast intrinsic for `I64 -> Externref`.
1024
- const ret = arg0;
1025
- return ret;
1026
- };
1027
- imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
1028
- // Cast intrinsic for `F64 -> Externref`.
1029
- const ret = arg0;
1030
- return ret;
1031
- };
1032
- imports.wbg.__wbindgen_init_externref_table = function() {
1033
- const table = wasm.__wbindgen_externrefs;
1034
- const offset = table.grow(4);
1035
- table.set(0, undefined);
1036
- table.set(offset + 0, undefined);
1037
- table.set(offset + 1, null);
1038
- table.set(offset + 2, true);
1039
- table.set(offset + 3, false);
1040
- };
1041
-
1042
- return imports;
1043
- }
1044
-
1045
- function __wbg_finalize_init(instance, module) {
1046
- wasm = instance.exports;
1047
- __wbg_init.__wbindgen_wasm_module = module;
1048
- cachedDataViewMemory0 = null;
1049
- cachedUint8ArrayMemory0 = null;
1050
-
1051
-
1052
- wasm.__wbindgen_start();
1053
- return wasm;
1055
+ return false;
1056
+ }
1054
1057
  }
1055
1058
 
1056
1059
  function initSync(module) {
1057
1060
  if (wasm !== undefined) return wasm;
1058
1061
 
1059
1062
 
1060
- if (typeof module !== 'undefined') {
1063
+ if (module !== undefined) {
1061
1064
  if (Object.getPrototypeOf(module) === Object.prototype) {
1062
1065
  ({module} = module)
1063
1066
  } else {
@@ -1077,7 +1080,7 @@ async function __wbg_init(module_or_path) {
1077
1080
  if (wasm !== undefined) return wasm;
1078
1081
 
1079
1082
 
1080
- if (typeof module_or_path !== 'undefined') {
1083
+ if (module_or_path !== undefined) {
1081
1084
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
1082
1085
  ({module_or_path} = module_or_path)
1083
1086
  } else {
@@ -1085,7 +1088,7 @@ async function __wbg_init(module_or_path) {
1085
1088
  }
1086
1089
  }
1087
1090
 
1088
- if (typeof module_or_path === 'undefined') {
1091
+ if (module_or_path === undefined) {
1089
1092
  module_or_path = new URL('biome_wasm_bg.wasm', import.meta.url);
1090
1093
  }
1091
1094
  const imports = __wbg_get_imports();
@@ -1099,5 +1102,4 @@ async function __wbg_init(module_or_path) {
1099
1102
  return __wbg_finalize_init(instance, module);
1100
1103
  }
1101
1104
 
1102
- export { initSync };
1103
- export default __wbg_init;
1105
+ export { initSync, __wbg_init as default };