You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Core__Object.res
+15-19Lines changed: 15 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,8 @@
27
27
28
28
**Note:** `seal` returns the same object that was passed in; it does not create a copy. Any attempt to delete or add properties to a sealed object will fail, either silently or by throwing an error.
29
29
30
+
See [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.seal) and [Object.seal on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal)
31
+
30
32
## Examples
31
33
32
34
```rescript
@@ -36,32 +38,26 @@ point->Object.seal->ignore
36
38
point->Object.set("z", 9) // fails
37
39
point->Object.set("x", 13) // succeeds
38
40
```
39
-
## Specifications
40
-
- [Updating objects in Rescript](https://rescript-lang.org/docs/manual/latest/object#update)
41
-
- [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.seal)
42
-
- [Object.seal on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal)
`isSealed` determines if an object is sealed. A sealed object has a fixed set of properties.
51
-
52
-
## Examples
53
-
54
-
```rescript
55
-
let point = {"x": 1, "y": 3}->Object.seal
56
-
let pointIsSealed = point->Object.isSealed // true
57
-
let fruit = {"name": "Apple" }
58
-
let fruitIsSealed = fruit->Object.isSealed // false
59
-
```
60
-
## Specifications
61
-
- [Updating objects in Rescript](https://rescript-lang.org/docs/manual/latest/object#update)
62
-
- [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.issealed)
63
-
- [Object.isSealed on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed)
64
-
*/
48
+
`isSealed` determines if an object is sealed. A sealed object has a fixed set of properties.
49
+
50
+
See [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.issealed) and [Object.isSealed on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed)
51
+
52
+
## Examples
53
+
54
+
```rescript
55
+
let point = {"x": 1, "y": 3}->Object.seal
56
+
let pointIsSealed = point->Object.isSealed // true
57
+
let fruit = {"name": "Apple" }
58
+
let fruitIsSealed = fruit->Object.isSealed // false
0 commit comments