Skip to content

Commit 88d055e

Browse files
cknittzth
authored andcommitted
Clean up Nullable and Null
1 parent 1092f31 commit 88d055e

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Core__Null.res

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ type t<'a> = Js.Null.t<'a>
22

33
external asNullable: t<'a> => Core__Nullable.t<'a> = "%identity"
44

5-
external empty: t<'a> = "#null"
5+
external null: t<'a> = "#null"
66

77
external make: 'a => t<'a> = "%identity"
88

@@ -11,5 +11,5 @@ external toOption: t<'a> => option<'a> = "#null_to_opt"
1111
let fromOption: option<'a> => t<'a> = option =>
1212
switch option {
1313
| Some(x) => make(x)
14-
| None => empty
14+
| None => null
1515
}

src/Core__Nullable.res

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@ external null: t<'a> = "#null"
44

55
external undefined: t<'a> = "#undefined"
66

7-
external empty: t<'a> = "#undefined"
8-
97
external make: 'a => t<'a> = "%identity"
108

119
external toOption: t<'a> => option<'a> = "#nullable_to_opt"
1210

1311
let fromOption: option<'a> => t<'a> = option =>
1412
switch option {
1513
| Some(x) => make(x)
16-
| None => empty
14+
| None => undefined
1715
}

0 commit comments

Comments
 (0)