-
-
Notifications
You must be signed in to change notification settings - Fork 76
Expand file tree
/
Copy pathindex.ts
More file actions
24 lines (22 loc) · 607 Bytes
/
index.ts
File metadata and controls
24 lines (22 loc) · 607 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import * as Client from './plugin'
class MockClass {
on(_: string, __: (...args: Array<any>) => void) {
// No-op in production
}
onAll(_: (...args: Array<any>) => void) {
// No-op in production
}
onAllPluginEvents(_: (...args: Array<any>) => void) {
// No-op in production
}
emit(_: string, ...__: Array<any>) {
// No-op in production
}
getPluginId() {
// No-op in production
}
}
export const EventClient: (typeof Client)['EventClient'] =
process.env.NODE_ENV !== 'development' && process.env.NODE_ENV !== 'test'
? (MockClass as any)
: Client.EventClient