forked from RocketChat/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.d.ts
More file actions
134 lines (106 loc) · 3.1 KB
/
main.d.ts
File metadata and controls
134 lines (106 loc) · 3.1 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import { EJSON } from 'meteor/ejson';
import { Db, Collection } from 'mongodb';
import { IStreamerConstructor } from './modules/streamer/streamer.module';
/* eslint-disable @typescript-eslint/interface-name-prefix */
declare module 'meteor/random' {
namespace Random {
function _randomString(numberOfChars: number, map: string): string;
}
}
declare module 'meteor/mongo' {
namespace MongoInternals {
function defaultRemoteCollectionDriver(): any;
}
}
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 | Record<string, string>;
}
const Streamer: IStreamerConstructor;
const server: any;
const runAsUser: (userId: string, scope: Function) => 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;
}
}
declare module 'meteor/mongo' {
interface RemoteCollectionDriver {
mongo: MongoConnection;
}
interface OplogHandle {
stop(): void;
onOplogEntry(trigger: Record<string, any>, callback: Function): void;
onSkippedEntries(callback: Function): void;
waitUntilCaughtUp(): void;
_defineTooFarBehind(value: number): void;
}
interface MongoConnection {
db: Db;
_oplogHandle: OplogHandle;
rawCollection(name: string): Collection;
}
namespace MongoInternals {
function defaultRemoteCollectionDriver(): RemoteCollectionDriver;
class ConnectionClass {}
function Connection(): ConnectionClass;
}
}
declare module 'async_hooks' {
export class AsyncLocalStorage<T> {
disable(): void;
getStore(): T | undefined;
run(store: T, callback: (...args: any[]) => void, ...args: any[]): void;
exit(callback: (...args: any[]) => void, ...args: any[]): void;
runSyncAndReturn<R>(store: T, callback: (...args: any[]) => R, ...args: any[]): R;
exitSyncAndReturn<R>(callback: (...args: any[]) => R, ...args: any[]): R;
enterWith(store: T): void;
}
}