@wasm-fmt/oxc_fmt 0.2.0 → 0.2.2

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/oxc_fmt.d.ts CHANGED
@@ -21,6 +21,14 @@ type Mod = "" | "m" | "c";
21
21
  type Lang = "j" | "t";
22
22
  type X = "" | "x";
23
23
 
24
- export type Filename = `index.${Mod}${Lang}s${X}` | `index.d.${Mod}ts${X}` | (string & {});
24
+ type Filename = `index.${Mod}${Lang}s${X}` | `index.d.${Mod}ts${X}` | (string & {});
25
25
 
26
- export function format(code: string, filename: Filename, config?: Config): string;
26
+
27
+
28
+ /**
29
+ * Formats the given JavaScript/TypeScript code with the provided Configuration.
30
+ * @param code - The JavaScript/TypeScript code to format
31
+ * @param filename - The filename to determine the source type (e.g., .js, .ts, .jsx, .tsx)
32
+ * @param config - Optional formatter config
33
+ */
34
+ export function format(code: string, filename: Filename, config?: Config | null): string;
package/oxc_fmt_bg.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Formats the given JavaScript/TypeScript code with the provided Configuration.
3
3
  * @param {string} code - The JavaScript/TypeScript code to format
4
- * @param {string} filename - The filename to determine the source type (e.g., .js, .ts, .jsx, .tsx)
4
+ * @param {Filename} filename - The filename to determine the source type (e.g., .js, .ts, .jsx, .tsx)
5
5
  * @param {Config | null} [config] - Optional formatter config
6
6
  * @returns {string}
7
7
  */
package/oxc_fmt_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "magic-akari <akari.ccino@gmail.com>"
6
6
  ],
7
7
  "description": "JavaScript/TypeScript formatter powered by WASM ported from OXC (experimental)",
8
- "version": "0.2.0",
8
+ "version": "0.2.2",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",