Skip to content

Commit 2e97c4c

Browse files
committed
Add @notundefined attribute to Stdlib_DataView
1 parent 6154df7 commit 2e97c4c

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

runtime/Stdlib_DataView.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@notUndefined
12
type t
23

34
@new external fromBuffer: Stdlib_ArrayBuffer.t => t = "DataView"

tests/tests/src/option_wrapping_test.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ let x29 = new Error("");
4040

4141
let x30 = new ArrayBuffer(0);
4242

43+
let x31 = new DataView(new ArrayBuffer(0));
44+
4345
let x99 = {};
4446

4547
let x1 = "hello";
@@ -84,6 +86,7 @@ export {
8486
x28,
8587
x29,
8688
x30,
89+
x31,
8790
x98,
8891
x99,
8992
}

tests/tests/src/option_wrapping_test.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ let x27 = Some(Float32Array.fromArray([1.0]))
2424
let x28 = Some(Symbol.make(""))
2525
let x29 = Some(JsError.make(""))
2626
let x30 = Some(ArrayBuffer.make(0))
27+
let x31 = Some(ArrayBuffer.make(0)->DataView.fromBuffer)
2728

2829
let x98 = Some(list{})
2930
let x99 = Some((Dict.make(): dict<string>))

0 commit comments

Comments
 (0)