-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathWinRTTurboModule.js
More file actions
62 lines (51 loc) · 1.71 KB
/
WinRTTurboModule.js
File metadata and controls
62 lines (51 loc) · 1.71 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
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import * as TurboModuleRegistry from 'react-native/Libraries/TurboModule/TurboModuleRegistry';
module = TurboModuleRegistry.get('WinRTTurboModule');
if (module) {
module.initialize();
} else {
class Test {
_pass = 0;
_total = 1;
percentage() {
return this._pass / this._total * 100;
}
simple() {
++this._pass;
}
paramN(val) {
return { returnValue: val, b: val };
}
paramNWithRef(val) {
return { returnValue: val, c: val };
}
param1(val) { return this.paramN(val); }
param2(val) { return this.paramN(val); }
param3(val) { return this.paramN(val); }
param4(val) { return this.paramN(val); }
param5(val) { return this.paramN(val); }
param6(val) { return this.paramN(val); }
param7(val) { return this.paramN(val); }
param8(val) { return this.paramN(val); }
param9(val) { return this.paramN(val); }
param10(val) { return this.paramN(val); }
param11(val) { return this.paramN(val); }
param12(val) { return this.paramN(val); }
param13(val, valRef) { return this.paramNWithRef(val); }
param14(val, valRef) { return this.paramNWithRef(val); }
param15(val, valRef) { return this.paramNWithRef(val); }
addEventListener(name, fn) {}
removeEventListener(name, fn) {}
event1Call(val) {}
event2Call(val) {}
}
global.TestComponent = {
TestRunner: {
makeTests: () => {
return new Test();
},
},
};
}
export default module;