@mtkruto/browser 0.0.801 → 0.0.821
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/client/client_plain.js +4 -3
- package/esm/connection/connection_web_socket.js +3 -1
- package/{types → esm}/mod.d.ts +1 -0
- package/esm/mod.js +1 -0
- package/{types → esm}/tl/1_tl_object.d.ts +5 -2
- package/esm/tl/1_tl_object.js +14 -7
- package/esm/tl/3_tl_reader.js +1 -1
- package/esm/tl/3_tl_writer.js +2 -1
- package/esm/tl/5_message.js +2 -2
- package/esm/utilities/1_message.js +2 -2
- package/package.json +3 -10
- package/script/_dnt.shims.d.ts +1 -0
- package/script/client/client.d.ts +50 -0
- package/script/client/client_abstract.d.ts +16 -0
- package/script/client/client_plain.d.ts +9 -0
- package/script/client/client_plain.js +4 -3
- package/script/connection/connection.d.ts +7 -0
- package/script/connection/connection_web_socket.d.ts +13 -0
- package/script/connection/connection_web_socket.js +3 -1
- package/script/constants.d.ts +12 -0
- package/script/deps/deno.land/std@0.186.0/fmt/colors.d.ts +270 -0
- package/script/deps/deno.land/std@0.186.0/testing/_diff.d.ts +26 -0
- package/script/deps/deno.land/std@0.186.0/testing/_format.d.ts +1 -0
- package/script/deps/deno.land/std@0.186.0/testing/asserts.d.ts +284 -0
- package/script/deps/deno.land/x/crc32@v0.2.0/mod.d.ts +15 -0
- package/script/deps/deno.land/x/tgcrypto@0.1.3/mod.d.ts +47 -0
- package/script/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.d.ts +2 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/gzip/gzip.d.ts +16 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/utils/uint8.d.ts +1 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/deflate.d.ts +29 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/inflate.d.ts +23 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/mod.d.ts +2 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/adler32.d.ts +1 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/crc32.d.ts +2 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/deflate.d.ts +78 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/gzheader.d.ts +12 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/inffast.d.ts +1 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/inflate.d.ts +47 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/inftrees.d.ts +1 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/messages.d.ts +12 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/status.d.ts +30 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/trees.d.ts +5 -0
- package/script/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/zstream.d.ts +14 -0
- package/script/deps.d.ts +4 -0
- package/script/mod.d.ts +24 -0
- package/script/mod.js +3 -1
- package/script/session/session.d.ts +12 -0
- package/script/session/session_local_storage.d.ts +7 -0
- package/script/session/session_memory.d.ts +5 -0
- package/script/tl/0_tl_raw_reader.d.ts +13 -0
- package/script/tl/0_tl_raw_writer.d.ts +13 -0
- package/script/tl/1_tl_object.d.ts +40 -0
- package/script/tl/1_tl_object.js +15 -8
- package/script/tl/2_types.d.ts +14815 -0
- package/script/tl/3_deserialize.d.ts +3 -0
- package/script/tl/3_functions.d.ts +6122 -0
- package/script/tl/3_tl_reader.d.ts +6 -0
- package/script/tl/3_tl_reader.js +2 -2
- package/script/tl/3_tl_writer.d.ts +5 -0
- package/script/tl/3_tl_writer.js +2 -1
- package/script/tl/4_rpc_result.d.ts +8 -0
- package/script/tl/5_message.d.ts +11 -0
- package/script/tl/5_message.js +1 -1
- package/script/tl/6_message_container.d.ts +9 -0
- package/script/transport/transport.d.ts +15 -0
- package/script/transport/transport_abridged.d.ts +11 -0
- package/script/transport/transport_intermediate.d.ts +11 -0
- package/script/transport/transport_provider.d.ts +17 -0
- package/script/types.d.ts +1 -0
- package/script/utilities/0_bigint.d.ts +5 -0
- package/script/utilities/0_buffer.d.ts +2 -0
- package/script/utilities/0_crypto.d.ts +8 -0
- package/script/utilities/0_hash.d.ts +2 -0
- package/script/utilities/1_auth.d.ts +1 -0
- package/script/utilities/1_message.d.ts +10 -0
- package/script/utilities/1_message.js +1 -1
- package/script/utilities/1_obfuscation.d.ts +6 -0
- package/script/utilities/1_password.d.ts +11 -0
- /package/{types → esm}/_dnt.shims.d.ts +0 -0
- /package/{types → esm}/client/client.d.ts +0 -0
- /package/{types → esm}/client/client_abstract.d.ts +0 -0
- /package/{types → esm}/client/client_plain.d.ts +0 -0
- /package/{types → esm}/connection/connection.d.ts +0 -0
- /package/{types → esm}/connection/connection_web_socket.d.ts +0 -0
- /package/{types → esm}/constants.d.ts +0 -0
- /package/{types → esm}/deps/deno.land/std@0.186.0/fmt/colors.d.ts +0 -0
- /package/{types → esm}/deps/deno.land/std@0.186.0/testing/_diff.d.ts +0 -0
- /package/{types → esm}/deps/deno.land/std@0.186.0/testing/_format.d.ts +0 -0
- /package/{types → esm}/deps/deno.land/std@0.186.0/testing/asserts.d.ts +0 -0
- /package/{types → esm}/deps/deno.land/x/crc32@v0.2.0/mod.d.ts +0 -0
- /package/{types → esm}/deps/deno.land/x/tgcrypto@0.1.3/mod.d.ts +0 -0
- /package/{types → esm}/deps/deno.land/x/tgcrypto@0.1.3/tgcrypto.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/gzip/gzip.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/utils/uint8.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/deflate.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/inflate.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/mod.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/adler32.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/crc32.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/deflate.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/gzheader.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/inffast.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/inflate.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/inftrees.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/messages.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/status.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/trees.d.ts +0 -0
- /package/{types → esm}/deps/raw.githubusercontent.com/MTKruto/compress/master/zlib/zlib/zstream.d.ts +0 -0
- /package/{types → esm}/deps.d.ts +0 -0
- /package/{types → esm}/session/session.d.ts +0 -0
- /package/{types → esm}/session/session_local_storage.d.ts +0 -0
- /package/{types → esm}/session/session_memory.d.ts +0 -0
- /package/{types → esm}/tl/0_tl_raw_reader.d.ts +0 -0
- /package/{types → esm}/tl/0_tl_raw_writer.d.ts +0 -0
- /package/{types → esm}/tl/2_types.d.ts +0 -0
- /package/{types/tl/3_tl_object_deserializer.d.ts → esm/tl/3_deserialize.d.ts} +0 -0
- /package/esm/tl/{3_tl_object_deserializer.js → 3_deserialize.js} +0 -0
- /package/{types → esm}/tl/3_functions.d.ts +0 -0
- /package/{types → esm}/tl/3_tl_reader.d.ts +0 -0
- /package/{types → esm}/tl/3_tl_writer.d.ts +0 -0
- /package/{types → esm}/tl/4_rpc_result.d.ts +0 -0
- /package/{types → esm}/tl/5_message.d.ts +0 -0
- /package/{types → esm}/tl/6_message_container.d.ts +0 -0
- /package/{types → esm}/transport/transport.d.ts +0 -0
- /package/{types → esm}/transport/transport_abridged.d.ts +0 -0
- /package/{types → esm}/transport/transport_intermediate.d.ts +0 -0
- /package/{types → esm}/transport/transport_provider.d.ts +0 -0
- /package/{types → esm}/types.d.ts +0 -0
- /package/{types → esm}/utilities/0_bigint.d.ts +0 -0
- /package/{types → esm}/utilities/0_buffer.d.ts +0 -0
- /package/{types → esm}/utilities/0_crypto.d.ts +0 -0
- /package/{types → esm}/utilities/0_hash.d.ts +0 -0
- /package/{types → esm}/utilities/1_auth.d.ts +0 -0
- /package/{types → esm}/utilities/1_message.d.ts +0 -0
- /package/{types → esm}/utilities/1_obfuscation.d.ts +0 -0
- /package/{types → esm}/utilities/1_password.d.ts +0 -0
- /package/script/tl/{3_tl_object_deserializer.js → 3_deserialize.js} +0 -0
package/script/deps.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from "./deps/deno.land/std@0.186.0/testing/asserts.js";
|
|
2
|
+
export { ctr256Decrypt, ctr256Encrypt, factorize, ige256Decrypt, ige256Encrypt, init as initTgCrypto } from "./deps/deno.land/x/tgcrypto@0.1.3/mod.js";
|
|
3
|
+
export { gunzip, gzip } from "./deps/raw.githubusercontent.com/MTKruto/compress/master/gzip/gzip.js";
|
|
4
|
+
export { Mutex } from "async-mutex";
|
package/script/mod.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { checkPassword } from "./utilities/1_password.js";
|
|
2
|
+
import { getRandomId } from "./utilities/0_bigint.js";
|
|
3
|
+
export declare const utils: {
|
|
4
|
+
checkPassword: typeof checkPassword;
|
|
5
|
+
getRandomId: typeof getRandomId;
|
|
6
|
+
};
|
|
7
|
+
export { as } from "./tl/1_tl_object.js";
|
|
8
|
+
export * as types from "./tl/2_types.js";
|
|
9
|
+
export * as functions from "./tl/3_functions.js";
|
|
10
|
+
export * from "./tl/4_rpc_result.js";
|
|
11
|
+
export * from "./tl/5_message.js";
|
|
12
|
+
export * from "./tl/6_message_container.js";
|
|
13
|
+
export * from "./client/client_plain.js";
|
|
14
|
+
export * from "./client/client.js";
|
|
15
|
+
export * from "./session/session.js";
|
|
16
|
+
export * from "./session/session_memory.js";
|
|
17
|
+
export * from "./session/session_local_storage.js";
|
|
18
|
+
export * from "./transport/transport_abridged.js";
|
|
19
|
+
export * from "./transport/transport_intermediate.js";
|
|
20
|
+
export * from "./transport/transport.js";
|
|
21
|
+
export * from "./transport/transport_provider.js";
|
|
22
|
+
export * from "./connection/connection.js";
|
|
23
|
+
export * from "./connection/connection_web_socket.js";
|
|
24
|
+
export { DEFAULT_APP_VERSION, DEFAULT_DEVICE_MODEL, DEFAULT_INITIAL_DC, DEFAULT_LANG_CODE, DEFAULT_LANG_PACK, DEFAULT_SYSTEM_LANG_CODE, DEFAULT_SYSTEM_VERSION, LAYER } from "./constants.js";
|
package/script/mod.js
CHANGED
|
@@ -26,10 +26,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
26
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.LAYER = exports.DEFAULT_SYSTEM_VERSION = exports.DEFAULT_SYSTEM_LANG_CODE = exports.DEFAULT_LANG_PACK = exports.DEFAULT_LANG_CODE = exports.DEFAULT_INITIAL_DC = exports.DEFAULT_DEVICE_MODEL = exports.DEFAULT_APP_VERSION = exports.functions = exports.types = exports.utils = void 0;
|
|
29
|
+
exports.LAYER = exports.DEFAULT_SYSTEM_VERSION = exports.DEFAULT_SYSTEM_LANG_CODE = exports.DEFAULT_LANG_PACK = exports.DEFAULT_LANG_CODE = exports.DEFAULT_INITIAL_DC = exports.DEFAULT_DEVICE_MODEL = exports.DEFAULT_APP_VERSION = exports.functions = exports.types = exports.as = exports.utils = void 0;
|
|
30
30
|
const _1_password_js_1 = require("./utilities/1_password.js");
|
|
31
31
|
const _0_bigint_js_1 = require("./utilities/0_bigint.js");
|
|
32
32
|
exports.utils = { checkPassword: _1_password_js_1.checkPassword, getRandomId: _0_bigint_js_1.getRandomId };
|
|
33
|
+
var _1_tl_object_js_1 = require("./tl/1_tl_object.js");
|
|
34
|
+
Object.defineProperty(exports, "as", { enumerable: true, get: function () { return _1_tl_object_js_1.as; } });
|
|
33
35
|
exports.types = __importStar(require("./tl/2_types.js"));
|
|
34
36
|
exports.functions = __importStar(require("./tl/3_functions.js"));
|
|
35
37
|
__exportStar(require("./tl/4_rpc_result.js"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MaybePromise } from "../types.js";
|
|
2
|
+
import { DC } from "../transport/transport_provider.js";
|
|
3
|
+
export declare abstract class Session {
|
|
4
|
+
dc: DC | null;
|
|
5
|
+
private _authKeyId;
|
|
6
|
+
private _authKey;
|
|
7
|
+
abstract load(): MaybePromise<void>;
|
|
8
|
+
abstract save(): MaybePromise<void>;
|
|
9
|
+
get authKeyId(): Promise<bigint | null>;
|
|
10
|
+
set authKey(authKey: Uint8Array | null);
|
|
11
|
+
get authKey(): Uint8Array | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class TLRawReader {
|
|
2
|
+
protected _buffer: Uint8Array;
|
|
3
|
+
constructor(_buffer: Uint8Array);
|
|
4
|
+
get buffer(): Uint8Array;
|
|
5
|
+
read(count: number): Uint8Array;
|
|
6
|
+
readInt24(signed?: boolean): number;
|
|
7
|
+
readInt32(signed?: boolean): number;
|
|
8
|
+
readInt64(signed?: boolean): bigint;
|
|
9
|
+
readInt128(signed?: boolean): bigint;
|
|
10
|
+
readInt256(signed?: boolean): bigint;
|
|
11
|
+
readBytes(): Uint8Array;
|
|
12
|
+
readString(): string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class TLRawWriter {
|
|
2
|
+
protected _buffer: Uint8Array;
|
|
3
|
+
constructor();
|
|
4
|
+
get buffer(): Uint8Array;
|
|
5
|
+
write(buffer: Uint8Array): this;
|
|
6
|
+
writeInt24(int: number, signed?: boolean): this;
|
|
7
|
+
writeInt32(int: number, signed?: boolean): this;
|
|
8
|
+
writeInt64(int: bigint, signed?: boolean): this;
|
|
9
|
+
writeInt128(int: bigint, signed?: boolean): this;
|
|
10
|
+
writeInt256(int: bigint, signed?: boolean): this;
|
|
11
|
+
writeBytes(bytes: Uint8Array): this;
|
|
12
|
+
writeString(string: string): this;
|
|
13
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
type MaybeArrayOf<T> = T | T[];
|
|
2
|
+
type MaybeInArray<T> = T | [T];
|
|
3
|
+
export type ParamDesc = ([
|
|
4
|
+
string,
|
|
5
|
+
MaybeInArray<typeof TLObject | typeof Uint8Array | "string" | "number" | "bigint" | "boolean" | "true">,
|
|
6
|
+
string
|
|
7
|
+
] | [string, typeof flags, "#"])[];
|
|
8
|
+
export type Param = null | MaybeArrayOf<string | number | bigint | boolean | Uint8Array | TLObject>;
|
|
9
|
+
export declare const flags: unique symbol;
|
|
10
|
+
export type Params = ([
|
|
11
|
+
Param,
|
|
12
|
+
MaybeInArray<typeof TLObject | typeof Uint8Array | "string" | "number" | "bigint" | "boolean" | "true">,
|
|
13
|
+
string
|
|
14
|
+
] | [string, typeof flags, "#"])[];
|
|
15
|
+
export declare const id: unique symbol;
|
|
16
|
+
export declare const params: unique symbol;
|
|
17
|
+
export declare const paramDesc: unique symbol;
|
|
18
|
+
export declare const length: unique symbol;
|
|
19
|
+
export declare const serialize: unique symbol;
|
|
20
|
+
export declare const as: unique symbol;
|
|
21
|
+
export declare function isOptionalParam(ntype: string): boolean;
|
|
22
|
+
export declare function analyzeOptionalParam(ntype: string): {
|
|
23
|
+
flagField: string;
|
|
24
|
+
bitIndex: number;
|
|
25
|
+
};
|
|
26
|
+
export declare abstract class TLObject {
|
|
27
|
+
protected abstract get [id](): number;
|
|
28
|
+
protected abstract get [params](): Params;
|
|
29
|
+
protected static get [paramDesc](): ParamDesc;
|
|
30
|
+
get [length](): number;
|
|
31
|
+
[serialize](): Uint8Array;
|
|
32
|
+
[as]<T extends TLObjectConstructor<InstanceType<T>>>(constructor: T): InstanceType<T>;
|
|
33
|
+
}
|
|
34
|
+
export type MaybeVectorTLObject = TLObject | Array<MaybeVectorTLObject | TLObject>;
|
|
35
|
+
export interface TLObjectConstructor<T = TLObject> {
|
|
36
|
+
new (params: any): T;
|
|
37
|
+
[paramDesc]: ParamDesc;
|
|
38
|
+
}
|
|
39
|
+
export declare function isTLObjectConstructor(t: unknown): t is typeof TLObject;
|
|
40
|
+
export {};
|
package/script/tl/1_tl_object.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isTLObjectConstructor = exports.TLObject = exports.analyzeOptionalParam = exports.isOptionalParam = exports.length = exports.paramDesc = exports.params = exports.id = exports.flags = void 0;
|
|
3
|
+
exports.isTLObjectConstructor = exports.TLObject = exports.analyzeOptionalParam = exports.isOptionalParam = exports.as = exports.serialize = exports.length = exports.paramDesc = exports.params = exports.id = exports.flags = void 0;
|
|
4
4
|
const deps_js_1 = require("../deps.js");
|
|
5
5
|
const _0_tl_raw_writer_js_1 = require("./0_tl_raw_writer.js");
|
|
6
6
|
exports.flags = Symbol("flags");
|
|
@@ -8,6 +8,8 @@ exports.id = Symbol("id");
|
|
|
8
8
|
exports.params = Symbol("params");
|
|
9
9
|
exports.paramDesc = Symbol("paramDesc");
|
|
10
10
|
exports.length = Symbol("length");
|
|
11
|
+
exports.serialize = Symbol();
|
|
12
|
+
exports.as = Symbol();
|
|
11
13
|
function isOptionalParam(ntype) {
|
|
12
14
|
return ntype.includes("?");
|
|
13
15
|
}
|
|
@@ -27,7 +29,7 @@ function serializeSingleParam(writer, value, type, ntype) {
|
|
|
27
29
|
if (isTLObjectConstructor(type)) {
|
|
28
30
|
if ((type.name == "TypeX" && value instanceof TLObject) ||
|
|
29
31
|
value instanceof type) {
|
|
30
|
-
writer.write(value.serialize());
|
|
32
|
+
writer.write(value[exports.serialize]());
|
|
31
33
|
return;
|
|
32
34
|
}
|
|
33
35
|
else {
|
|
@@ -92,10 +94,7 @@ function serializeSingleParam(writer, value, type, ntype) {
|
|
|
92
94
|
}
|
|
93
95
|
break;
|
|
94
96
|
case "true":
|
|
95
|
-
if (value
|
|
96
|
-
writer.writeInt32(0x997275B5);
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
97
|
+
if (value !== true) {
|
|
99
98
|
throw new TypeError("Expected true");
|
|
100
99
|
}
|
|
101
100
|
}
|
|
@@ -106,9 +105,9 @@ class TLObject {
|
|
|
106
105
|
return [];
|
|
107
106
|
}
|
|
108
107
|
get [exports.length]() {
|
|
109
|
-
return this.serialize().byteLength;
|
|
108
|
+
return this[exports.serialize]().byteLength;
|
|
110
109
|
}
|
|
111
|
-
serialize() {
|
|
110
|
+
[exports.serialize]() {
|
|
112
111
|
const writer = new _0_tl_raw_writer_js_1.TLRawWriter();
|
|
113
112
|
writer.writeInt32(this[exports.id], false);
|
|
114
113
|
for (const [value, type, ntype] of this[exports.params]) {
|
|
@@ -147,6 +146,14 @@ class TLObject {
|
|
|
147
146
|
}
|
|
148
147
|
return writer.buffer;
|
|
149
148
|
}
|
|
149
|
+
[exports.as](constructor) {
|
|
150
|
+
if (this instanceof constructor) {
|
|
151
|
+
return this;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
throw new TypeError(`Expected ${constructor.name}, got ${this.constructor.name}`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
150
157
|
}
|
|
151
158
|
exports.TLObject = TLObject;
|
|
152
159
|
function isTLObjectConstructor(t) {
|