@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 +10 -2
- package/oxc_fmt_bg.js +1 -1
- package/oxc_fmt_bg.wasm +0 -0
- package/package.json +1 -1
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
|
-
|
|
24
|
+
type Filename = `index.${Mod}${Lang}s${X}` | `index.d.${Mod}ts${X}` | (string & {});
|
|
25
25
|
|
|
26
|
-
|
|
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 {
|
|
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