Skip to content

Commit a251145

Browse files
committed
remove Specifications section.
docs for assignMany but no examples.
1 parent 9a67b0c commit a251145

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/Core__Object.res

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,27 @@
1212
1313
**Note:** ReScript provides [first-class support for immutable objects](https://rescript-lang.org/docs/manual/latest/object), including spreading one object into another. This is often more convenient than using `assign`.
1414
15+
See [Object.assign on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) or [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign).
16+
1517
## Examples
1618
1719
```rescript
1820
Object.assign({"a": 1}, {"a": 2}) // {"a": 2}
1921
Object.assign({"a": 1, "b": 2}, {"a": 0}) // {"a": 0, "b": 2}
2022
Object.assign({"a": 1}, {"a": null}) // {"a": null}
2123
```
22-
## Specifications
23-
- [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign)
24-
- [Object.assign on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)
2524
*/
2625
@val
2726
external assign: ({..}, {..}) => {..} = "Object.assign"
28-
@variadic @val
27+
@variadic
28+
@val
29+
/**
30+
`assignMany(target, sources)` copies enumerable own properties from each source to the target, overwriting properties with the same name. Later sources' properties overwrite earlier ones. It returns the modified target object. A deep clone is not created; properties are copied by reference.
31+
32+
**Note:** ReScript provides [first-class support for immutable objects](https://rescript-lang.org/docs/manual/latest/object), including spreading one object into another. This is often more convenient than using `assign` or `assignMany`.
33+
34+
See [Object.assign on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) or [ECMAScript Language Specification](https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.assign).
35+
*/
2936
external assignMany: ({..}, array<{..}>) => {..} = "Object.assign"
3037
@val external copy: (@as(json`{}`) _, {..}) => {..} = "Object.assign"
3138

0 commit comments

Comments
 (0)