-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathnative.js
61 lines (51 loc) · 1.13 KB
/
native.js
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
const { Interface/*::, Store*/ } = require('./store')
class NativeBoolean extends Interface {
constructor() {
super('Boolean', { native: true }, {})
}
}
class NativeTrue extends Interface {
constructor() {
super('True', { native: true }, {})
}
}
class NativeInteger extends Interface {
constructor() {
super('Integer', { native: true }, {})
}
}
class NativeFloat extends Interface {
constructor() {
super('Float', { native: true }, {})
}
}
/**
* @see https://core.telegram.org/bots/api#inlinequeryresultlocation
*/
class NativeFloatNumber extends Interface {
constructor() {
super('Float number', { native: true }, {})
}
}
class NativeString extends Interface {
constructor() {
super('String', { native: true }, {})
}
}
function addNatives(store/*: Store*/) {
store.add(new NativeBoolean())
store.add(new NativeTrue())
store.add(new NativeInteger())
store.add(new NativeFloat())
store.add(new NativeFloatNumber())
store.add(new NativeString())
}
module.exports = {
NativeBoolean,
NativeTrue,
NativeInteger,
NativeFloat,
NativeFloatNumber,
NativeString,
addNatives,
}