@sachitv/avro-typescript 0.4.2 → 0.5.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.
- package/esm/avro_reader_sync.d.ts +48 -0
- package/esm/avro_reader_sync.js +79 -0
- package/esm/avro_writer_sync.d.ts +28 -0
- package/esm/avro_writer_sync.js +63 -0
- package/esm/internal/collections/circular_buffer.d.ts +4 -3
- package/esm/internal/collections/circular_buffer.js +8 -6
- package/esm/mod.d.ts +17 -0
- package/esm/mod.js +11 -0
- package/esm/schemas/base_type.d.ts +8 -0
- package/esm/schemas/base_type.js +21 -0
- package/esm/schemas/complex/array_type.d.ts +31 -10
- package/esm/schemas/complex/array_type.js +129 -39
- package/esm/schemas/complex/enum_type.d.ts +24 -7
- package/esm/schemas/complex/enum_type.js +61 -15
- package/esm/schemas/complex/fixed_type.d.ts +27 -12
- package/esm/schemas/complex/fixed_type.js +40 -27
- package/esm/schemas/complex/map_type.d.ts +31 -10
- package/esm/schemas/complex/map_type.js +88 -47
- package/esm/schemas/complex/named_type.d.ts +1 -1
- package/esm/schemas/complex/named_type.js +2 -2
- package/esm/schemas/complex/record_field.d.ts +62 -0
- package/esm/schemas/complex/record_field.js +112 -0
- package/esm/schemas/complex/record_resolver.d.ts +45 -0
- package/esm/schemas/complex/record_resolver.js +92 -0
- package/esm/schemas/complex/record_type.d.ts +45 -70
- package/esm/schemas/complex/record_type.js +158 -213
- package/esm/schemas/complex/record_writer_cache.d.ts +44 -0
- package/esm/schemas/complex/record_writer_cache.js +141 -0
- package/esm/schemas/complex/record_writer_strategy.d.ts +123 -0
- package/esm/schemas/complex/record_writer_strategy.js +309 -0
- package/esm/schemas/complex/union_type.d.ts +23 -11
- package/esm/schemas/complex/union_type.js +77 -29
- package/esm/schemas/logical/decimal_logical_type.d.ts +1 -1
- package/esm/schemas/logical/decimal_logical_type.js +2 -2
- package/esm/schemas/logical/duration_logical_type.d.ts +1 -1
- package/esm/schemas/logical/duration_logical_type.js +2 -2
- package/esm/schemas/logical/logical_type.d.ts +27 -9
- package/esm/schemas/logical/logical_type.js +50 -17
- package/esm/schemas/logical/temporal_logical_types.d.ts +9 -9
- package/esm/schemas/logical/temporal_logical_types.js +18 -18
- package/esm/schemas/logical/uuid_logical_type.d.ts +1 -1
- package/esm/schemas/logical/uuid_logical_type.js +2 -2
- package/esm/schemas/primitive/boolean_type.d.ts +15 -4
- package/esm/schemas/primitive/boolean_type.js +22 -7
- package/esm/schemas/primitive/bytes_type.d.ts +16 -5
- package/esm/schemas/primitive/bytes_type.js +31 -16
- package/esm/schemas/primitive/double_type.d.ts +13 -2
- package/esm/schemas/primitive/double_type.js +34 -5
- package/esm/schemas/primitive/fixed_size_base_type.d.ts +11 -7
- package/esm/schemas/primitive/fixed_size_base_type.js +14 -14
- package/esm/schemas/primitive/float_type.d.ts +11 -2
- package/esm/schemas/primitive/float_type.js +26 -5
- package/esm/schemas/primitive/int_type.d.ts +17 -6
- package/esm/schemas/primitive/int_type.js +26 -17
- package/esm/schemas/primitive/long_type.d.ts +16 -5
- package/esm/schemas/primitive/long_type.js +30 -16
- package/esm/schemas/primitive/null_type.d.ts +15 -4
- package/esm/schemas/primitive/null_type.js +20 -7
- package/esm/schemas/primitive/primitive_type.d.ts +2 -0
- package/esm/schemas/primitive/primitive_type.js +4 -0
- package/esm/schemas/primitive/string_type.d.ts +17 -6
- package/esm/schemas/primitive/string_type.js +33 -18
- package/esm/schemas/resolver.d.ts +6 -0
- package/esm/schemas/type.d.ts +64 -4
- package/esm/schemas/type.js +97 -0
- package/esm/serialization/avro_file_parser_sync.d.ts +34 -0
- package/esm/serialization/avro_file_parser_sync.js +160 -0
- package/esm/serialization/avro_file_writer_sync.d.ts +47 -0
- package/esm/serialization/avro_file_writer_sync.js +211 -0
- package/esm/serialization/buffers/blob_readable_buffer.d.ts +4 -3
- package/esm/serialization/buffers/blob_readable_buffer.js +20 -6
- package/esm/serialization/buffers/buffer.d.ts +6 -1
- package/esm/serialization/buffers/buffer.js +3 -0
- package/esm/serialization/buffers/buffer_error.d.ts +28 -0
- package/esm/serialization/buffers/buffer_error.js +70 -0
- package/esm/serialization/buffers/buffer_sync.d.ts +51 -0
- package/esm/serialization/buffers/buffer_sync.js +4 -0
- package/esm/serialization/buffers/in_memory_buffer.d.ts +1 -0
- package/esm/serialization/buffers/in_memory_buffer.js +7 -5
- package/esm/serialization/buffers/in_memory_buffer_sync.d.ts +133 -0
- package/esm/serialization/buffers/in_memory_buffer_sync.js +259 -0
- package/esm/serialization/counting_writable_tap.d.ts +45 -0
- package/esm/serialization/counting_writable_tap.js +90 -0
- package/esm/serialization/counting_writable_tap_sync.d.ts +46 -0
- package/esm/serialization/counting_writable_tap_sync.js +87 -0
- package/esm/serialization/decoders/decoder_null_sync.d.ts +12 -0
- package/esm/serialization/decoders/decoder_null_sync.js +13 -0
- package/esm/serialization/decoders/decoder_sync.d.ts +15 -0
- package/esm/serialization/decoders/decoder_sync.js +1 -0
- package/esm/serialization/encoders/encoder_null_sync.d.ts +12 -0
- package/esm/serialization/encoders/encoder_null_sync.js +13 -0
- package/esm/serialization/encoders/encoder_sync.d.ts +15 -0
- package/esm/serialization/encoders/encoder_sync.js +1 -0
- package/esm/serialization/streams/fixed_size_stream_readable_buffer_adapter.d.ts +3 -2
- package/esm/serialization/streams/fixed_size_stream_readable_buffer_adapter.js +19 -9
- package/esm/serialization/streams/fixed_size_stream_reader_sync.d.ts +25 -0
- package/esm/serialization/streams/fixed_size_stream_reader_sync.js +63 -0
- package/esm/serialization/streams/fixed_size_stream_writer_sync.d.ts +45 -0
- package/esm/serialization/streams/fixed_size_stream_writer_sync.js +98 -0
- package/esm/serialization/streams/forward_only_stream_readable_buffer_adapter.d.ts +5 -3
- package/esm/serialization/streams/forward_only_stream_readable_buffer_adapter.js +18 -8
- package/esm/serialization/streams/stream_readable_buffer_adapter.d.ts +3 -2
- package/esm/serialization/streams/stream_readable_buffer_adapter.js +19 -6
- package/esm/serialization/streams/stream_readable_buffer_adapter_sync.d.ts +36 -0
- package/esm/serialization/streams/stream_readable_buffer_adapter_sync.js +93 -0
- package/esm/serialization/streams/stream_writable_buffer_adapter_sync.d.ts +45 -0
- package/esm/serialization/streams/stream_writable_buffer_adapter_sync.js +78 -0
- package/esm/serialization/streams/streams_sync.d.ts +36 -0
- package/esm/serialization/streams/streams_sync.js +4 -0
- package/esm/serialization/tap.d.ts +15 -32
- package/esm/serialization/tap.js +45 -134
- package/esm/serialization/tap_sync.d.ts +240 -0
- package/esm/serialization/tap_sync.js +545 -0
- package/esm/serialization/text_encoding.d.ts +16 -0
- package/esm/serialization/text_encoding.js +48 -1
- package/esm/type/create_type.d.ts +20 -0
- package/esm/type/create_type.js +49 -28
- package/package.json +1 -1
- package/esm/serialization/manipulate_bytes.d.ts +0 -6
- package/esm/serialization/manipulate_bytes.js +0 -13
- package/esm/serialization/read_uint_le.d.ts +0 -4
- package/esm/serialization/read_uint_le.js +0 -14
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ISyncReadable } from "./serialization/buffers/buffer_sync.js";
|
|
2
|
+
import { type SyncAvroFileParserOptions } from "./serialization/avro_file_parser_sync.js";
|
|
3
|
+
import type { ParsedAvroHeader } from "./serialization/avro_file_parser.js";
|
|
4
|
+
import type { SyncDecoderRegistry } from "./serialization/decoders/decoder_sync.js";
|
|
5
|
+
import type { ISyncStreamReadableBuffer } from "./serialization/streams/streams_sync.js";
|
|
6
|
+
/**
|
|
7
|
+
* Options shared by all SyncAvroReader factories.
|
|
8
|
+
*/
|
|
9
|
+
export interface SyncReaderSchemaOptions {
|
|
10
|
+
/** Optional reader schema used to resolve records written with a different schema. */
|
|
11
|
+
readerSchema?: SyncAvroFileParserOptions["readerSchema"];
|
|
12
|
+
/** Custom codec decoders. Cannot include "null" as it is built-in. */
|
|
13
|
+
decoders?: SyncDecoderRegistry;
|
|
14
|
+
/** Optional hook to call when closing the reader. */
|
|
15
|
+
closeHook?: () => void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Options accepted by {@link SyncAvroReader.fromBuffer}.
|
|
19
|
+
*/
|
|
20
|
+
export type SyncFromBufferOptions = SyncReaderSchemaOptions;
|
|
21
|
+
/**
|
|
22
|
+
* Options accepted by {@link SyncAvroReader.fromStream}.
|
|
23
|
+
*/
|
|
24
|
+
export type SyncFromStreamOptions = SyncReaderSchemaOptions;
|
|
25
|
+
/**
|
|
26
|
+
* Interface exposed by SyncAvroReader instances.
|
|
27
|
+
*/
|
|
28
|
+
export interface SyncAvroReaderInstance {
|
|
29
|
+
/** Returns the parsed Avro file header. */
|
|
30
|
+
getHeader(): ParsedAvroHeader;
|
|
31
|
+
/** Closes the reader and releases any resources. */
|
|
32
|
+
close(): void;
|
|
33
|
+
/** Returns an iterator over the Avro records. */
|
|
34
|
+
iterRecords(): IterableIterator<unknown>;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Public API for reading Avro object container files synchronously.
|
|
38
|
+
*/
|
|
39
|
+
export declare class SyncAvroReader {
|
|
40
|
+
/**
|
|
41
|
+
* Creates a reader from any synchronous readable buffer.
|
|
42
|
+
*/
|
|
43
|
+
static fromBuffer(buffer: ISyncReadable, options?: SyncFromBufferOptions): SyncAvroReaderInstance;
|
|
44
|
+
/**
|
|
45
|
+
* Creates a reader from a synchronous stream buffer by adapting it to ISyncReadable.
|
|
46
|
+
*/
|
|
47
|
+
static fromStream(stream: ISyncStreamReadableBuffer, options?: SyncFromStreamOptions): SyncAvroReaderInstance;
|
|
48
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _SyncAvroReaderInstanceImpl_parser, _SyncAvroReaderInstanceImpl_records, _SyncAvroReaderInstanceImpl_closeHook, _SyncAvroReaderInstanceImpl_closed;
|
|
13
|
+
import { SyncAvroFileParser, } from "./serialization/avro_file_parser_sync.js";
|
|
14
|
+
import { SyncStreamReadableBufferAdapter, } from "./serialization/streams/stream_readable_buffer_adapter_sync.js";
|
|
15
|
+
class SyncAvroReaderInstanceImpl {
|
|
16
|
+
constructor(parser, closeHook) {
|
|
17
|
+
_SyncAvroReaderInstanceImpl_parser.set(this, void 0);
|
|
18
|
+
_SyncAvroReaderInstanceImpl_records.set(this, void 0);
|
|
19
|
+
_SyncAvroReaderInstanceImpl_closeHook.set(this, void 0);
|
|
20
|
+
_SyncAvroReaderInstanceImpl_closed.set(this, false);
|
|
21
|
+
__classPrivateFieldSet(this, _SyncAvroReaderInstanceImpl_parser, parser, "f");
|
|
22
|
+
__classPrivateFieldSet(this, _SyncAvroReaderInstanceImpl_records, parser.iterRecords(), "f");
|
|
23
|
+
__classPrivateFieldSet(this, _SyncAvroReaderInstanceImpl_closeHook, closeHook, "f");
|
|
24
|
+
}
|
|
25
|
+
getHeader() {
|
|
26
|
+
return __classPrivateFieldGet(this, _SyncAvroReaderInstanceImpl_parser, "f").getHeader();
|
|
27
|
+
}
|
|
28
|
+
iterRecords() {
|
|
29
|
+
return __classPrivateFieldGet(this, _SyncAvroReaderInstanceImpl_records, "f");
|
|
30
|
+
}
|
|
31
|
+
close() {
|
|
32
|
+
if (__classPrivateFieldGet(this, _SyncAvroReaderInstanceImpl_closed, "f")) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (__classPrivateFieldGet(this, _SyncAvroReaderInstanceImpl_closeHook, "f")) {
|
|
36
|
+
try {
|
|
37
|
+
__classPrivateFieldGet(this, _SyncAvroReaderInstanceImpl_closeHook, "f").call(this);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
// Ignore close hook errors to keep shutdown best-effort.
|
|
41
|
+
}
|
|
42
|
+
__classPrivateFieldSet(this, _SyncAvroReaderInstanceImpl_closeHook, undefined, "f");
|
|
43
|
+
}
|
|
44
|
+
__classPrivateFieldSet(this, _SyncAvroReaderInstanceImpl_closed, true, "f");
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
_SyncAvroReaderInstanceImpl_parser = new WeakMap(), _SyncAvroReaderInstanceImpl_records = new WeakMap(), _SyncAvroReaderInstanceImpl_closeHook = new WeakMap(), _SyncAvroReaderInstanceImpl_closed = new WeakMap();
|
|
48
|
+
/**
|
|
49
|
+
* Public API for reading Avro object container files synchronously.
|
|
50
|
+
*/
|
|
51
|
+
export class SyncAvroReader {
|
|
52
|
+
/**
|
|
53
|
+
* Creates a reader from any synchronous readable buffer.
|
|
54
|
+
*/
|
|
55
|
+
static fromBuffer(buffer, options) {
|
|
56
|
+
const parser = new SyncAvroFileParser(buffer, {
|
|
57
|
+
readerSchema: options?.readerSchema,
|
|
58
|
+
decoders: options?.decoders,
|
|
59
|
+
});
|
|
60
|
+
return new SyncAvroReaderInstanceImpl(parser, options?.closeHook);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Creates a reader from a synchronous stream buffer by adapting it to ISyncReadable.
|
|
64
|
+
*/
|
|
65
|
+
static fromStream(stream, options) {
|
|
66
|
+
const adapter = new SyncStreamReadableBufferAdapter(stream);
|
|
67
|
+
const combinedCloseHook = options?.closeHook
|
|
68
|
+
? () => {
|
|
69
|
+
adapter.close();
|
|
70
|
+
options.closeHook?.();
|
|
71
|
+
}
|
|
72
|
+
: () => adapter.close();
|
|
73
|
+
return SyncAvroReader.fromBuffer(adapter, {
|
|
74
|
+
readerSchema: options?.readerSchema,
|
|
75
|
+
decoders: options?.decoders,
|
|
76
|
+
closeHook: combinedCloseHook,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ISyncWritable } from "./serialization/buffers/buffer_sync.js";
|
|
2
|
+
import { type SyncAvroWriterOptions } from "./serialization/avro_file_writer_sync.js";
|
|
3
|
+
import type { ISyncStreamWritableBuffer } from "./serialization/streams/streams_sync.js";
|
|
4
|
+
export type { SyncAvroWriterOptions } from "./serialization/avro_file_writer_sync.js";
|
|
5
|
+
/**
|
|
6
|
+
* Interface exposed by synchronous Avro writer instances.
|
|
7
|
+
*/
|
|
8
|
+
export interface SyncAvroWriterInstance {
|
|
9
|
+
/** Appends a record to the Avro container. */
|
|
10
|
+
append(record: unknown): void;
|
|
11
|
+
/** Forces the current batch of pending records to flush into a block. */
|
|
12
|
+
flushBlock(): void;
|
|
13
|
+
/** Flushes pending data and closes the writer. */
|
|
14
|
+
close(): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Public API for writing Avro object container files synchronously.
|
|
18
|
+
*/
|
|
19
|
+
export declare class SyncAvroWriter {
|
|
20
|
+
/**
|
|
21
|
+
* Creates a writer targeting any synchronous writable buffer.
|
|
22
|
+
*/
|
|
23
|
+
static toBuffer(buffer: ISyncWritable, options: SyncAvroWriterOptions): SyncAvroWriterInstance;
|
|
24
|
+
/**
|
|
25
|
+
* Creates a writer that pushes bytes to a synchronous stream sink.
|
|
26
|
+
*/
|
|
27
|
+
static toStream(stream: ISyncStreamWritableBuffer, options: SyncAvroWriterOptions): SyncAvroWriterInstance;
|
|
28
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _SyncAvroWriterInstanceImpl_writer, _SyncAvroWriterInstanceImpl_closeHook, _SyncAvroWriterInstanceImpl_closed;
|
|
13
|
+
import { SyncAvroFileWriter, } from "./serialization/avro_file_writer_sync.js";
|
|
14
|
+
import { SyncStreamWritableBufferAdapter, } from "./serialization/streams/stream_writable_buffer_adapter_sync.js";
|
|
15
|
+
class SyncAvroWriterInstanceImpl {
|
|
16
|
+
constructor(writer, closeHook) {
|
|
17
|
+
_SyncAvroWriterInstanceImpl_writer.set(this, void 0);
|
|
18
|
+
_SyncAvroWriterInstanceImpl_closeHook.set(this, void 0);
|
|
19
|
+
_SyncAvroWriterInstanceImpl_closed.set(this, false);
|
|
20
|
+
__classPrivateFieldSet(this, _SyncAvroWriterInstanceImpl_writer, writer, "f");
|
|
21
|
+
__classPrivateFieldSet(this, _SyncAvroWriterInstanceImpl_closeHook, closeHook, "f");
|
|
22
|
+
}
|
|
23
|
+
append(record) {
|
|
24
|
+
__classPrivateFieldGet(this, _SyncAvroWriterInstanceImpl_writer, "f").append(record);
|
|
25
|
+
}
|
|
26
|
+
flushBlock() {
|
|
27
|
+
__classPrivateFieldGet(this, _SyncAvroWriterInstanceImpl_writer, "f").flushBlock();
|
|
28
|
+
}
|
|
29
|
+
close() {
|
|
30
|
+
if (__classPrivateFieldGet(this, _SyncAvroWriterInstanceImpl_closed, "f")) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
__classPrivateFieldGet(this, _SyncAvroWriterInstanceImpl_writer, "f").close();
|
|
34
|
+
if (__classPrivateFieldGet(this, _SyncAvroWriterInstanceImpl_closeHook, "f")) {
|
|
35
|
+
__classPrivateFieldGet(this, _SyncAvroWriterInstanceImpl_closeHook, "f").call(this);
|
|
36
|
+
__classPrivateFieldSet(this, _SyncAvroWriterInstanceImpl_closeHook, undefined, "f");
|
|
37
|
+
}
|
|
38
|
+
__classPrivateFieldSet(this, _SyncAvroWriterInstanceImpl_closed, true, "f");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
_SyncAvroWriterInstanceImpl_writer = new WeakMap(), _SyncAvroWriterInstanceImpl_closeHook = new WeakMap(), _SyncAvroWriterInstanceImpl_closed = new WeakMap();
|
|
42
|
+
/**
|
|
43
|
+
* Public API for writing Avro object container files synchronously.
|
|
44
|
+
*/
|
|
45
|
+
export class SyncAvroWriter {
|
|
46
|
+
/**
|
|
47
|
+
* Creates a writer targeting any synchronous writable buffer.
|
|
48
|
+
*/
|
|
49
|
+
static toBuffer(buffer, options) {
|
|
50
|
+
const writer = new SyncAvroFileWriter(buffer, options);
|
|
51
|
+
return new SyncAvroWriterInstanceImpl(writer);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Creates a writer that pushes bytes to a synchronous stream sink.
|
|
55
|
+
*/
|
|
56
|
+
static toStream(stream, options) {
|
|
57
|
+
const adapter = new SyncStreamWritableBufferAdapter(stream);
|
|
58
|
+
const writer = new SyncAvroFileWriter(adapter, options);
|
|
59
|
+
return new SyncAvroWriterInstanceImpl(writer, () => {
|
|
60
|
+
adapter.close();
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -33,7 +33,7 @@ export declare class CircularBuffer {
|
|
|
33
33
|
/**
|
|
34
34
|
* Adds data to the buffer, sliding the window if necessary.
|
|
35
35
|
* @param data Uint8Array to add
|
|
36
|
-
* @throws
|
|
36
|
+
* @throws ReadBufferError if data size exceeds buffer capacity
|
|
37
37
|
*/
|
|
38
38
|
push(data: Uint8Array): void;
|
|
39
39
|
/**
|
|
@@ -41,8 +41,9 @@ export declare class CircularBuffer {
|
|
|
41
41
|
* @param start Start position relative to the overall data stream
|
|
42
42
|
* @param size Number of bytes to retrieve
|
|
43
43
|
* @returns Readonly view of the requested bytes (shallow copy, no allocation)
|
|
44
|
-
* @throws
|
|
45
|
-
* @throws RangeError if
|
|
44
|
+
* @throws ReadBufferError if start is before window start
|
|
45
|
+
* @throws RangeError if size is negative
|
|
46
|
+
* @throws ReadBufferError if requested range extends beyond window end
|
|
46
47
|
*/
|
|
47
48
|
get(start: number, size: number): Readonly<Uint8Array>;
|
|
48
49
|
}
|
|
@@ -10,6 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _CircularBuffer_instances, _CircularBuffer_buffer, _CircularBuffer_capacity, _CircularBuffer_windowStart, _CircularBuffer_windowEnd, _CircularBuffer_validateDataSize, _CircularBuffer_slideWindowIfNeeded, _CircularBuffer_addData, _CircularBuffer_validateGetParameters, _CircularBuffer_validateGetRange;
|
|
13
|
+
import { ReadBufferError } from "../../serialization/buffers/buffer_error.js";
|
|
13
14
|
/**
|
|
14
15
|
* A circular buffer implementation that maintains a rolling window of Uint8Array data.
|
|
15
16
|
* Uses copyWithin for efficient window sliding and provides memory-efficient random access.
|
|
@@ -68,7 +69,7 @@ export class CircularBuffer {
|
|
|
68
69
|
/**
|
|
69
70
|
* Adds data to the buffer, sliding the window if necessary.
|
|
70
71
|
* @param data Uint8Array to add
|
|
71
|
-
* @throws
|
|
72
|
+
* @throws ReadBufferError if data size exceeds buffer capacity
|
|
72
73
|
*/
|
|
73
74
|
push(data) {
|
|
74
75
|
if (data.length === 0) {
|
|
@@ -83,8 +84,9 @@ export class CircularBuffer {
|
|
|
83
84
|
* @param start Start position relative to the overall data stream
|
|
84
85
|
* @param size Number of bytes to retrieve
|
|
85
86
|
* @returns Readonly view of the requested bytes (shallow copy, no allocation)
|
|
86
|
-
* @throws
|
|
87
|
-
* @throws RangeError if
|
|
87
|
+
* @throws ReadBufferError if start is before window start
|
|
88
|
+
* @throws RangeError if size is negative
|
|
89
|
+
* @throws ReadBufferError if requested range extends beyond window end
|
|
88
90
|
*/
|
|
89
91
|
get(start, size) {
|
|
90
92
|
__classPrivateFieldGet(this, _CircularBuffer_instances, "m", _CircularBuffer_validateGetParameters).call(this, start, size);
|
|
@@ -95,7 +97,7 @@ export class CircularBuffer {
|
|
|
95
97
|
}
|
|
96
98
|
_CircularBuffer_buffer = new WeakMap(), _CircularBuffer_capacity = new WeakMap(), _CircularBuffer_windowStart = new WeakMap(), _CircularBuffer_windowEnd = new WeakMap(), _CircularBuffer_instances = new WeakSet(), _CircularBuffer_validateDataSize = function _CircularBuffer_validateDataSize(dataSize) {
|
|
97
99
|
if (dataSize > __classPrivateFieldGet(this, _CircularBuffer_capacity, "f")) {
|
|
98
|
-
throw new
|
|
100
|
+
throw new ReadBufferError(`Data size ${dataSize} exceeds buffer capacity ${__classPrivateFieldGet(this, _CircularBuffer_capacity, "f")}`, __classPrivateFieldGet(this, _CircularBuffer_windowEnd, "f"), dataSize, __classPrivateFieldGet(this, _CircularBuffer_capacity, "f"));
|
|
99
101
|
}
|
|
100
102
|
}, _CircularBuffer_slideWindowIfNeeded = function _CircularBuffer_slideWindowIfNeeded(dataSize) {
|
|
101
103
|
const currentLength = this.length();
|
|
@@ -116,7 +118,7 @@ _CircularBuffer_buffer = new WeakMap(), _CircularBuffer_capacity = new WeakMap()
|
|
|
116
118
|
__classPrivateFieldSet(this, _CircularBuffer_windowEnd, __classPrivateFieldGet(this, _CircularBuffer_windowEnd, "f") + data.length, "f");
|
|
117
119
|
}, _CircularBuffer_validateGetParameters = function _CircularBuffer_validateGetParameters(start, size) {
|
|
118
120
|
if (start < __classPrivateFieldGet(this, _CircularBuffer_windowStart, "f")) {
|
|
119
|
-
throw new
|
|
121
|
+
throw new ReadBufferError(`Start position ${start} is before window start ${__classPrivateFieldGet(this, _CircularBuffer_windowStart, "f")}`, start, size, __classPrivateFieldGet(this, _CircularBuffer_windowEnd, "f"));
|
|
120
122
|
}
|
|
121
123
|
if (size < 0) {
|
|
122
124
|
throw new RangeError(`Size ${size} cannot be negative`);
|
|
@@ -124,6 +126,6 @@ _CircularBuffer_buffer = new WeakMap(), _CircularBuffer_capacity = new WeakMap()
|
|
|
124
126
|
}, _CircularBuffer_validateGetRange = function _CircularBuffer_validateGetRange(start, size) {
|
|
125
127
|
const end = start + size;
|
|
126
128
|
if (end > __classPrivateFieldGet(this, _CircularBuffer_windowEnd, "f")) {
|
|
127
|
-
throw new
|
|
129
|
+
throw new ReadBufferError(`Requested range [${start}, ${end}) extends beyond window end ${__classPrivateFieldGet(this, _CircularBuffer_windowEnd, "f")}`, start, size, __classPrivateFieldGet(this, _CircularBuffer_windowEnd, "f"));
|
|
128
130
|
}
|
|
129
131
|
};
|
package/esm/mod.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import "./_dnt.polyfills.js";
|
|
2
2
|
export { AvroReader } from "./avro_reader.js";
|
|
3
3
|
export { AvroWriter } from "./avro_writer.js";
|
|
4
|
+
export { SyncAvroReader } from "./avro_reader_sync.js";
|
|
5
|
+
export { SyncAvroWriter } from "./avro_writer_sync.js";
|
|
4
6
|
export { createType } from "./type/create_type.js";
|
|
5
7
|
export { Type } from "./schemas/type.js";
|
|
6
8
|
export { BaseType } from "./schemas/base_type.js";
|
|
@@ -41,10 +43,16 @@ export type { AvroFileParserOptions, AvroHeader, ParsedAvroHeader, } from "./ser
|
|
|
41
43
|
export type { AvroWriterOptions } from "./serialization/avro_file_writer.js";
|
|
42
44
|
export { AvroFileParser } from "./serialization/avro_file_parser.js";
|
|
43
45
|
export { AvroFileWriter } from "./serialization/avro_file_writer.js";
|
|
46
|
+
export type { SyncAvroFileParserOptions } from "./serialization/avro_file_parser_sync.js";
|
|
47
|
+
export type { SyncAvroWriterOptions } from "./serialization/avro_file_writer_sync.js";
|
|
48
|
+
export { SyncAvroFileParser } from "./serialization/avro_file_parser_sync.js";
|
|
49
|
+
export { SyncAvroFileWriter } from "./serialization/avro_file_writer_sync.js";
|
|
44
50
|
export { BLOCK_TYPE, HEADER_TYPE, MAGIC_BYTES, } from "./serialization/avro_constants.js";
|
|
45
51
|
export type { IReadableAndWritableBuffer, IReadableBuffer, IWritableBuffer, } from "./serialization/buffers/buffer.js";
|
|
52
|
+
export type { ISyncReadable, ISyncWritable, } from "./serialization/buffers/buffer_sync.js";
|
|
46
53
|
export { BlobReadableBuffer } from "./serialization/buffers/blob_readable_buffer.js";
|
|
47
54
|
export { InMemoryReadableBuffer, InMemoryWritableBuffer, } from "./serialization/buffers/in_memory_buffer.js";
|
|
55
|
+
export { SyncInMemoryReadableBuffer, SyncInMemoryWritableBuffer, } from "./serialization/buffers/in_memory_buffer_sync.js";
|
|
48
56
|
export type { IStreamReadableBuffer, IStreamWritableBuffer, } from "./serialization/streams/streams.js";
|
|
49
57
|
export { StreamReadableBuffer } from "./serialization/streams/stream_readable_buffer.js";
|
|
50
58
|
export { StreamWritableBuffer } from "./serialization/streams/stream_writable_buffer.js";
|
|
@@ -52,12 +60,21 @@ export { StreamReadableBufferAdapter } from "./serialization/streams/stream_read
|
|
|
52
60
|
export { StreamWritableBufferAdapter } from "./serialization/streams/stream_writable_buffer_adapter.js";
|
|
53
61
|
export { FixedSizeStreamReadableBufferAdapter } from "./serialization/streams/fixed_size_stream_readable_buffer_adapter.js";
|
|
54
62
|
export { ForwardOnlyStreamReadableBufferAdapter } from "./serialization/streams/forward_only_stream_readable_buffer_adapter.js";
|
|
63
|
+
export type { ISyncStreamReadableBuffer, ISyncStreamWritableBuffer, } from "./serialization/streams/streams_sync.js";
|
|
64
|
+
export { SyncStreamReadableBufferAdapter } from "./serialization/streams/stream_readable_buffer_adapter_sync.js";
|
|
65
|
+
export { SyncStreamWritableBufferAdapter } from "./serialization/streams/stream_writable_buffer_adapter_sync.js";
|
|
66
|
+
export { SyncFixedSizeStreamReader } from "./serialization/streams/fixed_size_stream_reader_sync.js";
|
|
67
|
+
export { SyncFixedSizeStreamWriter } from "./serialization/streams/fixed_size_stream_writer_sync.js";
|
|
55
68
|
export type { Encoder } from "./serialization/encoders/encoder.js";
|
|
69
|
+
export type { SyncEncoder, SyncEncoderRegistry, } from "./serialization/encoders/encoder_sync.js";
|
|
56
70
|
export type { Decoder } from "./serialization/decoders/decoder.js";
|
|
71
|
+
export type { SyncDecoder, SyncDecoderRegistry, } from "./serialization/decoders/decoder_sync.js";
|
|
57
72
|
export { NullEncoder } from "./serialization/encoders/null_encoder.js";
|
|
58
73
|
export { DeflateEncoder } from "./serialization/encoders/deflate_encoder.js";
|
|
74
|
+
export { NullEncoderSync } from "./serialization/encoders/encoder_null_sync.js";
|
|
59
75
|
export { NullDecoder } from "./serialization/decoders/null_decoder.js";
|
|
60
76
|
export { DeflateDecoder } from "./serialization/decoders/deflate_decoder.js";
|
|
77
|
+
export { NullDecoderSync } from "./serialization/decoders/decoder_null_sync.js";
|
|
61
78
|
export type { ReadableTapLike, WritableTapLike } from "./serialization/tap.js";
|
|
62
79
|
export { ReadableTap, WritableTap } from "./serialization/tap.js";
|
|
63
80
|
export { decode, encode } from "./serialization/text_encoding.js";
|
package/esm/mod.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import "./_dnt.polyfills.js";
|
|
3
3
|
export { AvroReader } from "./avro_reader.js";
|
|
4
4
|
export { AvroWriter } from "./avro_writer.js";
|
|
5
|
+
export { SyncAvroReader } from "./avro_reader_sync.js";
|
|
6
|
+
export { SyncAvroWriter } from "./avro_writer_sync.js";
|
|
5
7
|
export { createType } from "./type/create_type.js";
|
|
6
8
|
// Schema types
|
|
7
9
|
export { Type } from "./schemas/type.js";
|
|
@@ -45,19 +47,28 @@ export { ValidationError } from "./schemas/error.js";
|
|
|
45
47
|
export { safeStringify } from "./schemas/json.js";
|
|
46
48
|
export { AvroFileParser } from "./serialization/avro_file_parser.js";
|
|
47
49
|
export { AvroFileWriter } from "./serialization/avro_file_writer.js";
|
|
50
|
+
export { SyncAvroFileParser } from "./serialization/avro_file_parser_sync.js";
|
|
51
|
+
export { SyncAvroFileWriter } from "./serialization/avro_file_writer_sync.js";
|
|
48
52
|
export { BLOCK_TYPE, HEADER_TYPE, MAGIC_BYTES, } from "./serialization/avro_constants.js";
|
|
49
53
|
export { BlobReadableBuffer } from "./serialization/buffers/blob_readable_buffer.js";
|
|
50
54
|
export { InMemoryReadableBuffer, InMemoryWritableBuffer, } from "./serialization/buffers/in_memory_buffer.js";
|
|
55
|
+
export { SyncInMemoryReadableBuffer, SyncInMemoryWritableBuffer, } from "./serialization/buffers/in_memory_buffer_sync.js";
|
|
51
56
|
export { StreamReadableBuffer } from "./serialization/streams/stream_readable_buffer.js";
|
|
52
57
|
export { StreamWritableBuffer } from "./serialization/streams/stream_writable_buffer.js";
|
|
53
58
|
export { StreamReadableBufferAdapter } from "./serialization/streams/stream_readable_buffer_adapter.js";
|
|
54
59
|
export { StreamWritableBufferAdapter } from "./serialization/streams/stream_writable_buffer_adapter.js";
|
|
55
60
|
export { FixedSizeStreamReadableBufferAdapter } from "./serialization/streams/fixed_size_stream_readable_buffer_adapter.js";
|
|
56
61
|
export { ForwardOnlyStreamReadableBufferAdapter } from "./serialization/streams/forward_only_stream_readable_buffer_adapter.js";
|
|
62
|
+
export { SyncStreamReadableBufferAdapter } from "./serialization/streams/stream_readable_buffer_adapter_sync.js";
|
|
63
|
+
export { SyncStreamWritableBufferAdapter } from "./serialization/streams/stream_writable_buffer_adapter_sync.js";
|
|
64
|
+
export { SyncFixedSizeStreamReader } from "./serialization/streams/fixed_size_stream_reader_sync.js";
|
|
65
|
+
export { SyncFixedSizeStreamWriter } from "./serialization/streams/fixed_size_stream_writer_sync.js";
|
|
57
66
|
export { NullEncoder } from "./serialization/encoders/null_encoder.js";
|
|
58
67
|
export { DeflateEncoder } from "./serialization/encoders/deflate_encoder.js";
|
|
68
|
+
export { NullEncoderSync } from "./serialization/encoders/encoder_null_sync.js";
|
|
59
69
|
export { NullDecoder } from "./serialization/decoders/null_decoder.js";
|
|
60
70
|
export { DeflateDecoder } from "./serialization/decoders/deflate_decoder.js";
|
|
71
|
+
export { NullDecoderSync } from "./serialization/decoders/decoder_null_sync.js";
|
|
61
72
|
export { ReadableTap, WritableTap } from "./serialization/tap.js";
|
|
62
73
|
// Utilities
|
|
63
74
|
export { decode, encode } from "./serialization/text_encoding.js";
|
|
@@ -19,6 +19,8 @@ export type IsValidOptions = {
|
|
|
19
19
|
* Subclasses must implement the remaining abstract methods.
|
|
20
20
|
*/
|
|
21
21
|
export declare abstract class BaseType<T = unknown> extends Type<T> {
|
|
22
|
+
/** Creates a new BaseType instance. */
|
|
23
|
+
protected constructor(validate?: boolean);
|
|
22
24
|
/**
|
|
23
25
|
* Deserializes an ArrayBuffer into a value using the schema.
|
|
24
26
|
* @param buffer The ArrayBuffer to deserialize.
|
|
@@ -38,4 +40,10 @@ export declare abstract class BaseType<T = unknown> extends Type<T> {
|
|
|
38
40
|
* @returns A resolver for reading the writer type as this type.
|
|
39
41
|
*/
|
|
40
42
|
createResolver(writerType: Type): Resolver;
|
|
43
|
+
/**
|
|
44
|
+
* Deserializes an ArrayBuffer into a value synchronously using the schema.
|
|
45
|
+
* @param buffer The ArrayBuffer to deserialize.
|
|
46
|
+
* @returns The deserialized value.
|
|
47
|
+
*/
|
|
48
|
+
fromSyncBuffer(buffer: ArrayBuffer): T;
|
|
41
49
|
}
|
package/esm/schemas/base_type.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReadableTap } from "../serialization/tap.js";
|
|
2
|
+
import { SyncReadableTap, } from "../serialization/tap_sync.js";
|
|
2
3
|
import { Type } from "./type.js";
|
|
3
4
|
import { Resolver } from "./resolver.js";
|
|
4
5
|
import { safeStringify } from "./json.js";
|
|
@@ -7,6 +8,10 @@ import { safeStringify } from "./json.js";
|
|
|
7
8
|
* Subclasses must implement the remaining abstract methods.
|
|
8
9
|
*/
|
|
9
10
|
export class BaseType extends Type {
|
|
11
|
+
/** Creates a new BaseType instance. */
|
|
12
|
+
constructor(validate = true) {
|
|
13
|
+
super(validate);
|
|
14
|
+
}
|
|
10
15
|
/**
|
|
11
16
|
* Deserializes an ArrayBuffer into a value using the schema.
|
|
12
17
|
* @param buffer The ArrayBuffer to deserialize.
|
|
@@ -40,10 +45,26 @@ export class BaseType extends Type {
|
|
|
40
45
|
async read(tap) {
|
|
41
46
|
return await this.readerType.read(tap);
|
|
42
47
|
}
|
|
48
|
+
readSync(tap) {
|
|
49
|
+
return this.readerType.readSync(tap);
|
|
50
|
+
}
|
|
43
51
|
}(this);
|
|
44
52
|
}
|
|
45
53
|
else {
|
|
46
54
|
throw new Error(`Schema evolution not supported from writer type: ${safeStringify(writerType.toJSON())} to reader type: ${safeStringify(this.toJSON())}`);
|
|
47
55
|
}
|
|
48
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Deserializes an ArrayBuffer into a value synchronously using the schema.
|
|
59
|
+
* @param buffer The ArrayBuffer to deserialize.
|
|
60
|
+
* @returns The deserialized value.
|
|
61
|
+
*/
|
|
62
|
+
fromSyncBuffer(buffer) {
|
|
63
|
+
const tap = new SyncReadableTap(buffer);
|
|
64
|
+
const value = this.readSync(tap);
|
|
65
|
+
if (!tap.isValid() || tap.getPos() !== buffer.byteLength) {
|
|
66
|
+
throw new Error("Insufficient data for type");
|
|
67
|
+
}
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
49
70
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReadableTapLike, WritableTapLike } from "../../serialization/tap.js";
|
|
2
2
|
import { BaseType } from "../base_type.js";
|
|
3
3
|
import { Resolver } from "../resolver.js";
|
|
4
4
|
import type { JSONType, Type } from "../type.js";
|
|
5
|
-
import {
|
|
5
|
+
import type { ErrorHook } from "../error.js";
|
|
6
|
+
import type { SyncReadableTapLike, SyncWritableTapLike } from "../../serialization/tap_sync.js";
|
|
6
7
|
/**
|
|
7
8
|
* Helper function to read an array from a tap.
|
|
8
9
|
* @param tap The tap to read from.
|
|
@@ -10,12 +11,21 @@ import { type ErrorHook } from "../error.js";
|
|
|
10
11
|
* @param collect Function to collect each read element.
|
|
11
12
|
*/
|
|
12
13
|
export declare function readArrayInto<T>(tap: ReadableTapLike, readElement: (tap: ReadableTapLike) => Promise<T>, collect: (value: T) => void): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Synchronous helper function to read an array from a tap.
|
|
16
|
+
* @param tap The tap to read from.
|
|
17
|
+
* @param readElement Function to read a single element.
|
|
18
|
+
* @param collect Function to collect each read element.
|
|
19
|
+
*/
|
|
20
|
+
export declare function readArrayIntoSync<T>(tap: SyncReadableTapLike, readElement: (tap: SyncReadableTapLike) => T, collect: (value: T) => void): void;
|
|
13
21
|
/**
|
|
14
22
|
* Parameters for creating an ArrayType.
|
|
15
23
|
*/
|
|
16
24
|
export interface ArrayTypeParams<T> {
|
|
17
25
|
/** The type of items in the array. */
|
|
18
26
|
items: Type<T>;
|
|
27
|
+
/** Whether to validate during writes. Defaults to true. */
|
|
28
|
+
validate?: boolean;
|
|
19
29
|
}
|
|
20
30
|
/**
|
|
21
31
|
* Avro `array` type for homogeneous collections of items described by a schema.
|
|
@@ -40,16 +50,22 @@ export declare class ArrayType<T = unknown> extends BaseType<T[]> {
|
|
|
40
50
|
*/
|
|
41
51
|
check(value: unknown, errorHook?: ErrorHook, path?: string[]): boolean;
|
|
42
52
|
/**
|
|
43
|
-
*
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
* Writes array without validation.
|
|
54
|
+
*/
|
|
55
|
+
writeUnchecked(tap: WritableTapLike, value: T[]): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Writes array without validation synchronously.
|
|
46
58
|
*/
|
|
47
|
-
|
|
59
|
+
writeSyncUnchecked(tap: SyncWritableTapLike, value: T[]): void;
|
|
48
60
|
/**
|
|
49
61
|
* Overrides the base skip method to skip over an array in the tap.
|
|
50
62
|
* @param tap The tap to skip from.
|
|
51
63
|
*/
|
|
52
64
|
skip(tap: ReadableTapLike): Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Advances the sync tap past the encoded array without decoding elements.
|
|
67
|
+
*/
|
|
68
|
+
skipSync(tap: SyncReadableTapLike): void;
|
|
53
69
|
/**
|
|
54
70
|
* Overrides the base read method to deserialize an array.
|
|
55
71
|
* @param tap The tap to read from.
|
|
@@ -57,11 +73,12 @@ export declare class ArrayType<T = unknown> extends BaseType<T[]> {
|
|
|
57
73
|
*/
|
|
58
74
|
read(tap: ReadableTapLike): Promise<T[]>;
|
|
59
75
|
/**
|
|
60
|
-
*
|
|
61
|
-
|
|
62
|
-
|
|
76
|
+
* Reads the entire array synchronously from the tap.
|
|
77
|
+
*/
|
|
78
|
+
/**
|
|
79
|
+
* Reads resolved elements synchronously through the item resolver.
|
|
63
80
|
*/
|
|
64
|
-
|
|
81
|
+
readSync(tap: SyncReadableTapLike): T[];
|
|
65
82
|
/**
|
|
66
83
|
* Overrides the base cloneFromValue method to clone an array.
|
|
67
84
|
* @param value The value to clone.
|
|
@@ -91,6 +108,10 @@ export declare class ArrayType<T = unknown> extends BaseType<T[]> {
|
|
|
91
108
|
* @returns A negative number if tap1 < tap2, zero if equal, positive if tap1 > tap2.
|
|
92
109
|
*/
|
|
93
110
|
match(tap1: ReadableTapLike, tap2: ReadableTapLike): Promise<number>;
|
|
111
|
+
/**
|
|
112
|
+
* Compares two sync taps that encode arrays for ordering.
|
|
113
|
+
*/
|
|
114
|
+
matchSync(tap1: SyncReadableTapLike, tap2: SyncReadableTapLike): number;
|
|
94
115
|
/**
|
|
95
116
|
* Creates a resolver for schema evolution between array types.
|
|
96
117
|
* @param writerType The writer's array type.
|