@svta/cml-structured-field-values 1.1.6 → 1.1.7
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/dist/index.d.ts +223 -223
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -66
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
1
|
//#region src/SfDecodeOptions.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* Options for decoding Structured Field values
|
|
4
|
-
*
|
|
5
|
-
* @public
|
|
6
|
-
*/
|
|
3
|
+
* Options for decoding Structured Field values
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
7
|
type SfDecodeOptions = {
|
|
8
8
|
/**
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
* Use JS Symbol to represent token values
|
|
10
|
+
*/
|
|
11
11
|
useSymbol?: boolean;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
14
|
//#region src/SfToken.d.ts
|
|
15
15
|
/**
|
|
16
|
-
* A class to represent structured field tokens when `Symbol` is not available.
|
|
17
|
-
*
|
|
18
|
-
* @public
|
|
19
|
-
*/
|
|
20
|
-
declare class SfToken {
|
|
16
|
+
* A class to represent structured field tokens when `Symbol` is not available.
|
|
17
|
+
*
|
|
18
|
+
* @public
|
|
19
|
+
*/
|
|
20
|
+
export declare class SfToken {
|
|
21
21
|
description: string;
|
|
22
22
|
constructor(description: string);
|
|
23
23
|
}
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/SfBareItem.d.ts
|
|
26
26
|
/**
|
|
27
|
-
* A type to represent structured field bare items.
|
|
28
|
-
*
|
|
29
|
-
* @public
|
|
30
|
-
*/
|
|
27
|
+
* A type to represent structured field bare items.
|
|
28
|
+
*
|
|
29
|
+
* @public
|
|
30
|
+
*/
|
|
31
31
|
type SfBareItem = string | Uint8Array | boolean | number | symbol | Date | SfToken;
|
|
32
32
|
//#endregion
|
|
33
33
|
//#region src/SfItem.d.ts
|
|
34
34
|
/**
|
|
35
|
-
* Structured Field Item
|
|
36
|
-
*
|
|
37
|
-
* @public
|
|
38
|
-
*/
|
|
39
|
-
declare class SfItem<V extends SfBareItem = SfBareItem, P = Record<string, any>> {
|
|
35
|
+
* Structured Field Item
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export declare class SfItem<V extends SfBareItem = SfBareItem, P = Record<string, any>> {
|
|
40
40
|
/**
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
* The value of the item.
|
|
42
|
+
*/
|
|
43
43
|
value: V;
|
|
44
44
|
/**
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
* The parameters of the item.
|
|
46
|
+
*/
|
|
47
47
|
params?: P;
|
|
48
48
|
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
* Creates a new structured field item.
|
|
50
|
+
*
|
|
51
|
+
* @param value - The value of the item.
|
|
52
|
+
* @param params - The parameters of the item.
|
|
53
|
+
*/
|
|
54
54
|
constructor(value: any, params?: P);
|
|
55
55
|
}
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/SfParameters.d.ts
|
|
58
58
|
/**
|
|
59
|
-
* Structured Field Parameters
|
|
60
|
-
*
|
|
61
|
-
* @public
|
|
62
|
-
*/
|
|
59
|
+
* Structured Field Parameters
|
|
60
|
+
*
|
|
61
|
+
* @public
|
|
62
|
+
*/
|
|
63
63
|
type SfParameters = Record<string, any>;
|
|
64
64
|
//#endregion
|
|
65
65
|
//#region src/SfInnerList.d.ts
|
|
66
66
|
/**
|
|
67
|
-
* Structured Field Inner List
|
|
68
|
-
*
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
67
|
+
* Structured Field Inner List
|
|
68
|
+
*
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
71
|
type SfInnerList = {
|
|
72
72
|
value: SfItem[] | SfBareItem[];
|
|
73
73
|
params: SfParameters;
|
|
@@ -75,134 +75,134 @@ type SfInnerList = {
|
|
|
75
75
|
//#endregion
|
|
76
76
|
//#region src/SfMember.d.ts
|
|
77
77
|
/**
|
|
78
|
-
* A member of a structured field.
|
|
79
|
-
*
|
|
80
|
-
* @public
|
|
81
|
-
*/
|
|
78
|
+
* A member of a structured field.
|
|
79
|
+
*
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
82
|
type SfMember = SfItem | SfInnerList | SfBareItem;
|
|
83
83
|
//#endregion
|
|
84
84
|
//#region src/SfDictionary.d.ts
|
|
85
85
|
/**
|
|
86
|
-
* A dictionary of structured field members.
|
|
87
|
-
*
|
|
88
|
-
* @public
|
|
89
|
-
*/
|
|
86
|
+
* A dictionary of structured field members.
|
|
87
|
+
*
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
90
|
type SfDictionary = Record<string, SfMember> | Map<string, SfMember>;
|
|
91
91
|
//#endregion
|
|
92
92
|
//#region src/decodeSfDict.d.ts
|
|
93
93
|
/**
|
|
94
|
-
* Decode a structured field string into a structured field dictionary
|
|
95
|
-
*
|
|
96
|
-
* @param input - The structured field string to decode
|
|
97
|
-
* @returns The structured field dictionary
|
|
98
|
-
*
|
|
99
|
-
* @public
|
|
100
|
-
*/
|
|
101
|
-
declare function decodeSfDict(input: string, options?: SfDecodeOptions): SfDictionary;
|
|
94
|
+
* Decode a structured field string into a structured field dictionary
|
|
95
|
+
*
|
|
96
|
+
* @param input - The structured field string to decode
|
|
97
|
+
* @returns The structured field dictionary
|
|
98
|
+
*
|
|
99
|
+
* @public
|
|
100
|
+
*/
|
|
101
|
+
export declare function decodeSfDict(input: string, options?: SfDecodeOptions): SfDictionary;
|
|
102
102
|
//#endregion
|
|
103
103
|
//#region src/decodeSfItem.d.ts
|
|
104
104
|
/**
|
|
105
|
-
* Decode a structured field string into a structured field item
|
|
106
|
-
*
|
|
107
|
-
* @param input - The structured field string to decode
|
|
108
|
-
* @returns The structured field item
|
|
109
|
-
*
|
|
110
|
-
* @public
|
|
111
|
-
*/
|
|
112
|
-
declare function decodeSfItem(input: string, options?: SfDecodeOptions): SfItem;
|
|
105
|
+
* Decode a structured field string into a structured field item
|
|
106
|
+
*
|
|
107
|
+
* @param input - The structured field string to decode
|
|
108
|
+
* @returns The structured field item
|
|
109
|
+
*
|
|
110
|
+
* @public
|
|
111
|
+
*/
|
|
112
|
+
export declare function decodeSfItem(input: string, options?: SfDecodeOptions): SfItem;
|
|
113
113
|
//#endregion
|
|
114
114
|
//#region src/decodeSfList.d.ts
|
|
115
115
|
/**
|
|
116
|
-
* Decode a structured field string into a structured field list
|
|
117
|
-
*
|
|
118
|
-
* @param input - The structured field string to decode
|
|
119
|
-
* @returns The structured field list
|
|
120
|
-
*
|
|
121
|
-
* @public
|
|
122
|
-
*/
|
|
123
|
-
declare function decodeSfList(input: string, options?: SfDecodeOptions): SfMember[];
|
|
116
|
+
* Decode a structured field string into a structured field list
|
|
117
|
+
*
|
|
118
|
+
* @param input - The structured field string to decode
|
|
119
|
+
* @returns The structured field list
|
|
120
|
+
*
|
|
121
|
+
* @public
|
|
122
|
+
*/
|
|
123
|
+
export declare function decodeSfList(input: string, options?: SfDecodeOptions): SfMember[];
|
|
124
124
|
//#endregion
|
|
125
125
|
//#region src/SfEncodeOptions.d.ts
|
|
126
126
|
/**
|
|
127
|
-
* Options for encoding a structured field.
|
|
128
|
-
*
|
|
129
|
-
* @public
|
|
130
|
-
*/
|
|
127
|
+
* Options for encoding a structured field.
|
|
128
|
+
*
|
|
129
|
+
* @public
|
|
130
|
+
*/
|
|
131
131
|
type SfEncodeOptions = {
|
|
132
132
|
/**
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
133
|
+
* Include the single space that RFC 8941 serialization emits after each
|
|
134
|
+
* comma separating dictionary or list members.
|
|
135
|
+
*
|
|
136
|
+
* @defaultValue `true`
|
|
137
|
+
*/
|
|
138
138
|
whitespace?: boolean;
|
|
139
139
|
};
|
|
140
140
|
//#endregion
|
|
141
141
|
//#region src/encodeSfDict.d.ts
|
|
142
142
|
/**
|
|
143
|
-
* Encode a structured field dictionary to a string
|
|
144
|
-
*
|
|
145
|
-
* @param value - The structured field dictionary to encode
|
|
146
|
-
* @param options - Encoding options
|
|
147
|
-
*
|
|
148
|
-
* @returns The structured field string
|
|
149
|
-
*
|
|
150
|
-
* @public
|
|
151
|
-
*/
|
|
152
|
-
declare function encodeSfDict(value: Record<string, any> | Map<string, any>, options?: SfEncodeOptions): string;
|
|
143
|
+
* Encode a structured field dictionary to a string
|
|
144
|
+
*
|
|
145
|
+
* @param value - The structured field dictionary to encode
|
|
146
|
+
* @param options - Encoding options
|
|
147
|
+
*
|
|
148
|
+
* @returns The structured field string
|
|
149
|
+
*
|
|
150
|
+
* @public
|
|
151
|
+
*/
|
|
152
|
+
export declare function encodeSfDict(value: Record<string, any> | Map<string, any>, options?: SfEncodeOptions): string;
|
|
153
153
|
//#endregion
|
|
154
154
|
//#region src/encodeSfItem.d.ts
|
|
155
155
|
/**
|
|
156
|
-
* Encode a structured field item to a string
|
|
157
|
-
*
|
|
158
|
-
* @param value - The structured field item to encode
|
|
159
|
-
*
|
|
160
|
-
* @returns The structured field string
|
|
161
|
-
*
|
|
162
|
-
* @public
|
|
163
|
-
*/
|
|
164
|
-
declare function encodeSfItem(value: SfItem): string;
|
|
165
|
-
/**
|
|
166
|
-
* Encode a structured field value to a string with optional parameters.
|
|
167
|
-
*
|
|
168
|
-
* @param value - The structured field value to encode
|
|
169
|
-
* @param params - The structured field parameters
|
|
170
|
-
*
|
|
171
|
-
* @returns The structured field string
|
|
172
|
-
*
|
|
173
|
-
* @public
|
|
174
|
-
*/
|
|
175
|
-
declare function encodeSfItem(value: SfBareItem, params?: SfParameters): string;
|
|
156
|
+
* Encode a structured field item to a string
|
|
157
|
+
*
|
|
158
|
+
* @param value - The structured field item to encode
|
|
159
|
+
*
|
|
160
|
+
* @returns The structured field string
|
|
161
|
+
*
|
|
162
|
+
* @public
|
|
163
|
+
*/
|
|
164
|
+
export declare function encodeSfItem(value: SfItem): string;
|
|
165
|
+
/**
|
|
166
|
+
* Encode a structured field value to a string with optional parameters.
|
|
167
|
+
*
|
|
168
|
+
* @param value - The structured field value to encode
|
|
169
|
+
* @param params - The structured field parameters
|
|
170
|
+
*
|
|
171
|
+
* @returns The structured field string
|
|
172
|
+
*
|
|
173
|
+
* @public
|
|
174
|
+
*/
|
|
175
|
+
export declare function encodeSfItem(value: SfBareItem, params?: SfParameters): string;
|
|
176
176
|
//#endregion
|
|
177
177
|
//#region src/encodeSfList.d.ts
|
|
178
178
|
/**
|
|
179
|
-
* Encode a structured field list to a string
|
|
180
|
-
*
|
|
181
|
-
* @param value - The structured field list to encode
|
|
182
|
-
* @param options - Encoding options
|
|
183
|
-
*
|
|
184
|
-
* @returns The structured field string
|
|
185
|
-
*
|
|
186
|
-
* @public
|
|
187
|
-
*/
|
|
188
|
-
declare function encodeSfList(value: SfMember[], options?: SfEncodeOptions): string;
|
|
179
|
+
* Encode a structured field list to a string
|
|
180
|
+
*
|
|
181
|
+
* @param value - The structured field list to encode
|
|
182
|
+
* @param options - Encoding options
|
|
183
|
+
*
|
|
184
|
+
* @returns The structured field string
|
|
185
|
+
*
|
|
186
|
+
* @public
|
|
187
|
+
*/
|
|
188
|
+
export declare function encodeSfList(value: SfMember[], options?: SfEncodeOptions): string;
|
|
189
189
|
//#endregion
|
|
190
190
|
//#region src/utils/symbolToStr.d.ts
|
|
191
191
|
/**
|
|
192
|
-
* Converts a symbol to a string.
|
|
193
|
-
*
|
|
194
|
-
* @param symbol - The symbol to convert.
|
|
195
|
-
*
|
|
196
|
-
* @returns The string representation of the symbol.
|
|
197
|
-
*
|
|
198
|
-
* @public
|
|
199
|
-
*/
|
|
200
|
-
declare function symbolToStr(symbol: symbol | SfToken): string;
|
|
192
|
+
* Converts a symbol to a string.
|
|
193
|
+
*
|
|
194
|
+
* @param symbol - The symbol to convert.
|
|
195
|
+
*
|
|
196
|
+
* @returns The string representation of the symbol.
|
|
197
|
+
*
|
|
198
|
+
* @public
|
|
199
|
+
*/
|
|
200
|
+
export declare function symbolToStr(symbol: symbol | SfToken): string;
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region src/parse/ParsedValue.d.ts
|
|
203
203
|
/**
|
|
204
|
-
* @internal
|
|
205
|
-
*/
|
|
204
|
+
* @internal
|
|
205
|
+
*/
|
|
206
206
|
type ParsedValue<T> = {
|
|
207
207
|
value: T;
|
|
208
208
|
src: string;
|
|
@@ -210,187 +210,187 @@ type ParsedValue<T> = {
|
|
|
210
210
|
//#endregion
|
|
211
211
|
//#region src/parse/parseBareItem.d.ts
|
|
212
212
|
/**
|
|
213
|
-
* @internal
|
|
214
|
-
*/
|
|
215
|
-
declare function parseBareItem(src: string, options?: SfDecodeOptions): ParsedValue<SfBareItem>;
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
215
|
+
export declare function parseBareItem(src: string, options?: SfDecodeOptions): ParsedValue<SfBareItem>;
|
|
216
216
|
//#endregion
|
|
217
217
|
//#region src/parse/parseBoolean.d.ts
|
|
218
218
|
/**
|
|
219
|
-
* @internal
|
|
220
|
-
*/
|
|
221
|
-
declare function parseBoolean(src: string): ParsedValue<boolean>;
|
|
219
|
+
* @internal
|
|
220
|
+
*/
|
|
221
|
+
export declare function parseBoolean(src: string): ParsedValue<boolean>;
|
|
222
222
|
//#endregion
|
|
223
223
|
//#region src/parse/parseByteSequence.d.ts
|
|
224
224
|
/**
|
|
225
|
-
* @internal
|
|
226
|
-
*/
|
|
227
|
-
declare function parseByteSequence(src: string): ParsedValue<Uint8Array>;
|
|
225
|
+
* @internal
|
|
226
|
+
*/
|
|
227
|
+
export declare function parseByteSequence(src: string): ParsedValue<Uint8Array>;
|
|
228
228
|
//#endregion
|
|
229
229
|
//#region src/parse/parseDate.d.ts
|
|
230
230
|
/**
|
|
231
|
-
* @internal
|
|
232
|
-
*/
|
|
233
|
-
declare function parseDate(src: string): ParsedValue<Date>;
|
|
231
|
+
* @internal
|
|
232
|
+
*/
|
|
233
|
+
export declare function parseDate(src: string): ParsedValue<Date>;
|
|
234
234
|
//#endregion
|
|
235
235
|
//#region src/parse/parseDict.d.ts
|
|
236
236
|
/**
|
|
237
|
-
* @internal
|
|
238
|
-
*/
|
|
239
|
-
declare function parseDict(src: string, options?: SfDecodeOptions): ParsedValue<SfDictionary>;
|
|
237
|
+
* @internal
|
|
238
|
+
*/
|
|
239
|
+
export declare function parseDict(src: string, options?: SfDecodeOptions): ParsedValue<SfDictionary>;
|
|
240
240
|
//#endregion
|
|
241
241
|
//#region src/parse/parseError.d.ts
|
|
242
242
|
/**
|
|
243
|
-
* @internal
|
|
244
|
-
*/
|
|
245
|
-
declare function parseError(src: any, type: string, cause?: any): Error;
|
|
243
|
+
* @internal
|
|
244
|
+
*/
|
|
245
|
+
export declare function parseError(src: any, type: string, cause?: any): Error;
|
|
246
246
|
//#endregion
|
|
247
247
|
//#region src/parse/parseInnerList.d.ts
|
|
248
248
|
/**
|
|
249
|
-
* @internal
|
|
250
|
-
*/
|
|
251
|
-
declare function parseInnerList(src: string, options?: SfDecodeOptions): ParsedValue<SfInnerList>;
|
|
249
|
+
* @internal
|
|
250
|
+
*/
|
|
251
|
+
export declare function parseInnerList(src: string, options?: SfDecodeOptions): ParsedValue<SfInnerList>;
|
|
252
252
|
//#endregion
|
|
253
253
|
//#region src/parse/parseIntegerOrDecimal.d.ts
|
|
254
254
|
/**
|
|
255
|
-
* @internal
|
|
256
|
-
*/
|
|
257
|
-
declare function parseIntegerOrDecimal(src: string): ParsedValue<number>;
|
|
255
|
+
* @internal
|
|
256
|
+
*/
|
|
257
|
+
export declare function parseIntegerOrDecimal(src: string): ParsedValue<number>;
|
|
258
258
|
//#endregion
|
|
259
259
|
//#region src/parse/parseItem.d.ts
|
|
260
260
|
/**
|
|
261
|
-
* @internal
|
|
262
|
-
*/
|
|
263
|
-
declare function parseItem(src: string, options?: SfDecodeOptions): ParsedValue<SfItem>;
|
|
261
|
+
* @internal
|
|
262
|
+
*/
|
|
263
|
+
export declare function parseItem(src: string, options?: SfDecodeOptions): ParsedValue<SfItem>;
|
|
264
264
|
//#endregion
|
|
265
265
|
//#region src/parse/parseItemOrInnerList.d.ts
|
|
266
266
|
/**
|
|
267
|
-
* @internal
|
|
268
|
-
*/
|
|
269
|
-
declare function parseItemOrInnerList(src: string, options?: SfDecodeOptions): ParsedValue<SfItem | SfInnerList>;
|
|
267
|
+
* @internal
|
|
268
|
+
*/
|
|
269
|
+
export declare function parseItemOrInnerList(src: string, options?: SfDecodeOptions): ParsedValue<SfItem | SfInnerList>;
|
|
270
270
|
//#endregion
|
|
271
271
|
//#region src/parse/parseKey.d.ts
|
|
272
272
|
/**
|
|
273
|
-
* @internal
|
|
274
|
-
*/
|
|
275
|
-
declare function parseKey(src: string): ParsedValue<string>;
|
|
273
|
+
* @internal
|
|
274
|
+
*/
|
|
275
|
+
export declare function parseKey(src: string): ParsedValue<string>;
|
|
276
276
|
//#endregion
|
|
277
277
|
//#region src/parse/parseList.d.ts
|
|
278
278
|
/**
|
|
279
|
-
* @internal
|
|
280
|
-
*/
|
|
281
|
-
declare function parseList(src: string, options?: SfDecodeOptions): ParsedValue<SfMember[]>;
|
|
279
|
+
* @internal
|
|
280
|
+
*/
|
|
281
|
+
export declare function parseList(src: string, options?: SfDecodeOptions): ParsedValue<SfMember[]>;
|
|
282
282
|
//#endregion
|
|
283
283
|
//#region src/parse/parseParameters.d.ts
|
|
284
284
|
/**
|
|
285
|
-
* @internal
|
|
286
|
-
*/
|
|
287
|
-
declare function parseParameters(src: string, options?: SfDecodeOptions): ParsedValue<SfParameters | undefined>;
|
|
285
|
+
* @internal
|
|
286
|
+
*/
|
|
287
|
+
export declare function parseParameters(src: string, options?: SfDecodeOptions): ParsedValue<SfParameters | undefined>;
|
|
288
288
|
//#endregion
|
|
289
289
|
//#region src/parse/parseString.d.ts
|
|
290
290
|
/**
|
|
291
|
-
* @internal
|
|
292
|
-
*/
|
|
293
|
-
declare function parseString(src: string): ParsedValue<string>;
|
|
291
|
+
* @internal
|
|
292
|
+
*/
|
|
293
|
+
export declare function parseString(src: string): ParsedValue<string>;
|
|
294
294
|
//#endregion
|
|
295
295
|
//#region src/parse/parseToken.d.ts
|
|
296
296
|
/**
|
|
297
|
-
* @internal
|
|
298
|
-
*/
|
|
299
|
-
declare function parseToken(src: string, options?: SfDecodeOptions): ParsedValue<symbol | SfToken>;
|
|
297
|
+
* @internal
|
|
298
|
+
*/
|
|
299
|
+
export declare function parseToken(src: string, options?: SfDecodeOptions): ParsedValue<symbol | SfToken>;
|
|
300
300
|
//#endregion
|
|
301
301
|
//#region src/serialize/serializeBareItem.d.ts
|
|
302
302
|
/**
|
|
303
|
-
* @internal
|
|
304
|
-
*/
|
|
305
|
-
declare function serializeBareItem(value: any): string;
|
|
303
|
+
* @internal
|
|
304
|
+
*/
|
|
305
|
+
export declare function serializeBareItem(value: any): string;
|
|
306
306
|
//#endregion
|
|
307
307
|
//#region src/serialize/serializeBoolean.d.ts
|
|
308
308
|
/**
|
|
309
|
-
* @internal
|
|
310
|
-
*/
|
|
311
|
-
declare function serializeBoolean(value: boolean): string;
|
|
309
|
+
* @internal
|
|
310
|
+
*/
|
|
311
|
+
export declare function serializeBoolean(value: boolean): string;
|
|
312
312
|
//#endregion
|
|
313
313
|
//#region src/serialize/serializeByteSequence.d.ts
|
|
314
314
|
/**
|
|
315
|
-
* @internal
|
|
316
|
-
*/
|
|
317
|
-
declare function serializeByteSequence(value: Uint8Array): string;
|
|
315
|
+
* @internal
|
|
316
|
+
*/
|
|
317
|
+
export declare function serializeByteSequence(value: Uint8Array): string;
|
|
318
318
|
//#endregion
|
|
319
319
|
//#region src/serialize/serializeDate.d.ts
|
|
320
320
|
/**
|
|
321
|
-
* @internal
|
|
322
|
-
*/
|
|
323
|
-
declare function serializeDate(value: Date): string;
|
|
321
|
+
* @internal
|
|
322
|
+
*/
|
|
323
|
+
export declare function serializeDate(value: Date): string;
|
|
324
324
|
//#endregion
|
|
325
325
|
//#region src/serialize/serializeDecimal.d.ts
|
|
326
326
|
/**
|
|
327
|
-
* @internal
|
|
328
|
-
*/
|
|
329
|
-
declare function serializeDecimal(value: number): string;
|
|
327
|
+
* @internal
|
|
328
|
+
*/
|
|
329
|
+
export declare function serializeDecimal(value: number): string;
|
|
330
330
|
//#endregion
|
|
331
331
|
//#region src/serialize/serializeDict.d.ts
|
|
332
332
|
/**
|
|
333
|
-
* @internal
|
|
334
|
-
*/
|
|
335
|
-
declare function serializeDict(dict: Record<string, any> | Map<string, any>, options?: SfEncodeOptions): string;
|
|
333
|
+
* @internal
|
|
334
|
+
*/
|
|
335
|
+
export declare function serializeDict(dict: Record<string, any> | Map<string, any>, options?: SfEncodeOptions): string;
|
|
336
336
|
//#endregion
|
|
337
337
|
//#region src/serialize/serializeError.d.ts
|
|
338
338
|
/**
|
|
339
|
-
* @internal
|
|
340
|
-
*/
|
|
341
|
-
declare function serializeError(src: any, type: string, cause?: any): Error;
|
|
339
|
+
* @internal
|
|
340
|
+
*/
|
|
341
|
+
export declare function serializeError(src: any, type: string, cause?: any): Error;
|
|
342
342
|
//#endregion
|
|
343
343
|
//#region src/serialize/serializeInnerList.d.ts
|
|
344
344
|
/**
|
|
345
|
-
* @internal
|
|
346
|
-
*/
|
|
347
|
-
declare function serializeInnerList(value: SfInnerList): string;
|
|
345
|
+
* @internal
|
|
346
|
+
*/
|
|
347
|
+
export declare function serializeInnerList(value: SfInnerList): string;
|
|
348
348
|
/**
|
|
349
|
-
* @internal
|
|
350
|
-
*/
|
|
351
|
-
declare function serializeInnerList(value: SfItem[] | SfBareItem[], params?: SfParameters): string;
|
|
349
|
+
* @internal
|
|
350
|
+
*/
|
|
351
|
+
export declare function serializeInnerList(value: SfItem[] | SfBareItem[], params?: SfParameters): string;
|
|
352
352
|
//#endregion
|
|
353
353
|
//#region src/serialize/serializeInteger.d.ts
|
|
354
354
|
/**
|
|
355
|
-
* @internal
|
|
356
|
-
*/
|
|
357
|
-
declare function serializeInteger(value: number): string;
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
357
|
+
export declare function serializeInteger(value: number): string;
|
|
358
358
|
//#endregion
|
|
359
359
|
//#region src/serialize/serializeItem.d.ts
|
|
360
360
|
/**
|
|
361
|
-
* @internal
|
|
362
|
-
*/
|
|
363
|
-
declare function serializeItem(value: SfItem | SfBareItem): string;
|
|
361
|
+
* @internal
|
|
362
|
+
*/
|
|
363
|
+
export declare function serializeItem(value: SfItem | SfBareItem): string;
|
|
364
364
|
//#endregion
|
|
365
365
|
//#region src/serialize/serializeKey.d.ts
|
|
366
366
|
/**
|
|
367
|
-
* @internal
|
|
368
|
-
*/
|
|
369
|
-
declare function serializeKey(value: string): string;
|
|
367
|
+
* @internal
|
|
368
|
+
*/
|
|
369
|
+
export declare function serializeKey(value: string): string;
|
|
370
370
|
//#endregion
|
|
371
371
|
//#region src/serialize/serializeList.d.ts
|
|
372
372
|
/**
|
|
373
|
-
* @internal
|
|
374
|
-
*/
|
|
375
|
-
declare function serializeList(list: SfMember[], options?: SfEncodeOptions): string;
|
|
373
|
+
* @internal
|
|
374
|
+
*/
|
|
375
|
+
export declare function serializeList(list: SfMember[], options?: SfEncodeOptions): string;
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region src/serialize/serializeParams.d.ts
|
|
378
378
|
/**
|
|
379
|
-
* @internal
|
|
380
|
-
*/
|
|
381
|
-
declare function serializeParams(params?: Record<string, any>): string;
|
|
379
|
+
* @internal
|
|
380
|
+
*/
|
|
381
|
+
export declare function serializeParams(params?: Record<string, any>): string;
|
|
382
382
|
//#endregion
|
|
383
383
|
//#region src/serialize/serializeString.d.ts
|
|
384
384
|
/**
|
|
385
|
-
* @internal
|
|
386
|
-
*/
|
|
387
|
-
declare function serializeString(value: string): string;
|
|
385
|
+
* @internal
|
|
386
|
+
*/
|
|
387
|
+
export declare function serializeString(value: string): string;
|
|
388
388
|
//#endregion
|
|
389
389
|
//#region src/serialize/serializeToken.d.ts
|
|
390
390
|
/**
|
|
391
|
-
* @internal
|
|
392
|
-
*/
|
|
393
|
-
declare function serializeToken(token: symbol | SfToken): string;
|
|
391
|
+
* @internal
|
|
392
|
+
*/
|
|
393
|
+
export declare function serializeToken(token: symbol | SfToken): string;
|
|
394
394
|
//#endregion
|
|
395
|
-
export { ParsedValue, SfBareItem, SfDecodeOptions, SfDictionary, SfEncodeOptions, SfInnerList,
|
|
395
|
+
export type { ParsedValue, SfBareItem, SfDecodeOptions, SfDictionary, SfEncodeOptions, SfInnerList, SfMember, SfParameters };
|
|
396
396
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/SfDecodeOptions.ts","../src/SfToken.ts","../src/SfBareItem.ts","../src/SfItem.ts","../src/SfParameters.ts","../src/SfInnerList.ts","../src/SfMember.ts","../src/SfDictionary.ts","../src/decodeSfDict.ts","../src/decodeSfItem.ts","../src/decodeSfList.ts","../src/SfEncodeOptions.ts","../src/encodeSfDict.ts","../src/encodeSfItem.ts","../src/encodeSfList.ts","../src/utils/symbolToStr.ts","../src/parse/ParsedValue.ts","../src/parse/parseBareItem.ts","../src/parse/parseBoolean.ts","../src/parse/parseByteSequence.ts","../src/parse/parseDate.ts","../src/parse/parseDict.ts","../src/parse/parseError.ts","../src/parse/parseInnerList.ts","../src/parse/parseIntegerOrDecimal.ts","../src/parse/parseItem.ts","../src/parse/parseItemOrInnerList.ts","../src/parse/parseKey.ts","../src/parse/parseList.ts","../src/parse/parseParameters.ts","../src/parse/parseString.ts","../src/parse/parseToken.ts","../src/serialize/serializeBareItem.ts","../src/serialize/serializeBoolean.ts","../src/serialize/serializeByteSequence.ts","../src/serialize/serializeDate.ts","../src/serialize/serializeDecimal.ts","../src/serialize/serializeDict.ts","../src/serialize/serializeError.ts","../src/serialize/serializeInnerList.ts","../src/serialize/serializeInteger.ts","../src/serialize/serializeItem.ts","../src/serialize/serializeKey.ts","../src/serialize/serializeList.ts","../src/serialize/serializeParams.ts","../src/serialize/serializeString.ts","../src/serialize/serializeToken.ts"],"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/SfDecodeOptions.ts","../src/SfToken.ts","../src/SfBareItem.ts","../src/SfItem.ts","../src/SfParameters.ts","../src/SfInnerList.ts","../src/SfMember.ts","../src/SfDictionary.ts","../src/decodeSfDict.ts","../src/decodeSfItem.ts","../src/decodeSfList.ts","../src/SfEncodeOptions.ts","../src/encodeSfDict.ts","../src/encodeSfItem.ts","../src/encodeSfList.ts","../src/utils/symbolToStr.ts","../src/parse/ParsedValue.ts","../src/parse/parseBareItem.ts","../src/parse/parseBoolean.ts","../src/parse/parseByteSequence.ts","../src/parse/parseDate.ts","../src/parse/parseDict.ts","../src/parse/parseError.ts","../src/parse/parseInnerList.ts","../src/parse/parseIntegerOrDecimal.ts","../src/parse/parseItem.ts","../src/parse/parseItemOrInnerList.ts","../src/parse/parseKey.ts","../src/parse/parseList.ts","../src/parse/parseParameters.ts","../src/parse/parseString.ts","../src/parse/parseToken.ts","../src/serialize/serializeBareItem.ts","../src/serialize/serializeBoolean.ts","../src/serialize/serializeByteSequence.ts","../src/serialize/serializeDate.ts","../src/serialize/serializeDecimal.ts","../src/serialize/serializeDict.ts","../src/serialize/serializeError.ts","../src/serialize/serializeInnerList.ts","../src/serialize/serializeInteger.ts","../src/serialize/serializeItem.ts","../src/serialize/serializeKey.ts","../src/serialize/serializeList.ts","../src/serialize/serializeParams.ts","../src/serialize/serializeString.ts","../src/serialize/serializeToken.ts"],"mappings":";;;;;;KAKY;;;;EAIX;;;;;;;;;qBCJY;EACZ;EAEA,YAAY;;;;;;;;;KCDD,sBAAsB,yCAAyC,OAAO;;;;;;;;qBCArE,OACZ,UAAU,aAAa,YACvB,IAAI;;;;EAMJ,OAAO;;;;EAKP,SAAS;;;;;;;EAQT,YAAY,YAAY,SAAS;;;;;;;;;KCvBtB,eAAe;;;;;;;;KCIf;EACX,OAAO,WAAW;EAClB,QAAQ;;;;;;;;;KCFG,WAAW,SAAS,cAAc;;;;;;;;KCFlC,eAAe,eAAe,YAAY,YAAY;;;;;;;;;;;wBCOlD,aAAa,eAAe,UAAU,kBAAkB;;;;;;;;;;;wBCqBxD,aAAa,eAAe,UAAU,kBAAkB;;;;;;;;;;;wBCrBxD,aAAa,eAAe,UAAU,kBAAkB;;;;;;;;KCT5D;;;;;;;EAOX;;;;;;;;;;;;;;wBCCe,aAAa,OAAO,sBAAsB,kBAAkB,UAAU;;;;;;;;;;;;wBCGtE,aAAa,OAAO;;;;;;;;;;;wBAYpB,aAAa,OAAO,YAAY,SAAS;;;;;;;;;;;;;wBCdzC,aAAa,OAAO,YAAY,UAAU;;;;;;;;;;;;wBCH1C,YAAY,iBAAiB;;;;;;KCRjC,YAAY;EACvB,OAAO;EACP;;;;;;;wBCsCe,cAAc,aAAa,UAAU,kBAAkB,YAAY;;;;;;wBCnBnE,aAAa,cAAc;;;;;;wBCyB3B,kBAAkB,cAAc,YAAY;;;;;;wBCzB5C,UAAU,cAAc,YAAY;;;;;;wBCyCpC,UAAU,aAAa,UAAU,kBAAkB,YAAY;;;;;;wBC5D/D,WAAW,UAAU,cAAc,cAAc;;;;;;wBCyCjD,eAAe,aAAa,UAAU,kBAAkB,YAAY;;;;;;wBCiCpE,sBAAsB,cAAc;;;;;;wBCxDpC,UAAU,aAAa,UAAU,kBAAkB,YAAY;;;;;;wBCA/D,qBAAqB,aAAa,UAAU,kBAAkB,YAAY,SAAS;;;;;;wBCMnF,SAAS,cAAc;;;;;;wBCSvB,UAAU,aAAa,UAAU,kBAAkB,YAAY;;;;;;wBCU/D,gBAAgB,aAAa,UAAU,kBAAkB,YAAY;;;;;;wBCFrE,YAAY,cAAc;;;;;;wBCf1B,WAAW,aAAa,UAAU,kBAAkB,qBAAqB;;;;;;wBCUzE,kBAAkB;;;;;;wBCnBlB,iBAAiB;;;;;;wBCSjB,sBAAsB,OAAO;;;;;;wBClB7B,cAAc,OAAO;;;;;;wBC4BrB,iBAAiB;;;;;;wBCKjB,cAAc,MAAM,sBAAsB,kBAAkB,UAAU;;;;;;wBCzCtE,eAAe,UAAU,cAAc,cAAc;;;;;;wBC2BrD,mBAAmB,OAAO;;;;wBAK1B,mBAAmB,OAAO,WAAW,cAAc,SAAS;;;;;;wBCZ5D,iBAAiB;;;;;;wBCHjB,cAAc,OAAO,SAAS;;;;;;wBCG9B,aAAa;;;;;;wBCOb,cAAc,MAAM,YAAY,UAAU;;;;;;wBCF1C,gBAAgB,SAAS;;;;;;wBCOzB,gBAAgB;;;;;;wBCThB,eAAe,gBAAgB"}
|