Skip to content

Commit

Permalink
remove Specifications section
Browse files Browse the repository at this point in the history
  • Loading branch information
jmagaram committed Mar 21, 2023
1 parent bfa541f commit b37ce6b
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions src/Core__Object.res
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
**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.
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)
## Examples
```rescript
Expand All @@ -36,32 +38,26 @@ point->Object.seal->ignore
point->Object.set("z", 9) // fails
point->Object.set("x", 13) // succeeds
```
## Specifications
- [Updating objects in Rescript](https://rescript-lang.org/docs/manual/latest/object#update)
- [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.seal)
- [Object.seal on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/seal)
*/
@val
external seal: 'a => 'a = "Object.seal"
@val external preventExtensions: 'a => 'a = "Object.preventExtensions"
@val external freeze: 'a => 'a = "Object.freeze"

/**
`isSealed` determines if an object is sealed. A sealed object has a fixed set of properties.
## Examples
```rescript
let point = {"x": 1, "y": 3}->Object.seal
let pointIsSealed = point->Object.isSealed // true
let fruit = {"name": "Apple" }
let fruitIsSealed = fruit->Object.isSealed // false
```
## Specifications
- [Updating objects in Rescript](https://rescript-lang.org/docs/manual/latest/object#update)
- [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.issealed)
- [Object.isSealed on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isSealed)
*/
`isSealed` determines if an object is sealed. A sealed object has a fixed set of properties.
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)
## Examples
```rescript
let point = {"x": 1, "y": 3}->Object.seal
let pointIsSealed = point->Object.isSealed // true
let fruit = {"name": "Apple" }
let fruitIsSealed = fruit->Object.isSealed // false
```
*/
@val
external isSealed: 'a => bool = "Object.isSealed"
@val external isFrozen: 'a => bool = "Object.isFrozen"
Expand Down

0 comments on commit b37ce6b

Please sign in to comment.