@biomejs/wasm-web 2.3.2 → 2.3.4

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.d.ts CHANGED
@@ -137,7 +137,7 @@ interface CssConfiguration {
137
137
  type Extends = string[] | string;
138
138
  interface FilesConfiguration {
139
139
  /**
140
- * **Deprecated:** Please use _force-ignore syntax_ in `files.includes` instead: https://biomejs.dev/reference/configuration/#filesincludes
140
+ * **Deprecated:** Please use _force-ignore syntax_ in `files.includes` instead: <https://biomejs.dev/reference/configuration/#filesincludes>
141
141
 
142
142
  Set of file and folder names that should be unconditionally ignored by Biome's scanner.
143
143
  */
@@ -1513,6 +1513,10 @@ interface Correctness {
1513
1513
  useYield?: RuleConfiguration_for_UseYieldOptions;
1514
1514
  }
1515
1515
  interface Nursery {
1516
+ /**
1517
+ * Disallow continue statements.
1518
+ */
1519
+ noContinue?: RuleConfiguration_for_NoContinueOptions;
1516
1520
  /**
1517
1521
  * Restrict imports of deprecated exports.
1518
1522
  */
@@ -1549,6 +1553,10 @@ interface Nursery {
1549
1553
  * Prevent client components from being async functions.
1550
1554
  */
1551
1555
  noNextAsyncClientComponent?: RuleConfiguration_for_NoNextAsyncClientComponentOptions;
1556
+ /**
1557
+ * Disallow function parameters that are only used in recursive calls.
1558
+ */
1559
+ noParametersOnlyUsedInRecursion?: RuleFixConfiguration_for_NoParametersOnlyUsedInRecursionOptions;
1552
1560
  /**
1553
1561
  * Replaces usages of forwardRef with passing ref as a prop.
1554
1562
  */
@@ -1557,6 +1565,10 @@ interface Nursery {
1557
1565
  * Disallow variable declarations from shadowing variables declared in the outer scope.
1558
1566
  */
1559
1567
  noShadow?: RuleConfiguration_for_NoShadowOptions;
1568
+ /**
1569
+ * Disallow unknown DOM properties.
1570
+ */
1571
+ noUnknownAttribute?: RuleConfiguration_for_NoUnknownAttributeOptions;
1560
1572
  /**
1561
1573
  * Disallow unnecessary type-based conditions that can be statically determined as redundant.
1562
1574
  */
@@ -2887,6 +2899,9 @@ type RuleFixConfiguration_for_UseValidTypeofOptions =
2887
2899
  type RuleConfiguration_for_UseYieldOptions =
2888
2900
  | RulePlainConfiguration
2889
2901
  | RuleWithOptions_for_UseYieldOptions;
2902
+ type RuleConfiguration_for_NoContinueOptions =
2903
+ | RulePlainConfiguration
2904
+ | RuleWithOptions_for_NoContinueOptions;
2890
2905
  type RuleConfiguration_for_NoDeprecatedImportsOptions =
2891
2906
  | RulePlainConfiguration
2892
2907
  | RuleWithOptions_for_NoDeprecatedImportsOptions;
@@ -2914,12 +2929,18 @@ type RuleFixConfiguration_for_NoMisusedPromisesOptions =
2914
2929
  type RuleConfiguration_for_NoNextAsyncClientComponentOptions =
2915
2930
  | RulePlainConfiguration
2916
2931
  | RuleWithOptions_for_NoNextAsyncClientComponentOptions;
2932
+ type RuleFixConfiguration_for_NoParametersOnlyUsedInRecursionOptions =
2933
+ | RulePlainConfiguration
2934
+ | RuleWithFixOptions_for_NoParametersOnlyUsedInRecursionOptions;
2917
2935
  type RuleFixConfiguration_for_NoReactForwardRefOptions =
2918
2936
  | RulePlainConfiguration
2919
2937
  | RuleWithFixOptions_for_NoReactForwardRefOptions;
2920
2938
  type RuleConfiguration_for_NoShadowOptions =
2921
2939
  | RulePlainConfiguration
2922
2940
  | RuleWithOptions_for_NoShadowOptions;
2941
+ type RuleConfiguration_for_NoUnknownAttributeOptions =
2942
+ | RulePlainConfiguration
2943
+ | RuleWithOptions_for_NoUnknownAttributeOptions;
2923
2944
  type RuleConfiguration_for_NoUnnecessaryConditionsOptions =
2924
2945
  | RulePlainConfiguration
2925
2946
  | RuleWithOptions_for_NoUnnecessaryConditionsOptions;
@@ -5304,6 +5325,16 @@ interface RuleWithOptions_for_UseYieldOptions {
5304
5325
  */
5305
5326
  options: UseYieldOptions;
5306
5327
  }
5328
+ interface RuleWithOptions_for_NoContinueOptions {
5329
+ /**
5330
+ * The severity of the emitted diagnostics by the rule
5331
+ */
5332
+ level: RulePlainConfiguration;
5333
+ /**
5334
+ * Rule's options
5335
+ */
5336
+ options: NoContinueOptions;
5337
+ }
5307
5338
  interface RuleWithOptions_for_NoDeprecatedImportsOptions {
5308
5339
  /**
5309
5340
  * The severity of the emitted diagnostics by the rule
@@ -5402,6 +5433,20 @@ interface RuleWithOptions_for_NoNextAsyncClientComponentOptions {
5402
5433
  */
5403
5434
  options: NoNextAsyncClientComponentOptions;
5404
5435
  }
5436
+ interface RuleWithFixOptions_for_NoParametersOnlyUsedInRecursionOptions {
5437
+ /**
5438
+ * The kind of the code actions emitted by the rule
5439
+ */
5440
+ fix?: FixKind;
5441
+ /**
5442
+ * The severity of the emitted diagnostics by the rule
5443
+ */
5444
+ level: RulePlainConfiguration;
5445
+ /**
5446
+ * Rule's options
5447
+ */
5448
+ options: NoParametersOnlyUsedInRecursionOptions;
5449
+ }
5405
5450
  interface RuleWithFixOptions_for_NoReactForwardRefOptions {
5406
5451
  /**
5407
5452
  * The kind of the code actions emitted by the rule
@@ -5426,6 +5471,16 @@ interface RuleWithOptions_for_NoShadowOptions {
5426
5471
  */
5427
5472
  options: NoShadowOptions;
5428
5473
  }
5474
+ interface RuleWithOptions_for_NoUnknownAttributeOptions {
5475
+ /**
5476
+ * The severity of the emitted diagnostics by the rule
5477
+ */
5478
+ level: RulePlainConfiguration;
5479
+ /**
5480
+ * Rule's options
5481
+ */
5482
+ options: NoUnknownAttributeOptions;
5483
+ }
5429
5484
  interface RuleWithOptions_for_NoUnnecessaryConditionsOptions {
5430
5485
  /**
5431
5486
  * The severity of the emitted diagnostics by the rule
@@ -7984,7 +8039,7 @@ interface NoRestrictedElementsOptions {
7984
8039
  /**
7985
8040
  * Elements to restrict. Each key is the element name, and the value is the message to show when the element is used.
7986
8041
  */
7987
- elements: CustomRestrictedElements;
8042
+ elements?: CustomRestrictedElements;
7988
8043
  }
7989
8044
  interface NoSelfAssignOptions {}
7990
8045
  interface NoSetterReturnOptions {}
@@ -8083,6 +8138,7 @@ interface UseUniqueElementIdsOptions {
8083
8138
  interface UseValidForDirectionOptions {}
8084
8139
  interface UseValidTypeofOptions {}
8085
8140
  interface UseYieldOptions {}
8141
+ interface NoContinueOptions {}
8086
8142
  interface NoDeprecatedImportsOptions {}
8087
8143
  interface NoDuplicateDependenciesOptions {}
8088
8144
  interface NoEmptySourceOptions {
@@ -8120,8 +8176,12 @@ interface NoJsxLiteralsOptions {
8120
8176
  }
8121
8177
  interface NoMisusedPromisesOptions {}
8122
8178
  interface NoNextAsyncClientComponentOptions {}
8179
+ interface NoParametersOnlyUsedInRecursionOptions {}
8123
8180
  interface NoReactForwardRefOptions {}
8124
8181
  interface NoShadowOptions {}
8182
+ interface NoUnknownAttributeOptions {
8183
+ ignore?: string[];
8184
+ }
8125
8185
  interface NoUnnecessaryConditionsOptions {}
8126
8186
  interface NoUnresolvedImportsOptions {}
8127
8187
  interface NoUnusedExpressionsOptions {}
@@ -8235,13 +8295,13 @@ interface NoRestrictedGlobalsOptions {
8235
8295
  /**
8236
8296
  * A list of names that should trigger the rule
8237
8297
  */
8238
- deniedGlobals: Record<string, string>;
8298
+ deniedGlobals?: Record<string, string>;
8239
8299
  }
8240
8300
  interface NoRestrictedImportsOptions {
8241
8301
  /**
8242
8302
  * A list of import paths that should trigger the rule.
8243
8303
  */
8244
- paths: Record<string, Paths>;
8304
+ paths?: Record<string, Paths>;
8245
8305
  /**
8246
8306
  * gitignore-style patterns that should trigger the rule.
8247
8307
  */
@@ -8270,7 +8330,7 @@ interface UseComponentExportOnlyModulesOptions {
8270
8330
  /**
8271
8331
  * A list of names that can be additionally exported from the module This option is for exports that do not hinder [React Fast Refresh](https://github.com/facebook/react/tree/main/packages/react-refresh), such as [`meta` in Remix](https://remix.run/docs/en/main/route/meta)
8272
8332
  */
8273
- allowExportNames: string[];
8333
+ allowExportNames?: string[];
8274
8334
  }
8275
8335
  interface UseConsistentArrayTypeOptions {
8276
8336
  syntax?: ConsistentArrayType;
@@ -8305,7 +8365,7 @@ interface UseFilenamingConventionOptions {
8305
8365
  /**
8306
8366
  * Allowed cases for file names.
8307
8367
  */
8308
- filenameCases: FilenameCases;
8368
+ filenameCases?: FilenameCases;
8309
8369
  /**
8310
8370
  * Regular expression to enforce
8311
8371
  */
@@ -8313,11 +8373,11 @@ interface UseFilenamingConventionOptions {
8313
8373
  /**
8314
8374
  * If `false`, then non-ASCII characters are allowed.
8315
8375
  */
8316
- requireAscii: boolean;
8376
+ requireAscii?: boolean;
8317
8377
  /**
8318
8378
  * If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].
8319
8379
  */
8320
- strictCase: boolean;
8380
+ strictCase?: boolean;
8321
8381
  }
8322
8382
  interface UseForOfOptions {}
8323
8383
  interface UseFragmentSyntaxOptions {}
@@ -8334,15 +8394,15 @@ interface UseNamingConventionOptions {
8334
8394
  /**
8335
8395
  * Custom conventions.
8336
8396
  */
8337
- conventions: Convention[];
8397
+ conventions?: Convention[];
8338
8398
  /**
8339
8399
  * If `false`, then non-ASCII characters are allowed.
8340
8400
  */
8341
- requireAscii: boolean;
8401
+ requireAscii?: boolean;
8342
8402
  /**
8343
8403
  * If `false`, then consecutive uppercase are allowed in _camel_ and _pascal_ cases. This does not affect other [Case].
8344
8404
  */
8345
- strictCase: boolean;
8405
+ strictCase?: boolean;
8346
8406
  }
8347
8407
  interface UseNodeAssertStrictOptions {}
8348
8408
  interface UseNodejsImportProtocolOptions {}
@@ -8354,7 +8414,7 @@ interface UseReadonlyClassPropertiesOptions {
8354
8414
  /**
8355
8415
  * When `true`, the keywords `public`, `protected`, and `private` are analyzed by the rule.
8356
8416
  */
8357
- checkAllProperties: boolean;
8417
+ checkAllProperties?: boolean;
8358
8418
  }
8359
8419
  interface UseSelfClosingElementsOptions {
8360
8420
  ignoreHtmlElements?: boolean;
@@ -8378,7 +8438,7 @@ interface NoBitwiseOperatorsOptions {
8378
8438
  /**
8379
8439
  * Allows a list of bitwise operators to be used as exceptions.
8380
8440
  */
8381
- allow: string[];
8441
+ allow?: string[];
8382
8442
  }
8383
8443
  interface NoCatchAssignOptions {}
8384
8444
  interface NoClassAssignOptions {}
@@ -8388,14 +8448,14 @@ interface NoConfusingLabelsOptions {
8388
8448
  /**
8389
8449
  * A list of (non-confusing) labels that should be allowed
8390
8450
  */
8391
- allowedLabels: string[];
8451
+ allowedLabels?: string[];
8392
8452
  }
8393
8453
  interface NoConfusingVoidTypeOptions {}
8394
8454
  interface NoConsoleOptions {
8395
8455
  /**
8396
8456
  * Allowed calls on the console object.
8397
8457
  */
8398
- allow: string[];
8458
+ allow?: string[];
8399
8459
  }
8400
8460
  interface NoConstEnumOptions {}
8401
8461
  interface NoConstantBinaryExpressionsOptions {}
@@ -8409,7 +8469,7 @@ interface NoDoubleEqualsOptions {
8409
8469
 
8410
8470
  If `false`, no such exception will be made.
8411
8471
  */
8412
- ignoreNull: boolean;
8472
+ ignoreNull?: boolean;
8413
8473
  }
8414
8474
  interface NoDuplicateAtImportRulesOptions {}
8415
8475
  interface NoDuplicateCaseOptions {}
@@ -8850,6 +8910,7 @@ type Category =
8850
8910
  | "lint/correctness/useValidTypeof"
8851
8911
  | "lint/correctness/useYield"
8852
8912
  | "lint/nursery/noColorInvalidHex"
8913
+ | "lint/nursery/noContinue"
8853
8914
  | "lint/nursery/noDeprecatedImports"
8854
8915
  | "lint/nursery/noDuplicateDependencies"
8855
8916
  | "lint/nursery/noEmptySource"
@@ -8861,8 +8922,10 @@ type Category =
8861
8922
  | "lint/nursery/noMissingGenericFamilyKeyword"
8862
8923
  | "lint/nursery/noMisusedPromises"
8863
8924
  | "lint/nursery/noNextAsyncClientComponent"
8925
+ | "lint/nursery/noParametersOnlyUsedInRecursion"
8864
8926
  | "lint/nursery/noReactForwardRef"
8865
8927
  | "lint/nursery/noShadow"
8928
+ | "lint/nursery/noUnknownAttribute"
8866
8929
  | "lint/nursery/noUnnecessaryConditions"
8867
8930
  | "lint/nursery/noUnresolvedImports"
8868
8931
  | "lint/nursery/noUnusedExpressions"
@@ -9621,9 +9684,9 @@ interface DropPatternParams {
9621
9684
  export class DiagnosticPrinter {
9622
9685
  free(): void;
9623
9686
  [Symbol.dispose](): void;
9624
- constructor(file_name: string, file_source: string);
9625
9687
  print_simple(diagnostic: Diagnostic): void;
9626
9688
  print_verbose(diagnostic: Diagnostic): void;
9689
+ constructor(file_name: string, file_source: string);
9627
9690
  finish(): string;
9628
9691
  }
9629
9692
  export class MemoryFileSystem {
@@ -9636,33 +9699,33 @@ export class MemoryFileSystem {
9636
9699
  export class Workspace {
9637
9700
  free(): void;
9638
9701
  [Symbol.dispose](): void;
9639
- constructor();
9640
- static withFileSystem(fs: MemoryFileSystem): Workspace;
9641
- fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
9642
- updateSettings(params: UpdateSettingsParams): UpdateSettingsResult;
9702
+ closeFile(params: CloseFileParams): void;
9703
+ changeFile(params: ChangeFileParams): ChangeFileResult;
9704
+ fileExists(params: FileExitsParams): boolean;
9705
+ formatFile(params: FormatFileParams): any;
9706
+ formatRange(params: FormatRangeParams): any;
9643
9707
  openProject(params: OpenProjectParams): OpenProjectResult;
9708
+ pullActions(params: PullActionsParams): PullActionsResult;
9644
9709
  scanProject(params: ScanProjectParams): ScanProjectResult;
9645
- openFile(params: OpenFileParams): OpenFileResult;
9646
- getFileContent(params: GetFileContentParams): string;
9647
- getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
9648
- getControlFlowGraph(params: GetControlFlowGraphParams): string;
9649
- getFormatterIr(params: GetFormatterIRParams): string;
9710
+ fileFeatures(params: SupportsFeatureParams): FileFeaturesResult;
9650
9711
  getTypeInfo(params: GetTypeInfoParams): string;
9651
- getRegisteredTypes(params: GetRegisteredTypesParams): string;
9652
- getSemanticModel(params: GetSemanticModelParams): string;
9653
- changeFile(params: ChangeFileParams): ChangeFileResult;
9654
- closeFile(params: CloseFileParams): void;
9655
- fileExists(params: FileExitsParams): boolean;
9712
+ formatOnType(params: FormatOnTypeParams): any;
9713
+ getSyntaxTree(params: GetSyntaxTreeParams): GetSyntaxTreeResult;
9656
9714
  isPathIgnored(params: PathIsIgnoredParams): boolean;
9657
- updateModuleGraph(params: UpdateModuleGraphParams): void;
9715
+ updateSettings(params: UpdateSettingsParams): UpdateSettingsResult;
9716
+ getFileContent(params: GetFileContentParams): string;
9717
+ getFormatterIr(params: GetFormatterIRParams): string;
9658
9718
  getModuleGraph(params: GetModuleGraphParams): GetModuleGraphResult;
9659
9719
  pullDiagnostics(params: PullDiagnosticsParams): PullDiagnosticsResult;
9660
- pullActions(params: PullActionsParams): PullActionsResult;
9661
- formatFile(params: FormatFileParams): any;
9662
- formatRange(params: FormatRangeParams): any;
9663
- formatOnType(params: FormatOnTypeParams): any;
9664
- fixFile(params: FixFileParams): FixFileResult;
9720
+ getSemanticModel(params: GetSemanticModelParams): string;
9721
+ static withFileSystem(fs: MemoryFileSystem): Workspace;
9722
+ updateModuleGraph(params: UpdateModuleGraphParams): void;
9723
+ getRegisteredTypes(params: GetRegisteredTypesParams): string;
9724
+ getControlFlowGraph(params: GetControlFlowGraphParams): string;
9725
+ constructor();
9665
9726
  rename(params: RenameParams): RenameResult;
9727
+ fixFile(params: FixFileParams): FixFileResult;
9728
+ openFile(params: OpenFileParams): OpenFileResult;
9666
9729
  }
9667
9730
 
9668
9731
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
@@ -9670,43 +9733,43 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
9670
9733
  export interface InitOutput {
9671
9734
  readonly memory: WebAssembly.Memory;
9672
9735
  readonly __wbg_memoryfilesystem_free: (a: number, b: number) => void;
9673
- readonly memoryfilesystem_new: () => number;
9736
+ readonly __wbg_workspace_free: (a: number, b: number) => void;
9674
9737
  readonly memoryfilesystem_insert: (a: number, b: number, c: number, d: number, e: number) => void;
9738
+ readonly memoryfilesystem_new: () => number;
9675
9739
  readonly memoryfilesystem_remove: (a: number, b: number, c: number) => void;
9676
- readonly __wbg_workspace_free: (a: number, b: number) => void;
9677
- readonly workspace_new: () => number;
9678
- readonly workspace_withFileSystem: (a: number) => number;
9740
+ readonly workspace_changeFile: (a: number, b: any) => [number, number, number];
9741
+ readonly workspace_closeFile: (a: number, b: any) => [number, number];
9742
+ readonly workspace_fileExists: (a: number, b: any) => [number, number, number];
9679
9743
  readonly workspace_fileFeatures: (a: number, b: any) => [number, number, number];
9680
- readonly workspace_updateSettings: (a: number, b: any) => [number, number, number];
9681
- readonly workspace_openProject: (a: number, b: any) => [number, number, number];
9682
- readonly workspace_scanProject: (a: number, b: any) => [number, number, number];
9683
- readonly workspace_openFile: (a: number, b: any) => [number, number, number];
9684
- readonly workspace_getFileContent: (a: number, b: any) => [number, number, number, number];
9685
- readonly workspace_getSyntaxTree: (a: number, b: any) => [number, number, number];
9744
+ readonly workspace_fixFile: (a: number, b: any) => [number, number, number];
9745
+ readonly workspace_formatFile: (a: number, b: any) => [number, number, number];
9746
+ readonly workspace_formatOnType: (a: number, b: any) => [number, number, number];
9747
+ readonly workspace_formatRange: (a: number, b: any) => [number, number, number];
9686
9748
  readonly workspace_getControlFlowGraph: (a: number, b: any) => [number, number, number, number];
9749
+ readonly workspace_getFileContent: (a: number, b: any) => [number, number, number, number];
9687
9750
  readonly workspace_getFormatterIr: (a: number, b: any) => [number, number, number, number];
9688
- readonly workspace_getTypeInfo: (a: number, b: any) => [number, number, number, number];
9751
+ readonly workspace_getModuleGraph: (a: number, b: any) => [number, number, number];
9689
9752
  readonly workspace_getRegisteredTypes: (a: number, b: any) => [number, number, number, number];
9690
9753
  readonly workspace_getSemanticModel: (a: number, b: any) => [number, number, number, number];
9691
- readonly workspace_changeFile: (a: number, b: any) => [number, number, number];
9692
- readonly workspace_closeFile: (a: number, b: any) => [number, number];
9693
- readonly workspace_fileExists: (a: number, b: any) => [number, number, number];
9754
+ readonly workspace_getSyntaxTree: (a: number, b: any) => [number, number, number];
9755
+ readonly workspace_getTypeInfo: (a: number, b: any) => [number, number, number, number];
9694
9756
  readonly workspace_isPathIgnored: (a: number, b: any) => [number, number, number];
9695
- readonly workspace_updateModuleGraph: (a: number, b: any) => [number, number];
9696
- readonly workspace_getModuleGraph: (a: number, b: any) => [number, number, number];
9697
- readonly workspace_pullDiagnostics: (a: number, b: any) => [number, number, number];
9757
+ readonly workspace_new: () => number;
9758
+ readonly workspace_openFile: (a: number, b: any) => [number, number, number];
9759
+ readonly workspace_openProject: (a: number, b: any) => [number, number, number];
9698
9760
  readonly workspace_pullActions: (a: number, b: any) => [number, number, number];
9699
- readonly workspace_formatFile: (a: number, b: any) => [number, number, number];
9700
- readonly workspace_formatRange: (a: number, b: any) => [number, number, number];
9701
- readonly workspace_formatOnType: (a: number, b: any) => [number, number, number];
9702
- readonly workspace_fixFile: (a: number, b: any) => [number, number, number];
9761
+ readonly workspace_pullDiagnostics: (a: number, b: any) => [number, number, number];
9703
9762
  readonly workspace_rename: (a: number, b: any) => [number, number, number];
9763
+ readonly workspace_scanProject: (a: number, b: any) => [number, number, number];
9764
+ readonly workspace_updateModuleGraph: (a: number, b: any) => [number, number];
9765
+ readonly workspace_updateSettings: (a: number, b: any) => [number, number, number];
9766
+ readonly workspace_withFileSystem: (a: number) => number;
9704
9767
  readonly main: () => void;
9705
9768
  readonly __wbg_diagnosticprinter_free: (a: number, b: number) => void;
9769
+ readonly diagnosticprinter_finish: (a: number) => [number, number, number, number];
9706
9770
  readonly diagnosticprinter_new: (a: number, b: number, c: number, d: number) => number;
9707
9771
  readonly diagnosticprinter_print_simple: (a: number, b: any) => [number, number];
9708
9772
  readonly diagnosticprinter_print_verbose: (a: number, b: any) => [number, number];
9709
- readonly diagnosticprinter_finish: (a: number) => [number, number, number, number];
9710
9773
  readonly __wbindgen_malloc: (a: number, b: number) => number;
9711
9774
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
9712
9775
  readonly __wbindgen_exn_store: (a: number) => void;
package/biome_wasm.js CHANGED
@@ -182,10 +182,6 @@ function debugString(val) {
182
182
  return className;
183
183
  }
184
184
 
185
- export function main() {
186
- wasm.main();
187
- }
188
-
189
185
  function passArray8ToWasm0(arg, malloc) {
190
186
  const ptr = malloc(arg.length * 1, 1) >>> 0;
191
187
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -193,10 +189,8 @@ function passArray8ToWasm0(arg, malloc) {
193
189
  return ptr;
194
190
  }
195
191
 
196
- function _assertClass(instance, klass) {
197
- if (!(instance instanceof klass)) {
198
- throw new Error(`expected instance of ${klass.name}`);
199
- }
192
+ export function main() {
193
+ wasm.main();
200
194
  }
201
195
 
202
196
  function takeFromExternrefTable0(idx) {
@@ -205,6 +199,12 @@ function takeFromExternrefTable0(idx) {
205
199
  return value;
206
200
  }
207
201
 
202
+ function _assertClass(instance, klass) {
203
+ if (!(instance instanceof klass)) {
204
+ throw new Error(`expected instance of ${klass.name}`);
205
+ }
206
+ }
207
+
208
208
  const DiagnosticPrinterFinalization = (typeof FinalizationRegistry === 'undefined')
209
209
  ? { register: () => {}, unregister: () => {} }
210
210
  : new FinalizationRegistry(ptr => wasm.__wbg_diagnosticprinter_free(ptr >>> 0, 1));
@@ -222,20 +222,6 @@ export class DiagnosticPrinter {
222
222
  const ptr = this.__destroy_into_raw();
223
223
  wasm.__wbg_diagnosticprinter_free(ptr, 0);
224
224
  }
225
- /**
226
- * @param {string} file_name
227
- * @param {string} file_source
228
- */
229
- constructor(file_name, file_source) {
230
- const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
231
- const len0 = WASM_VECTOR_LEN;
232
- const ptr1 = passStringToWasm0(file_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
233
- const len1 = WASM_VECTOR_LEN;
234
- const ret = wasm.diagnosticprinter_new(ptr0, len0, ptr1, len1);
235
- this.__wbg_ptr = ret >>> 0;
236
- DiagnosticPrinterFinalization.register(this, this.__wbg_ptr, this);
237
- return this;
238
- }
239
225
  /**
240
226
  * @param {Diagnostic} diagnostic
241
227
  */
@@ -254,6 +240,20 @@ export class DiagnosticPrinter {
254
240
  throw takeFromExternrefTable0(ret[0]);
255
241
  }
256
242
  }
243
+ /**
244
+ * @param {string} file_name
245
+ * @param {string} file_source
246
+ */
247
+ constructor(file_name, file_source) {
248
+ const ptr0 = passStringToWasm0(file_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
249
+ const len0 = WASM_VECTOR_LEN;
250
+ const ptr1 = passStringToWasm0(file_source, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
251
+ const len1 = WASM_VECTOR_LEN;
252
+ const ret = wasm.diagnosticprinter_new(ptr0, len0, ptr1, len1);
253
+ this.__wbg_ptr = ret >>> 0;
254
+ DiagnosticPrinterFinalization.register(this, this.__wbg_ptr, this);
255
+ return this;
256
+ }
257
257
  /**
258
258
  * @returns {string}
259
259
  */
@@ -349,38 +349,54 @@ export class Workspace {
349
349
  const ptr = this.__destroy_into_raw();
350
350
  wasm.__wbg_workspace_free(ptr, 0);
351
351
  }
352
- constructor() {
353
- const ret = wasm.workspace_new();
354
- this.__wbg_ptr = ret >>> 0;
355
- WorkspaceFinalization.register(this, this.__wbg_ptr, this);
356
- return this;
352
+ /**
353
+ * @param {CloseFileParams} params
354
+ */
355
+ closeFile(params) {
356
+ const ret = wasm.workspace_closeFile(this.__wbg_ptr, params);
357
+ if (ret[1]) {
358
+ throw takeFromExternrefTable0(ret[0]);
359
+ }
357
360
  }
358
361
  /**
359
- * @param {MemoryFileSystem} fs
360
- * @returns {Workspace}
362
+ * @param {ChangeFileParams} params
363
+ * @returns {ChangeFileResult}
361
364
  */
362
- static withFileSystem(fs) {
363
- _assertClass(fs, MemoryFileSystem);
364
- const ret = wasm.workspace_withFileSystem(fs.__wbg_ptr);
365
- return Workspace.__wrap(ret);
365
+ changeFile(params) {
366
+ const ret = wasm.workspace_changeFile(this.__wbg_ptr, params);
367
+ if (ret[2]) {
368
+ throw takeFromExternrefTable0(ret[1]);
369
+ }
370
+ return takeFromExternrefTable0(ret[0]);
366
371
  }
367
372
  /**
368
- * @param {SupportsFeatureParams} params
369
- * @returns {FileFeaturesResult}
373
+ * @param {FileExitsParams} params
374
+ * @returns {boolean}
370
375
  */
371
- fileFeatures(params) {
372
- const ret = wasm.workspace_fileFeatures(this.__wbg_ptr, params);
376
+ fileExists(params) {
377
+ const ret = wasm.workspace_fileExists(this.__wbg_ptr, params);
378
+ if (ret[2]) {
379
+ throw takeFromExternrefTable0(ret[1]);
380
+ }
381
+ return ret[0] !== 0;
382
+ }
383
+ /**
384
+ * @param {FormatFileParams} params
385
+ * @returns {any}
386
+ */
387
+ formatFile(params) {
388
+ const ret = wasm.workspace_formatFile(this.__wbg_ptr, params);
373
389
  if (ret[2]) {
374
390
  throw takeFromExternrefTable0(ret[1]);
375
391
  }
376
392
  return takeFromExternrefTable0(ret[0]);
377
393
  }
378
394
  /**
379
- * @param {UpdateSettingsParams} params
380
- * @returns {UpdateSettingsResult}
395
+ * @param {FormatRangeParams} params
396
+ * @returns {any}
381
397
  */
382
- updateSettings(params) {
383
- const ret = wasm.workspace_updateSettings(this.__wbg_ptr, params);
398
+ formatRange(params) {
399
+ const ret = wasm.workspace_formatRange(this.__wbg_ptr, params);
384
400
  if (ret[2]) {
385
401
  throw takeFromExternrefTable0(ret[1]);
386
402
  }
@@ -397,6 +413,17 @@ export class Workspace {
397
413
  }
398
414
  return takeFromExternrefTable0(ret[0]);
399
415
  }
416
+ /**
417
+ * @param {PullActionsParams} params
418
+ * @returns {PullActionsResult}
419
+ */
420
+ pullActions(params) {
421
+ const ret = wasm.workspace_pullActions(this.__wbg_ptr, params);
422
+ if (ret[2]) {
423
+ throw takeFromExternrefTable0(ret[1]);
424
+ }
425
+ return takeFromExternrefTable0(ret[0]);
426
+ }
400
427
  /**
401
428
  * @param {ScanProjectParams} params
402
429
  * @returns {ScanProjectResult}
@@ -409,25 +436,25 @@ export class Workspace {
409
436
  return takeFromExternrefTable0(ret[0]);
410
437
  }
411
438
  /**
412
- * @param {OpenFileParams} params
413
- * @returns {OpenFileResult}
439
+ * @param {SupportsFeatureParams} params
440
+ * @returns {FileFeaturesResult}
414
441
  */
415
- openFile(params) {
416
- const ret = wasm.workspace_openFile(this.__wbg_ptr, params);
442
+ fileFeatures(params) {
443
+ const ret = wasm.workspace_fileFeatures(this.__wbg_ptr, params);
417
444
  if (ret[2]) {
418
445
  throw takeFromExternrefTable0(ret[1]);
419
446
  }
420
447
  return takeFromExternrefTable0(ret[0]);
421
448
  }
422
449
  /**
423
- * @param {GetFileContentParams} params
450
+ * @param {GetTypeInfoParams} params
424
451
  * @returns {string}
425
452
  */
426
- getFileContent(params) {
453
+ getTypeInfo(params) {
427
454
  let deferred2_0;
428
455
  let deferred2_1;
429
456
  try {
430
- const ret = wasm.workspace_getFileContent(this.__wbg_ptr, params);
457
+ const ret = wasm.workspace_getTypeInfo(this.__wbg_ptr, params);
431
458
  var ptr1 = ret[0];
432
459
  var len1 = ret[1];
433
460
  if (ret[3]) {
@@ -441,6 +468,17 @@ export class Workspace {
441
468
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
442
469
  }
443
470
  }
471
+ /**
472
+ * @param {FormatOnTypeParams} params
473
+ * @returns {any}
474
+ */
475
+ formatOnType(params) {
476
+ const ret = wasm.workspace_formatOnType(this.__wbg_ptr, params);
477
+ if (ret[2]) {
478
+ throw takeFromExternrefTable0(ret[1]);
479
+ }
480
+ return takeFromExternrefTable0(ret[0]);
481
+ }
444
482
  /**
445
483
  * @param {GetSyntaxTreeParams} params
446
484
  * @returns {GetSyntaxTreeResult}
@@ -453,14 +491,36 @@ export class Workspace {
453
491
  return takeFromExternrefTable0(ret[0]);
454
492
  }
455
493
  /**
456
- * @param {GetControlFlowGraphParams} params
494
+ * @param {PathIsIgnoredParams} params
495
+ * @returns {boolean}
496
+ */
497
+ isPathIgnored(params) {
498
+ const ret = wasm.workspace_isPathIgnored(this.__wbg_ptr, params);
499
+ if (ret[2]) {
500
+ throw takeFromExternrefTable0(ret[1]);
501
+ }
502
+ return ret[0] !== 0;
503
+ }
504
+ /**
505
+ * @param {UpdateSettingsParams} params
506
+ * @returns {UpdateSettingsResult}
507
+ */
508
+ updateSettings(params) {
509
+ const ret = wasm.workspace_updateSettings(this.__wbg_ptr, params);
510
+ if (ret[2]) {
511
+ throw takeFromExternrefTable0(ret[1]);
512
+ }
513
+ return takeFromExternrefTable0(ret[0]);
514
+ }
515
+ /**
516
+ * @param {GetFileContentParams} params
457
517
  * @returns {string}
458
518
  */
459
- getControlFlowGraph(params) {
519
+ getFileContent(params) {
460
520
  let deferred2_0;
461
521
  let deferred2_1;
462
522
  try {
463
- const ret = wasm.workspace_getControlFlowGraph(this.__wbg_ptr, params);
523
+ const ret = wasm.workspace_getFileContent(this.__wbg_ptr, params);
464
524
  var ptr1 = ret[0];
465
525
  var len1 = ret[1];
466
526
  if (ret[3]) {
@@ -497,14 +557,36 @@ export class Workspace {
497
557
  }
498
558
  }
499
559
  /**
500
- * @param {GetTypeInfoParams} params
560
+ * @param {GetModuleGraphParams} params
561
+ * @returns {GetModuleGraphResult}
562
+ */
563
+ getModuleGraph(params) {
564
+ const ret = wasm.workspace_getModuleGraph(this.__wbg_ptr, params);
565
+ if (ret[2]) {
566
+ throw takeFromExternrefTable0(ret[1]);
567
+ }
568
+ return takeFromExternrefTable0(ret[0]);
569
+ }
570
+ /**
571
+ * @param {PullDiagnosticsParams} params
572
+ * @returns {PullDiagnosticsResult}
573
+ */
574
+ pullDiagnostics(params) {
575
+ const ret = wasm.workspace_pullDiagnostics(this.__wbg_ptr, params);
576
+ if (ret[2]) {
577
+ throw takeFromExternrefTable0(ret[1]);
578
+ }
579
+ return takeFromExternrefTable0(ret[0]);
580
+ }
581
+ /**
582
+ * @param {GetSemanticModelParams} params
501
583
  * @returns {string}
502
584
  */
503
- getTypeInfo(params) {
585
+ getSemanticModel(params) {
504
586
  let deferred2_0;
505
587
  let deferred2_1;
506
588
  try {
507
- const ret = wasm.workspace_getTypeInfo(this.__wbg_ptr, params);
589
+ const ret = wasm.workspace_getSemanticModel(this.__wbg_ptr, params);
508
590
  var ptr1 = ret[0];
509
591
  var len1 = ret[1];
510
592
  if (ret[3]) {
@@ -518,6 +600,24 @@ export class Workspace {
518
600
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
519
601
  }
520
602
  }
603
+ /**
604
+ * @param {MemoryFileSystem} fs
605
+ * @returns {Workspace}
606
+ */
607
+ static withFileSystem(fs) {
608
+ _assertClass(fs, MemoryFileSystem);
609
+ const ret = wasm.workspace_withFileSystem(fs.__wbg_ptr);
610
+ return Workspace.__wrap(ret);
611
+ }
612
+ /**
613
+ * @param {UpdateModuleGraphParams} params
614
+ */
615
+ updateModuleGraph(params) {
616
+ const ret = wasm.workspace_updateModuleGraph(this.__wbg_ptr, params);
617
+ if (ret[1]) {
618
+ throw takeFromExternrefTable0(ret[0]);
619
+ }
620
+ }
521
621
  /**
522
622
  * @param {GetRegisteredTypesParams} params
523
623
  * @returns {string}
@@ -541,14 +641,14 @@ export class Workspace {
541
641
  }
542
642
  }
543
643
  /**
544
- * @param {GetSemanticModelParams} params
644
+ * @param {GetControlFlowGraphParams} params
545
645
  * @returns {string}
546
646
  */
547
- getSemanticModel(params) {
647
+ getControlFlowGraph(params) {
548
648
  let deferred2_0;
549
649
  let deferred2_1;
550
650
  try {
551
- const ret = wasm.workspace_getSemanticModel(this.__wbg_ptr, params);
651
+ const ret = wasm.workspace_getControlFlowGraph(this.__wbg_ptr, params);
552
652
  var ptr1 = ret[0];
553
653
  var len1 = ret[1];
554
654
  if (ret[3]) {
@@ -562,118 +662,18 @@ export class Workspace {
562
662
  wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
563
663
  }
564
664
  }
565
- /**
566
- * @param {ChangeFileParams} params
567
- * @returns {ChangeFileResult}
568
- */
569
- changeFile(params) {
570
- const ret = wasm.workspace_changeFile(this.__wbg_ptr, params);
571
- if (ret[2]) {
572
- throw takeFromExternrefTable0(ret[1]);
573
- }
574
- return takeFromExternrefTable0(ret[0]);
575
- }
576
- /**
577
- * @param {CloseFileParams} params
578
- */
579
- closeFile(params) {
580
- const ret = wasm.workspace_closeFile(this.__wbg_ptr, params);
581
- if (ret[1]) {
582
- throw takeFromExternrefTable0(ret[0]);
583
- }
584
- }
585
- /**
586
- * @param {FileExitsParams} params
587
- * @returns {boolean}
588
- */
589
- fileExists(params) {
590
- const ret = wasm.workspace_fileExists(this.__wbg_ptr, params);
591
- if (ret[2]) {
592
- throw takeFromExternrefTable0(ret[1]);
593
- }
594
- return ret[0] !== 0;
595
- }
596
- /**
597
- * @param {PathIsIgnoredParams} params
598
- * @returns {boolean}
599
- */
600
- isPathIgnored(params) {
601
- const ret = wasm.workspace_isPathIgnored(this.__wbg_ptr, params);
602
- if (ret[2]) {
603
- throw takeFromExternrefTable0(ret[1]);
604
- }
605
- return ret[0] !== 0;
606
- }
607
- /**
608
- * @param {UpdateModuleGraphParams} params
609
- */
610
- updateModuleGraph(params) {
611
- const ret = wasm.workspace_updateModuleGraph(this.__wbg_ptr, params);
612
- if (ret[1]) {
613
- throw takeFromExternrefTable0(ret[0]);
614
- }
615
- }
616
- /**
617
- * @param {GetModuleGraphParams} params
618
- * @returns {GetModuleGraphResult}
619
- */
620
- getModuleGraph(params) {
621
- const ret = wasm.workspace_getModuleGraph(this.__wbg_ptr, params);
622
- if (ret[2]) {
623
- throw takeFromExternrefTable0(ret[1]);
624
- }
625
- return takeFromExternrefTable0(ret[0]);
626
- }
627
- /**
628
- * @param {PullDiagnosticsParams} params
629
- * @returns {PullDiagnosticsResult}
630
- */
631
- pullDiagnostics(params) {
632
- const ret = wasm.workspace_pullDiagnostics(this.__wbg_ptr, params);
633
- if (ret[2]) {
634
- throw takeFromExternrefTable0(ret[1]);
635
- }
636
- return takeFromExternrefTable0(ret[0]);
637
- }
638
- /**
639
- * @param {PullActionsParams} params
640
- * @returns {PullActionsResult}
641
- */
642
- pullActions(params) {
643
- const ret = wasm.workspace_pullActions(this.__wbg_ptr, params);
644
- if (ret[2]) {
645
- throw takeFromExternrefTable0(ret[1]);
646
- }
647
- return takeFromExternrefTable0(ret[0]);
648
- }
649
- /**
650
- * @param {FormatFileParams} params
651
- * @returns {any}
652
- */
653
- formatFile(params) {
654
- const ret = wasm.workspace_formatFile(this.__wbg_ptr, params);
655
- if (ret[2]) {
656
- throw takeFromExternrefTable0(ret[1]);
657
- }
658
- return takeFromExternrefTable0(ret[0]);
659
- }
660
- /**
661
- * @param {FormatRangeParams} params
662
- * @returns {any}
663
- */
664
- formatRange(params) {
665
- const ret = wasm.workspace_formatRange(this.__wbg_ptr, params);
666
- if (ret[2]) {
667
- throw takeFromExternrefTable0(ret[1]);
668
- }
669
- return takeFromExternrefTable0(ret[0]);
665
+ constructor() {
666
+ const ret = wasm.workspace_new();
667
+ this.__wbg_ptr = ret >>> 0;
668
+ WorkspaceFinalization.register(this, this.__wbg_ptr, this);
669
+ return this;
670
670
  }
671
671
  /**
672
- * @param {FormatOnTypeParams} params
673
- * @returns {any}
672
+ * @param {RenameParams} params
673
+ * @returns {RenameResult}
674
674
  */
675
- formatOnType(params) {
676
- const ret = wasm.workspace_formatOnType(this.__wbg_ptr, params);
675
+ rename(params) {
676
+ const ret = wasm.workspace_rename(this.__wbg_ptr, params);
677
677
  if (ret[2]) {
678
678
  throw takeFromExternrefTable0(ret[1]);
679
679
  }
@@ -691,11 +691,11 @@ export class Workspace {
691
691
  return takeFromExternrefTable0(ret[0]);
692
692
  }
693
693
  /**
694
- * @param {RenameParams} params
695
- * @returns {RenameResult}
694
+ * @param {OpenFileParams} params
695
+ * @returns {OpenFileResult}
696
696
  */
697
- rename(params) {
698
- const ret = wasm.workspace_rename(this.__wbg_ptr, params);
697
+ openFile(params) {
698
+ const ret = wasm.workspace_openFile(this.__wbg_ptr, params);
699
699
  if (ret[2]) {
700
700
  throw takeFromExternrefTable0(ret[1]);
701
701
  }
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Biome Developers and Contributors"
6
6
  ],
7
7
  "description": "WebAssembly bindings to the Biome workspace API",
8
- "version": "2.3.2",
8
+ "version": "2.3.4",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",