@o3co/ts.hocon 1.9.0 → 1.10.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.
@@ -0,0 +1,25 @@
1
+ import { C as Config } from '../config-PdhVgeLS.cjs';
2
+
3
+ /**
4
+ * Read JSON with comments and trailing commas — the dialect VS Code and
5
+ * TypeScript use for their config files — as HOCON config.
6
+ *
7
+ * Plain JSON needs no adapter at all: HOCON is a JSON superset, so `parse`
8
+ * already accepts a .json file. This exists for the two things HOCON does not
9
+ * accept, block comments and trailing commas. (HOCON has `//` and `#` comments
10
+ * of its own.)
11
+ *
12
+ * Comments and trailing commas are removed and `JSON.parse` does the rest, so
13
+ * the accepted grammar is otherwise exactly the platform's JSON.
14
+ *
15
+ * See docs/specs/format-ingestion-mapping.md items F3.x in the hocon scope.
16
+ */
17
+ declare function parseJsonc(input: string, originDescription?: string): Config;
18
+ /**
19
+ * Remove `//` line comments and block comments, leaving string literals alone.
20
+ * Newlines inside removed spans are kept so JSON.parse still reports useful
21
+ * positions.
22
+ */
23
+ declare function stripComments(src: string): string;
24
+
25
+ export { parseJsonc, stripComments };
@@ -0,0 +1,25 @@
1
+ import { C as Config } from '../config-PdhVgeLS.js';
2
+
3
+ /**
4
+ * Read JSON with comments and trailing commas — the dialect VS Code and
5
+ * TypeScript use for their config files — as HOCON config.
6
+ *
7
+ * Plain JSON needs no adapter at all: HOCON is a JSON superset, so `parse`
8
+ * already accepts a .json file. This exists for the two things HOCON does not
9
+ * accept, block comments and trailing commas. (HOCON has `//` and `#` comments
10
+ * of its own.)
11
+ *
12
+ * Comments and trailing commas are removed and `JSON.parse` does the rest, so
13
+ * the accepted grammar is otherwise exactly the platform's JSON.
14
+ *
15
+ * See docs/specs/format-ingestion-mapping.md items F3.x in the hocon scope.
16
+ */
17
+ declare function parseJsonc(input: string, originDescription?: string): Config;
18
+ /**
19
+ * Remove `//` line comments and block comments, leaving string literals alone.
20
+ * Newlines inside removed spans are kept so JSON.parse still reports useful
21
+ * positions.
22
+ */
23
+ declare function stripComments(src: string): string;
24
+
25
+ export { parseJsonc, stripComments };