@wasm-fmt/clang-format 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/clang-format.d.ts CHANGED
@@ -21,10 +21,25 @@ export type Filename =
21
21
  | (string & {});
22
22
 
23
23
  /**
24
- * @param content The content to format
25
- * @param filename The filename to use for determining the language
26
- * @param style The style to use for formatting
27
- * @see https://clang.llvm.org/docs/ClangFormatStyleOptions.html
24
+ * Formats the given content using the specified style.
25
+ *
26
+ * @param {string} content - The content to format.
27
+ * @param {Filename} filename - The filename to use for determining the language.
28
+ * @param {Style} style - The style to use for formatting.
29
+ * Supported style values are:
30
+ * - `LLVM` - A style complying with the LLVM coding standards.
31
+ * - `Google` - A style complying with Google’s C++ style guide.
32
+ * - `Chromium` - A style complying with Chromium’s style guide.
33
+ * - `Mozilla` - A style complying with Mozilla’s style guide.
34
+ * - `WebKit` - A style complying with WebKit’s style guide.
35
+ * - `Microsoft` - A style complying with Microsoft’s style guide.
36
+ * - `GNU` - A style complying with the GNU coding standards.
37
+ * - A string starting with `{`, for example: `{BasedOnStyle: Chromium, IndentWidth: 4, ...}`.
38
+ * - A string starting with `---`, which represents `.clang-format` content.
39
+ *
40
+ * @returns {string} The formatted content.
41
+ *
42
+ * @see {@link https://clang.llvm.org/docs/ClangFormatStyleOptions.html}
28
43
  */
29
44
  export declare function format(content: string, filename?: Filename, style?: Style): string;
30
45
 
package/clang-format.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wasm-fmt/clang-format",
3
3
  "author": "magic-akari <akari.ccino@gamil.com>",
4
- "version": "0.1.2",
4
+ "version": "0.2.0",
5
5
  "description": "A wasm based clang-format",
6
6
  "main": "clang-format.js",
7
7
  "types": "clang-format.d.ts",