forked from RocketChat/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.d.ts
77 lines (64 loc) · 1.7 KB
/
main.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import { EJSON } from 'meteor/ejson';
/* eslint-disable @typescript-eslint/interface-name-prefix */
declare module 'meteor/random' {
namespace Random {
function _randomString(numberOfChars: number, map: string): string;
}
}
declare module 'meteor/accounts-base' {
namespace Accounts {
function _bcryptRounds(): number;
function _getLoginToken(connectionId: string): string | undefined;
function insertUserDoc(options: Record<string, any>, user: Record<string, any>): string;
function _generateStampedLoginToken(): {token: string; when: Date};
}
}
declare module 'meteor/meteor' {
type globalError = Error;
namespace Meteor {
interface ErrorStatic {
new (error: string | number, reason?: string, details?: any): Error;
}
interface Error extends globalError {
error: string | number;
reason?: string;
details?: string | undefined;
}
const server: any;
interface MethodThisType {
twoFactorChecked: boolean | undefined;
}
}
}
declare module 'meteor/ddp-common' {
namespace DDPCommon {
function stringifyDDP(msg: EJSON): string;
function parseDDP(msg: string): EJSON;
}
}
declare module 'meteor/routepolicy' {
export class RoutePolicy {
static declare(urlPrefix: string, type: string): void;
}
}
declare module 'meteor/rocketchat:tap-i18n' {
namespace TAPi18n {
function __(s: string, options: { lng: string }): string;
}
}
declare module 'meteor/promise' {
namespace Promise {
function await(): any;
}
}
declare module 'meteor/littledata:synced-cron' {
interface ICronAddParameters {
name: string;
schedule: Function;
job: Function;
}
namespace SyncedCron {
function add(params: ICronAddParameters): string;
function remove(name: string): string;
}
}