File tree Expand file tree Collapse file tree 2 files changed +36
-6
lines changed Expand file tree Collapse file tree 2 files changed +36
-6
lines changed Original file line number Diff line number Diff line change 1
1
// Generated by ReScript, PLEASE EDIT WITH CARE
2
2
3
3
4
- function check_null_typeof ( x ) {
4
+ function check_null_eq_typeof ( x ) {
5
5
if ( typeof x !== "boolean" || x !== null ) {
6
6
return 4 ;
7
7
} else {
8
8
return 3 ;
9
9
}
10
10
}
11
11
12
- function check_undefined_typeof ( x ) {
12
+ function check_null_neq_typeof ( x ) {
13
+ if ( typeof x !== "boolean" || x === null ) {
14
+ return 4 ;
15
+ } else {
16
+ return 3 ;
17
+ }
18
+ }
19
+
20
+ function check_undefined_eq_typeof ( x ) {
13
21
if ( typeof x !== "boolean" || x !== undefined ) {
14
22
return 4 ;
15
23
} else {
16
24
return 3 ;
17
25
}
18
26
}
19
27
28
+ function check_undefined_neq_typeof ( x ) {
29
+ if ( typeof x !== "boolean" || x === undefined ) {
30
+ return 4 ;
31
+ } else {
32
+ return 3 ;
33
+ }
34
+ }
35
+
20
36
export {
21
- check_null_typeof ,
22
- check_undefined_typeof ,
37
+ check_null_eq_typeof ,
38
+ check_null_neq_typeof ,
39
+ check_undefined_eq_typeof ,
40
+ check_undefined_neq_typeof ,
23
41
}
24
42
/* No side effect */
Original file line number Diff line number Diff line change 1
1
@unboxed
2
2
type t = | @as (null ) Null | @as (undefined ) Undefined | B (bool ) //| S(string)
3
3
4
- let check_null_typeof = x =>
4
+ let check_null_eq_typeof = x =>
5
5
switch x {
6
6
| B (_ ) if x == Null => 3
7
7
| _ => 4
8
8
}
9
9
10
- let check_undefined_typeof = x =>
10
+ let check_null_neq_typeof = x =>
11
+ switch x {
12
+ | B (_ ) if x != Null => 3
13
+ | _ => 4
14
+ }
15
+
16
+ let check_undefined_eq_typeof = x =>
11
17
switch x {
12
18
| B (_ ) if x == Undefined => 3
13
19
| _ => 4
14
20
}
21
+
22
+ let check_undefined_neq_typeof = x =>
23
+ switch x {
24
+ | B (_ ) if x != Undefined => 3
25
+ | _ => 4
26
+ }
You can’t perform that action at this time.
0 commit comments