@o3co/ts.hocon 1.0.0 → 1.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.
@@ -1,6 +1,7 @@
1
1
  type DurationUnit = 'ns' | 'us' | 'ms' | 's' | 'm' | 'h' | 'd';
2
2
  type ByteUnit = 'B' | 'KB' | 'KiB' | 'MB' | 'MiB' | 'GB' | 'GiB' | 'TB' | 'TiB';
3
3
 
4
+ type ScalarValueType = 'string' | 'number' | 'boolean' | 'null';
4
5
  type HoconValue = {
5
6
  kind: 'object';
6
7
  fields: Map<string, HoconValue>;
@@ -9,7 +10,8 @@ type HoconValue = {
9
10
  items: HoconValue[];
10
11
  } | {
11
12
  kind: 'scalar';
12
- value: string | number | boolean | null;
13
+ raw: string;
14
+ valueType: ScalarValueType;
13
15
  };
14
16
 
15
17
  declare class Config {
@@ -48,4 +50,4 @@ declare function parseAsync(input: string, opts?: ParseOptions): Promise<Config>
48
50
  declare function parseFile(filePath: string, opts?: ParseOptions): Config;
49
51
  declare function parseFileAsync(filePath: string, opts?: ParseOptions): Promise<Config>;
50
52
 
51
- export { type ByteUnit as B, Config as C, type DurationUnit as D, type HoconValue as H, type ParseOptions as P, parseAsync as a, parseFile as b, parseFileAsync as c, parse as p };
53
+ export { type ByteUnit as B, Config as C, type DurationUnit as D, type HoconValue as H, type ParseOptions as P, type ScalarValueType as S, parseAsync as a, parseFile as b, parseFileAsync as c, parse as p };
@@ -1,6 +1,7 @@
1
1
  type DurationUnit = 'ns' | 'us' | 'ms' | 's' | 'm' | 'h' | 'd';
2
2
  type ByteUnit = 'B' | 'KB' | 'KiB' | 'MB' | 'MiB' | 'GB' | 'GiB' | 'TB' | 'TiB';
3
3
 
4
+ type ScalarValueType = 'string' | 'number' | 'boolean' | 'null';
4
5
  type HoconValue = {
5
6
  kind: 'object';
6
7
  fields: Map<string, HoconValue>;
@@ -9,7 +10,8 @@ type HoconValue = {
9
10
  items: HoconValue[];
10
11
  } | {
11
12
  kind: 'scalar';
12
- value: string | number | boolean | null;
13
+ raw: string;
14
+ valueType: ScalarValueType;
13
15
  };
14
16
 
15
17
  declare class Config {
@@ -48,4 +50,4 @@ declare function parseAsync(input: string, opts?: ParseOptions): Promise<Config>
48
50
  declare function parseFile(filePath: string, opts?: ParseOptions): Config;
49
51
  declare function parseFileAsync(filePath: string, opts?: ParseOptions): Promise<Config>;
50
52
 
51
- export { type ByteUnit as B, Config as C, type DurationUnit as D, type HoconValue as H, type ParseOptions as P, parseAsync as a, parseFile as b, parseFileAsync as c, parse as p };
53
+ export { type ByteUnit as B, Config as C, type DurationUnit as D, type HoconValue as H, type ParseOptions as P, type ScalarValueType as S, parseAsync as a, parseFile as b, parseFileAsync as c, parse as p };