diff --git a/src/index.d.ts b/src/index.d.ts index d7e3317b..dc7f41c1 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,5 +1,5 @@ import RPC from './rpc'; -import { Error, Methods } from './tl/types/schema'; +import { Methods } from './tl/types/schema'; type MethodReturnMap = { [K in keyof T]: T[K] extends { return: infer R } ? R : never; @@ -10,6 +10,12 @@ type MethodOptions = { dcId?: number; }; +type Error = { + _: string; + error_code: number; + error_message: string; +}; + declare class CustomStorage { set(key: string, value: string): Promise; get(key: string): Promise; @@ -26,7 +32,7 @@ declare class MTProto { }); /** - * @throws {MTProtoError} + * @throws {Error} */ call( method: T,