Skip to content

Commit a37d160

Browse files
committed
Add @notundefined attribute to Stdlib_Iterator
1 parent 2e97c4c commit a37d160

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

runtime/Stdlib_Iterator.res

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

34
type value<'a> = {

runtime/Stdlib_Iterator.resi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ See [`iterator protocols`](https://developer.mozilla.org/en-US/docs/Web/JavaScri
77
/**
88
The type representing an iterator.
99
*/
10+
@notUndefined
1011
type t<'a>
1112

1213
/**

tests/tests/src/option_wrapping_test.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ let x30 = new ArrayBuffer(0);
4242

4343
let x31 = new DataView(new ArrayBuffer(0));
4444

45+
let x32 = new Map().values();
46+
4547
let x99 = {};
4648

4749
let x1 = "hello";
@@ -87,6 +89,7 @@ export {
8789
x29,
8890
x30,
8991
x31,
92+
x32,
9093
x98,
9194
x99,
9295
}

tests/tests/src/option_wrapping_test.res

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ let x28 = Some(Symbol.make(""))
2525
let x29 = Some(JsError.make(""))
2626
let x30 = Some(ArrayBuffer.make(0))
2727
let x31 = Some(ArrayBuffer.make(0)->DataView.fromBuffer)
28+
let x32 = Some((Map.make(): Map.t<string, string>)->Map.values)
2829

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

0 commit comments

Comments
 (0)