@andrew_l/tl-pack 0.3.22 → 0.4.1

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.cts DELETED
@@ -1,29 +0,0 @@
1
- import { B as BinaryWriterOptions, a as BinaryReaderOptions } from './shared/tl-pack.DM1wAuup.cjs';
2
- export { b as BinaryReader, c as BinaryWriter, C as CORE_TYPES, D as DecodeHandler, f as DefineStructureOptions, E as EncodeHandler, M as MAX_BUFFER_SIZE, S as Structure, T as TLExtension, d as createDictionary, e as createExtension, g as defineStructure } from './shared/tl-pack.DM1wAuup.cjs';
3
- import '@andrew_l/toolkit';
4
-
5
- /**
6
- * Encode any value into `Uint8Array`
7
- *
8
- * @example
9
- * const buffer = tlEncode(new Date(0));
10
- *
11
- * console.log(buffer); // Uint8Array([5, 0, 0, 0, 0, 0, 0, 0, 0])
12
- *
13
- * @group Main
14
- */
15
- declare function tlEncode(value: unknown, opts?: BinaryWriterOptions): Uint8Array;
16
- /**
17
- * Decode value from `Uint8Array`
18
- *
19
- * @example
20
- * const buffer = new Uint8Array([5, 0, 0, 0, 0, 0, 0, 0, 0]);
21
- * const value = tlDecode(buffer);
22
- *
23
- * console.log(value); // Thu Jan 01 1970 01:00:00 GMT+0100 (Central European Standard Time)
24
- *
25
- * @group Main
26
- */
27
- declare function tlDecode<T = any>(buffer: Uint8Array, opts?: BinaryReaderOptions): T;
28
-
29
- export { BinaryReaderOptions, BinaryWriterOptions, tlDecode, tlEncode };
package/dist/index.d.ts DELETED
@@ -1,29 +0,0 @@
1
- import { B as BinaryWriterOptions, a as BinaryReaderOptions } from './shared/tl-pack.DM1wAuup.js';
2
- export { b as BinaryReader, c as BinaryWriter, C as CORE_TYPES, D as DecodeHandler, f as DefineStructureOptions, E as EncodeHandler, M as MAX_BUFFER_SIZE, S as Structure, T as TLExtension, d as createDictionary, e as createExtension, g as defineStructure } from './shared/tl-pack.DM1wAuup.js';
3
- import '@andrew_l/toolkit';
4
-
5
- /**
6
- * Encode any value into `Uint8Array`
7
- *
8
- * @example
9
- * const buffer = tlEncode(new Date(0));
10
- *
11
- * console.log(buffer); // Uint8Array([5, 0, 0, 0, 0, 0, 0, 0, 0])
12
- *
13
- * @group Main
14
- */
15
- declare function tlEncode(value: unknown, opts?: BinaryWriterOptions): Uint8Array;
16
- /**
17
- * Decode value from `Uint8Array`
18
- *
19
- * @example
20
- * const buffer = new Uint8Array([5, 0, 0, 0, 0, 0, 0, 0, 0]);
21
- * const value = tlDecode(buffer);
22
- *
23
- * console.log(value); // Thu Jan 01 1970 01:00:00 GMT+0100 (Central European Standard Time)
24
- *
25
- * @group Main
26
- */
27
- declare function tlDecode<T = any>(buffer: Uint8Array, opts?: BinaryReaderOptions): T;
28
-
29
- export { BinaryReaderOptions, BinaryWriterOptions, tlDecode, tlEncode };