Skip to content

Commit b0bfe1f

Browse files
committed
migrations for Js_extern
1 parent d04aba6 commit b0bfe1f

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
1+
@deprecated({
2+
reason: "Use `Nullable.isNullable` instead.",
3+
migrate: Nullable.isNullable(),
4+
})
15
external testAny: 'a => bool = "%is_nullable"
26

7+
@deprecated({
8+
reason: "Use `Nullable.null` instead.",
9+
migrate: Nullable.null,
10+
})
311
external null: Primitive_js_extern.null<'a> = "%null"
412

13+
@deprecated({
14+
reason: "Use `Nullable.undefined` instead.",
15+
migrate: Nullable.undefined,
16+
})
517
external undefined: Primitive_js_extern.null<'a> = "%undefined"
618

19+
@deprecated({
20+
reason: "Use `Type.typeof` instead.",
21+
migrate: Type.typeof(),
22+
})
723
external typeof: 'a => string = "%typeof"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Exercise migrations from Js_extern to new Stdlib APIs
2+
3+
let isNullish = Nullable.isNullable(%raw("null"))
4+
let n = Nullable.null
5+
let u = Nullable.undefined
6+
let ty = Type.typeof("hello")
7+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Exercise migrations from Js_extern to new Stdlib APIs
2+
3+
let isNullish = Js_extern.testAny(%raw("null"))
4+
let n = Js_extern.null
5+
let u = Js_extern.undefined
6+
let ty = Js_extern.typeof("hello")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This file is autogenerated so it can be type checked.
2+
// It's the migrated version of src/migrate/StdlibMigration_Extern.res.
3+
// Exercise migrations from Js_extern to new Stdlib APIs
4+
5+
let isNullish = Nullable.isNullable(%raw("null"))
6+
let n = Nullable.null
7+
let u = Nullable.undefined
8+
let ty = Type.typeof("hello")

0 commit comments

Comments
 (0)