Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Commit e98bfb5

Browse files
committed
Fix Error type
1 parent 7a5d10c commit e98bfb5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/index.d.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import RPC from './rpc';
2-
import { Error, Methods } from './tl/types/schema';
2+
import { Methods } from './tl/types/schema';
33

44
type MethodReturnMap<T extends Methods> = {
55
[K in keyof T]: T[K] extends { return: infer R } ? R : never;
@@ -10,6 +10,12 @@ type MethodOptions = {
1010
dcId?: number;
1111
};
1212

13+
type Error = {
14+
_: string;
15+
error_code: number;
16+
error_message: string;
17+
};
18+
1319
declare class CustomStorage {
1420
set(key: string, value: string): Promise<void>;
1521
get(key: string): Promise<string | null>;
@@ -26,7 +32,7 @@ declare class MTProto {
2632
});
2733

2834
/**
29-
* @throws {MTProtoError}
35+
* @throws {Error}
3036
*/
3137
call<T extends keyof Methods>(
3238
method: T,

0 commit comments

Comments
 (0)