@wasm-fmt/clang-format 18.1.1 → 18.1.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/clang-format.d.ts +15 -4
- package/clang-format.wasm +0 -0
- package/package.json +1 -1
package/clang-format.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export default function init(input?: InitInput): Promise<void>;
|
|
|
18
18
|
* - `Microsoft` - A style complying with Microsoft’s style guide.
|
|
19
19
|
* - `GNU` - A style complying with the GNU coding standards.
|
|
20
20
|
* - A string starting with `{`, for example: `{BasedOnStyle: Chromium, IndentWidth: 4, ...}`.
|
|
21
|
-
* - A string
|
|
21
|
+
* - A string which represents `.clang-format` content.
|
|
22
22
|
*
|
|
23
23
|
*/
|
|
24
24
|
export type Style =
|
|
@@ -65,9 +65,10 @@ export type Filename =
|
|
|
65
65
|
* - `Microsoft` - A style complying with Microsoft’s style guide.
|
|
66
66
|
* - `GNU` - A style complying with the GNU coding standards.
|
|
67
67
|
* - A string starting with `{`, for example: `{BasedOnStyle: Chromium, IndentWidth: 4, ...}`.
|
|
68
|
-
* - A string
|
|
68
|
+
* - A string which represents `.clang-format` content.
|
|
69
69
|
*
|
|
70
70
|
* @returns {string} The formatted content.
|
|
71
|
+
* @throws {Error}
|
|
71
72
|
*
|
|
72
73
|
* @see {@link https://clang.llvm.org/docs/ClangFormatStyleOptions.html}
|
|
73
74
|
*/
|
|
@@ -77,7 +78,15 @@ export declare function format(
|
|
|
77
78
|
style?: Style,
|
|
78
79
|
): string;
|
|
79
80
|
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Both the startLine and endLine are 1-based.
|
|
84
|
+
*/
|
|
80
85
|
export type LineRange = [startLine: number, endLine: number];
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Both the offset and length are measured in bytes.
|
|
89
|
+
*/
|
|
81
90
|
export type ByteRange = [offset: number, length: number];
|
|
82
91
|
|
|
83
92
|
/**
|
|
@@ -99,9 +108,10 @@ export type ByteRange = [offset: number, length: number];
|
|
|
99
108
|
* - `Microsoft` - A style complying with Microsoft’s style guide.
|
|
100
109
|
* - `GNU` - A style complying with the GNU coding standards.
|
|
101
110
|
* - A string starting with `{`, for example: `{BasedOnStyle: Chromium, IndentWidth: 4, ...}`.
|
|
102
|
-
* - A string
|
|
111
|
+
* - A string which represents `.clang-format` content.
|
|
103
112
|
*
|
|
104
113
|
* @returns {string} The formatted content.
|
|
114
|
+
* @throws {Error}
|
|
105
115
|
*
|
|
106
116
|
* @see {@link https://clang.llvm.org/docs/ClangFormatStyleOptions.html}
|
|
107
117
|
*/
|
|
@@ -128,9 +138,10 @@ export declare function formatLineRange(
|
|
|
128
138
|
* - `Microsoft` - A style complying with Microsoft’s style guide.
|
|
129
139
|
* - `GNU` - A style complying with the GNU coding standards.
|
|
130
140
|
* - A string starting with `{`, for example: `{BasedOnStyle: Chromium, IndentWidth: 4, ...}`.
|
|
131
|
-
* - A string
|
|
141
|
+
* - A string which represents `.clang-format` content.
|
|
132
142
|
*
|
|
133
143
|
* @returns {string} The formatted content.
|
|
144
|
+
* @throws {Error}
|
|
134
145
|
*
|
|
135
146
|
* @see {@link https://clang.llvm.org/docs/ClangFormatStyleOptions.html}
|
|
136
147
|
*/
|
package/clang-format.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED