json-as 0.9.17 → 0.9.19

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,27 +1,26 @@
1
-
2
1
  @json
3
2
  export class ObjWithString {
4
- s!: string;
3
+ s!: string;
5
4
  }
6
5
 
7
6
  @json
8
7
  export class ObjWithStrangeKey<T> {
9
- @alias('a\\\t"\x02b`c')
10
- data!: T;
8
+ @alias('a\\\t"\x02b`c')
9
+ data!: T;
11
10
  }
12
11
  @json
13
12
  export class ObjectWithStringArray {
14
- sa!: string[];
13
+ sa!: string[];
15
14
  }
16
15
 
17
16
  @json
18
17
  export class ObjectWithFloat {
19
- f!: f64;
18
+ f!: f64;
20
19
  }
21
20
 
22
21
  @json
23
22
  export class ObjectWithFloatArray {
24
- fa!: f64[];
23
+ fa!: f64[];
25
24
  }
26
25
 
27
26
  @json
@@ -68,7 +67,7 @@ export class Player {
68
67
  isVerified: boolean;
69
68
  }
70
69
 
71
- export class Nullable { }
70
+ export class Nullable {}
72
71
  export type Null = Nullable | null;
73
72
 
74
73
  @json
@@ -78,5 +77,5 @@ export class OmitIf {
78
77
  y: i32 = -1;
79
78
  z: i32 = 1;
80
79
  @omitnull()
81
- foo: string | null = null
82
- }
80
+ foo: string | null = null;
81
+ }
@@ -3,284 +3,285 @@ import { itoa_buffered, dtoa_buffered } from "util/number";
3
3
  const MIN_BUFFER_LEN = 32;
4
4
  const MIN_BUFFER_SIZE: u32 = MIN_BUFFER_LEN << 1;
5
5
 
6
- const NEW_LINE_CHAR: u16 = 0x0A; // \n
6
+ const NEW_LINE_CHAR: u16 = 0x0a; // \n
7
7
 
8
8
  // @ts-ignore: decorator
9
9
  function nextPowerOf2(n: u32): u32 {
10
- return 1 << 32 - clz(n - 1);
10
+ return 1 << (32 - clz(n - 1));
11
11
  }
12
12
 
13
13
  export class Sink {
14
- public buffer!: ArrayBuffer;
15
- public offset: u32 = 0;
16
-
17
- static withCapacity(capacity: i32): Sink {
18
- const sink = new Sink();
19
- sink.buffer = changetype<ArrayBuffer>(__new(
20
- max<u32>(MIN_BUFFER_SIZE, <u32>capacity << 1),
21
- idof<ArrayBuffer>())
22
- );
23
- return sink;
14
+ public buffer!: ArrayBuffer;
15
+ public offset: u32 = 0;
16
+
17
+ static withCapacity(capacity: i32): Sink {
18
+ const sink = new Sink();
19
+ sink.buffer = changetype<ArrayBuffer>(
20
+ __new(
21
+ max<u32>(MIN_BUFFER_SIZE, (<u32>capacity) << 1),
22
+ idof<ArrayBuffer>(),
23
+ ),
24
+ );
25
+ return sink;
26
+ }
27
+
28
+ static fromString(
29
+ initial: string = "",
30
+ capacity: i32 = MIN_BUFFER_LEN,
31
+ ): Sink {
32
+ const sink = new Sink();
33
+ const size = (<u32>initial.length) << 1;
34
+ sink.buffer = changetype<ArrayBuffer>(
35
+ __new(
36
+ max<u32>(size, max<u32>(MIN_BUFFER_SIZE, (<u32>capacity) << 1)),
37
+ idof<ArrayBuffer>(),
38
+ ),
39
+ );
40
+ if (size) {
41
+ memory.copy(
42
+ changetype<usize>(sink.buffer),
43
+ changetype<usize>(initial),
44
+ size,
45
+ );
46
+ sink.offset += size;
24
47
  }
25
-
26
- static fromString(initial: string = "", capacity: i32 = MIN_BUFFER_LEN): Sink {
27
- const sink = new Sink();
28
- const size = <u32>initial.length << 1;
29
- sink.buffer = changetype<ArrayBuffer>(__new(
30
- max<u32>(size, max<u32>(MIN_BUFFER_SIZE, <u32>capacity << 1)),
31
- idof<ArrayBuffer>())
32
- );
33
- if (size) {
34
- memory.copy(
35
- changetype<usize>(sink.buffer),
36
- changetype<usize>(initial),
37
- size
38
- );
39
- sink.offset += size;
40
- }
41
- return sink;
42
- }
43
-
44
- static fromStringLiteral(initial: string = ""): Sink {
45
- const sink = new Sink();
46
- const size = <u32>initial.length << 1;
47
- sink.buffer = changetype<ArrayBuffer>(__new(
48
- size,
49
- idof<ArrayBuffer>())
50
- );
51
- if (size) {
52
- memory.copy(
53
- changetype<usize>(sink.buffer),
54
- changetype<usize>(initial),
55
- size
56
- );
57
- sink.offset += size;
58
- }
59
- return sink;
60
- }
61
-
62
- static fromBuffer(initial: ArrayBuffer, capacity: i32 = MIN_BUFFER_LEN): Sink {
63
- const sink = new Sink();
64
- const size = <u32>initial.byteLength;
65
- sink.buffer = changetype<ArrayBuffer>(__new(
66
- max<u32>(size, max<u32>(MIN_BUFFER_SIZE, <u32>capacity << 1)),
67
- idof<ArrayBuffer>())
68
- );
69
- if (size) {
70
- memory.copy(
71
- changetype<usize>(sink.buffer),
72
- changetype<usize>(initial),
73
- size
74
- );
75
- sink.offset = size;
76
- }
77
- return sink;
78
- }
79
-
80
- constructor() { }
81
-
82
- get length(): i32 {
83
- return this.offset >> 1;
84
- }
85
-
86
- get capacity(): i32 {
87
- return this.buffer.byteLength >>> 1;
88
- }
89
- reset(): void {
90
- this.offset = 0;
91
- }
92
- write(src: string, start: i32 = 0, end: i32 = i32.MAX_VALUE): Sink | null {
93
- let len = src.length as u32;
94
-
95
- if (start != 0 || end != i32.MAX_VALUE) {
96
- let from: i32;
97
- from = min<i32>(max(start, 0), len);
98
- end = min<i32>(max(end, 0), len);
99
- start = min<i32>(from, end);
100
- end = max<i32>(from, end);
101
- len = end - start;
102
- }
103
-
104
- if (!len) return null;
105
-
106
- let size = len << 1;
107
- this.ensureCapacity(size);
108
- let offset = this.offset;
109
-
110
- memory.copy(
111
- changetype<usize>(this.buffer) + offset,
112
- changetype<usize>(src) + (<usize>start << 1),
113
- size
114
- );
115
- this.offset = offset + size;
116
- return this;
117
- }
118
-
119
- writeLn(src: string = "", start: i32 = 0, end: i32 = i32.MAX_VALUE): Sink {
120
- let len = src.length as u32;
121
- if (start != 0 || end != i32.MAX_VALUE) {
122
- let from: i32;
123
- from = min<i32>(max(start, 0), len);
124
- end = min<i32>(max(end, 0), len);
125
- start = min<i32>(from, end);
126
- end = max<i32>(from, end);
127
- len = end - start;
128
- }
129
-
130
- let size = len << 1;
131
- this.ensureCapacity(size + 2);
132
- let offset = this.offset;
133
- let dest = changetype<usize>(this.buffer) + offset;
134
- if (size) memory.copy(dest, changetype<usize>(src) + (<usize>start << 1), size);
135
- store<u16>(dest + size, NEW_LINE_CHAR);
136
- this.offset = offset + (size + 2);
137
- return this;
138
- }
139
-
140
- writeCodePoint(code: i32): Sink {
141
- let hasSur = <u32>code > 0xFFFF;
142
- this.ensureCapacity(2 << i32(hasSur));
143
-
144
- let offset = this.offset;
145
- let dest = changetype<usize>(this.buffer) + offset;
146
-
147
- if (!hasSur) {
148
- store<u16>(dest, <u16>code);
149
- this.offset = offset + 2;
150
- } else {
151
- assert(<u32>code <= 0x10FFFF);
152
- code -= 0x10000;
153
- let hi = (code & 0x03FF) | 0xDC00;
154
- let lo = code >>> 10 | 0xD800;
155
- store<u32>(dest, lo | hi << 16);
156
- this.offset = offset + 4;
157
- }
158
- return this;
48
+ return sink;
49
+ }
50
+
51
+ static fromStringLiteral(initial: string = ""): Sink {
52
+ const sink = new Sink();
53
+ const size = (<u32>initial.length) << 1;
54
+ sink.buffer = changetype<ArrayBuffer>(__new(size, idof<ArrayBuffer>()));
55
+ if (size) {
56
+ memory.copy(
57
+ changetype<usize>(sink.buffer),
58
+ changetype<usize>(initial),
59
+ size,
60
+ );
61
+ sink.offset += size;
159
62
  }
160
-
161
- writeCodePoint16(code: i32): Sink {
162
- this.ensureCapacity(2);
163
-
164
- let offset = this.offset;
165
- let dest = changetype<usize>(this.buffer) + offset;
166
-
167
- store<u16>(dest, <u16>code);
168
- this.offset = offset + 2;
169
-
170
- return this;
63
+ return sink;
64
+ }
65
+
66
+ static fromBuffer(
67
+ initial: ArrayBuffer,
68
+ capacity: i32 = MIN_BUFFER_LEN,
69
+ ): Sink {
70
+ const sink = new Sink();
71
+ const size = <u32>initial.byteLength;
72
+ sink.buffer = changetype<ArrayBuffer>(
73
+ __new(
74
+ max<u32>(size, max<u32>(MIN_BUFFER_SIZE, (<u32>capacity) << 1)),
75
+ idof<ArrayBuffer>(),
76
+ ),
77
+ );
78
+ if (size) {
79
+ memory.copy(
80
+ changetype<usize>(sink.buffer),
81
+ changetype<usize>(initial),
82
+ size,
83
+ );
84
+ sink.offset = size;
171
85
  }
172
-
173
- writeCodePointUnsafe(code: i32): Sink {
174
- this.ensureCapacity(2);
175
-
176
- let offset = this.offset;
177
- let dest = changetype<usize>(this.buffer) + offset;
178
-
179
- code -= 0x10000;
180
- let hi = (code & 0x03FF) | 0xDC00;
181
- let lo = code >>> 10 | 0xD800;
182
- store<u32>(dest, lo | hi << 16);
183
- this.offset = offset + 4;
184
- return this;
86
+ return sink;
87
+ }
88
+
89
+ constructor() {}
90
+
91
+ get length(): i32 {
92
+ return this.offset >> 1;
93
+ }
94
+
95
+ get capacity(): i32 {
96
+ return this.buffer.byteLength >>> 1;
97
+ }
98
+ reset(): void {
99
+ this.offset = 0;
100
+ }
101
+ write(src: string, start: i32 = 0, end: i32 = i32.MAX_VALUE): Sink | null {
102
+ let len = src.length as u32;
103
+
104
+ if (start != 0 || end != i32.MAX_VALUE) {
105
+ let from: i32;
106
+ from = min<i32>(max(start, 0), len);
107
+ end = min<i32>(max(end, 0), len);
108
+ start = min<i32>(from, end);
109
+ end = max<i32>(from, end);
110
+ len = end - start;
185
111
  }
186
112
 
187
- writeNumber<T extends number>(value: T): Sink {
188
- let offset = this.offset;
189
- if (isInteger<T>()) {
190
- let maxCapacity = 0;
191
- // this also include size for sign
192
- if (sizeof<T>() == 1) {
193
- maxCapacity = 4 << 1;
194
- } else if (sizeof<T>() == 2) {
195
- maxCapacity = 6 << 1;
196
- } else if (sizeof<T>() == 4) {
197
- maxCapacity = 11 << 1;
198
- } else if (sizeof<T>() == 8) {
199
- maxCapacity = 21 << 1;
200
- }
201
- this.ensureCapacity(maxCapacity);
202
- offset += itoa_buffered(
203
- changetype<usize>(this.buffer) + offset,
204
- value
205
- ) << 1;
206
- } else {
207
- this.ensureCapacity(32 << 1);
208
- offset += dtoa_buffered(
209
- changetype<usize>(this.buffer) + offset,
210
- value
211
- ) << 1;
212
- }
213
- this.offset = offset;
214
- return this;
215
- }
216
- writeNumberUnsafe<T extends number>(value: T): Sink {
217
- let offset = this.offset;
218
- if (isInteger<T>()) {
219
- offset += itoa_buffered(
220
- changetype<usize>(this.buffer) + offset,
221
- value
222
- ) << 1;
223
- } else {
224
- offset += dtoa_buffered(
225
- changetype<usize>(this.buffer) + offset,
226
- value
227
- ) << 1;
228
- }
229
- this.offset = offset;
230
- return this;
231
- }
232
- writeIntegerUnsafe<T extends number>(value: T): Sink {
233
- let offset = this.offset;
234
- if (isInteger<T>()) {
235
- offset += itoa_buffered(
236
- changetype<usize>(this.buffer) + offset,
237
- value
238
- ) << 1;
239
- } else {
240
- offset += dtoa_buffered(
241
- changetype<usize>(this.buffer) + offset,
242
- value
243
- ) << 1;
244
- }
245
- this.offset = offset;
246
- return this;
113
+ if (!len) return null;
114
+
115
+ let size = len << 1;
116
+ this.ensureCapacity(size);
117
+ let offset = this.offset;
118
+
119
+ memory.copy(
120
+ changetype<usize>(this.buffer) + offset,
121
+ changetype<usize>(src) + ((<usize>start) << 1),
122
+ size,
123
+ );
124
+ this.offset = offset + size;
125
+ return this;
126
+ }
127
+
128
+ writeLn(src: string = "", start: i32 = 0, end: i32 = i32.MAX_VALUE): Sink {
129
+ let len = src.length as u32;
130
+ if (start != 0 || end != i32.MAX_VALUE) {
131
+ let from: i32;
132
+ from = min<i32>(max(start, 0), len);
133
+ end = min<i32>(max(end, 0), len);
134
+ start = min<i32>(from, end);
135
+ end = max<i32>(from, end);
136
+ len = end - start;
247
137
  }
248
138
 
249
- reserve(capacity: i32, clear: bool = false): void {
250
- if (clear) this.offset = 0;
251
- this.buffer = changetype<ArrayBuffer>(__renew(
252
- changetype<usize>(this.buffer),
253
- max<u32>(this.offset, max<u32>(MIN_BUFFER_SIZE, <u32>capacity << 1))
254
- ));
139
+ let size = len << 1;
140
+ this.ensureCapacity(size + 2);
141
+ let offset = this.offset;
142
+ let dest = changetype<usize>(this.buffer) + offset;
143
+ if (size)
144
+ memory.copy(dest, changetype<usize>(src) + ((<usize>start) << 1), size);
145
+ store<u16>(dest + size, NEW_LINE_CHAR);
146
+ this.offset = offset + (size + 2);
147
+ return this;
148
+ }
149
+
150
+ writeCodePoint(code: i32): Sink {
151
+ let hasSur = <u32>code > 0xffff;
152
+ this.ensureCapacity(2 << i32(hasSur));
153
+
154
+ let offset = this.offset;
155
+ let dest = changetype<usize>(this.buffer) + offset;
156
+
157
+ if (!hasSur) {
158
+ store<u16>(dest, <u16>code);
159
+ this.offset = offset + 2;
160
+ } else {
161
+ assert(<u32>code <= 0x10ffff);
162
+ code -= 0x10000;
163
+ let hi = (code & 0x03ff) | 0xdc00;
164
+ let lo = (code >>> 10) | 0xd800;
165
+ store<u32>(dest, lo | (hi << 16));
166
+ this.offset = offset + 4;
255
167
  }
256
-
257
- shrink(): void {
258
- this.buffer = changetype<ArrayBuffer>(__renew(
259
- changetype<usize>(this.buffer),
260
- max<u32>(this.offset, MIN_BUFFER_SIZE)
261
- ));
168
+ return this;
169
+ }
170
+
171
+ writeCodePoint16(code: i32): Sink {
172
+ this.ensureCapacity(2);
173
+
174
+ let offset = this.offset;
175
+ let dest = changetype<usize>(this.buffer) + offset;
176
+
177
+ store<u16>(dest, <u16>code);
178
+ this.offset = offset + 2;
179
+
180
+ return this;
181
+ }
182
+
183
+ writeCodePointUnsafe(code: i32): Sink {
184
+ this.ensureCapacity(2);
185
+
186
+ let offset = this.offset;
187
+ let dest = changetype<usize>(this.buffer) + offset;
188
+
189
+ code -= 0x10000;
190
+ let hi = (code & 0x03ff) | 0xdc00;
191
+ let lo = (code >>> 10) | 0xd800;
192
+ store<u32>(dest, lo | (hi << 16));
193
+ this.offset = offset + 4;
194
+ return this;
195
+ }
196
+
197
+ writeNumber<T extends number>(value: T): Sink {
198
+ let offset = this.offset;
199
+ if (isInteger<T>()) {
200
+ let maxCapacity = 0;
201
+ // this also include size for sign
202
+ if (sizeof<T>() == 1) {
203
+ maxCapacity = 4 << 1;
204
+ } else if (sizeof<T>() == 2) {
205
+ maxCapacity = 6 << 1;
206
+ } else if (sizeof<T>() == 4) {
207
+ maxCapacity = 11 << 1;
208
+ } else if (sizeof<T>() == 8) {
209
+ maxCapacity = 21 << 1;
210
+ }
211
+ this.ensureCapacity(maxCapacity);
212
+ offset +=
213
+ itoa_buffered(changetype<usize>(this.buffer) + offset, value) << 1;
214
+ } else {
215
+ this.ensureCapacity(32 << 1);
216
+ offset +=
217
+ dtoa_buffered(changetype<usize>(this.buffer) + offset, value) << 1;
262
218
  }
263
-
264
- clear(): void {
265
- this.reserve(0, true);
219
+ this.offset = offset;
220
+ return this;
221
+ }
222
+ writeNumberUnsafe<T extends number>(value: T): Sink {
223
+ let offset = this.offset;
224
+ if (isInteger<T>()) {
225
+ offset +=
226
+ itoa_buffered(changetype<usize>(this.buffer) + offset, value) << 1;
227
+ } else {
228
+ offset +=
229
+ dtoa_buffered(changetype<usize>(this.buffer) + offset, value) << 1;
266
230
  }
267
-
268
- toString(): string {
269
- let size = this.offset;
270
- if (!size) return "";
271
- let out = changetype<string>(__new(size, idof<string>()));
272
- memory.copy(changetype<usize>(out), changetype<usize>(this.buffer), size);
273
- return out;
231
+ this.offset = offset;
232
+ return this;
233
+ }
234
+ writeIntegerUnsafe<T extends number>(value: T): Sink {
235
+ let offset = this.offset;
236
+ if (isInteger<T>()) {
237
+ offset +=
238
+ itoa_buffered(changetype<usize>(this.buffer) + offset, value) << 1;
239
+ } else {
240
+ offset +=
241
+ dtoa_buffered(changetype<usize>(this.buffer) + offset, value) << 1;
274
242
  }
275
-
276
- ensureCapacity(deltaBytes: u32): void {
277
- let buffer = this.buffer;
278
- let newSize = this.offset + deltaBytes;
279
- if (newSize > <u32>buffer.byteLength) {
280
- this.buffer = changetype<ArrayBuffer>(__renew(
281
- changetype<usize>(buffer),
282
- nextPowerOf2(newSize)
283
- ));
284
- }
243
+ this.offset = offset;
244
+ return this;
245
+ }
246
+
247
+ reserve(capacity: i32, clear: bool = false): void {
248
+ if (clear) this.offset = 0;
249
+ this.buffer = changetype<ArrayBuffer>(
250
+ __renew(
251
+ changetype<usize>(this.buffer),
252
+ max<u32>(this.offset, max<u32>(MIN_BUFFER_SIZE, (<u32>capacity) << 1)),
253
+ ),
254
+ );
255
+ }
256
+
257
+ shrink(): void {
258
+ this.buffer = changetype<ArrayBuffer>(
259
+ __renew(
260
+ changetype<usize>(this.buffer),
261
+ max<u32>(this.offset, MIN_BUFFER_SIZE),
262
+ ),
263
+ );
264
+ }
265
+
266
+ clear(): void {
267
+ this.reserve(0, true);
268
+ }
269
+
270
+ toString(): string {
271
+ let size = this.offset;
272
+ if (!size) return "";
273
+ let out = changetype<string>(__new(size, idof<string>()));
274
+ memory.copy(changetype<usize>(out), changetype<usize>(this.buffer), size);
275
+ return out;
276
+ }
277
+
278
+ ensureCapacity(deltaBytes: u32): void {
279
+ let buffer = this.buffer;
280
+ let newSize = this.offset + deltaBytes;
281
+ if (newSize > <u32>buffer.byteLength) {
282
+ this.buffer = changetype<ArrayBuffer>(
283
+ __renew(changetype<usize>(buffer), nextPowerOf2(newSize)),
284
+ );
285
285
  }
286
- }
286
+ }
287
+ }
@@ -1,4 +1,4 @@
1
1
  @json
2
2
  export class Vec3 {
3
3
  x: f64 = 1.0;
4
- }
4
+ }
@@ -9,30 +9,34 @@ import { deserializeStringArray } from "./array/string";
9
9
 
10
10
  // @ts-ignore: Decorator valid here
11
11
  export function deserializeArray<T extends unknown[]>(data: string): T {
12
- if (isString<valueof<T>>()) {
13
- return <T>deserializeStringArray(data);
14
- } else if (isBoolean<valueof<T>>()) {
15
- // @ts-ignore
16
- return deserializeBooleanArray<T>(data);
17
- } else if (isInteger<valueof<T>>()) {
18
- // @ts-ignore
19
- return deserializeIntegerArray<T>(data);
20
- } else if (isFloat<valueof<T>>()) {
21
- // @ts-ignore
22
- return deserializeFloatArray<T>(data);
23
- } else if (isArrayLike<valueof<T>>()) {
24
- // @ts-ignore
25
- return deserializeArrayArray<T>(data);
26
- } else if (isMap<valueof<T>>()) {
27
- return deserializeMapArray<T>(data);
28
- } else if (isManaged<valueof<T>>() || isReference<valueof<T>>()) {
29
- const type = changetype<nonnull<valueof<T>>>(0);
30
- // @ts-ignore
31
- if (isDefined(type.__DESERIALIZE)) {
32
- return deserializeObjectArray<T>(data);
33
- }
34
- throw new Error("Could not parse array of type " + nameof<T>() + "! Make sure to add the @json decorator over classes!");
35
- } else {
36
- throw new Error("Could not parse array of type " + nameof<T>() + "!");
12
+ if (isString<valueof<T>>()) {
13
+ return <T>deserializeStringArray(data);
14
+ } else if (isBoolean<valueof<T>>()) {
15
+ // @ts-ignore
16
+ return deserializeBooleanArray<T>(data);
17
+ } else if (isInteger<valueof<T>>()) {
18
+ // @ts-ignore
19
+ return deserializeIntegerArray<T>(data);
20
+ } else if (isFloat<valueof<T>>()) {
21
+ // @ts-ignore
22
+ return deserializeFloatArray<T>(data);
23
+ } else if (isArrayLike<valueof<T>>()) {
24
+ // @ts-ignore
25
+ return deserializeArrayArray<T>(data);
26
+ } else if (isMap<valueof<T>>()) {
27
+ return deserializeMapArray<T>(data);
28
+ } else if (isManaged<valueof<T>>() || isReference<valueof<T>>()) {
29
+ const type = changetype<nonnull<valueof<T>>>(0);
30
+ // @ts-ignore
31
+ if (isDefined(type.__DESERIALIZE)) {
32
+ return deserializeObjectArray<T>(data);
37
33
  }
38
- }
34
+ throw new Error(
35
+ "Could not parse array of type " +
36
+ nameof<T>() +
37
+ "! Make sure to add the @json decorator over classes!",
38
+ );
39
+ } else {
40
+ throw new Error("Could not parse array of type " + nameof<T>() + "!");
41
+ }
42
+ }
@@ -18,7 +18,6 @@ declare function alias(name: string): Function;
18
18
  */
19
19
  declare function omit(): Function;
20
20
 
21
-
22
21
  /**
23
22
  * Property decorator that allows a field to be omitted when equal to an Expression.
24
23
  */
@@ -33,4 +32,4 @@ declare function omitnull(): Function;
33
32
  * Property decorator that allows a field to be flattened.
34
33
  * @param fieldName - Points to the field to flatten. Can use dot-notation here like @omit("foo.identifier.text")
35
34
  */
36
- declare function flatten(fieldName: string = "value"): Function;
35
+ declare function flatten(fieldName: string = "value"): Function;