Skip to content

Commit 20ad2af

Browse files
authored
revision to arrayNode.ts push API documentation (#26329)
### Summary The documentation of the `push` API in `arrayNode.ts` could cause confusion on what is unspecified by the API. Documentation has been updated to be specific as to what is unspecified.
1 parent 8bee98e commit 20ad2af

File tree

1 file changed

+5
-2
lines changed
  • packages/dds/tree/src/simple-tree/node-kinds/array

1 file changed

+5
-2
lines changed

packages/dds/tree/src/simple-tree/node-kinds/array/arrayNode.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,11 @@ export interface TreeArrayNode<
132132
* Inserts new item(s) at the end of the array.
133133
*
134134
* @remarks
135-
* This method has the same behavior as `{@link insertAtEnd}`.
136-
* The merge semantics for concurrent inserts or moves to the same position are unspecified.
135+
* The order of the inserted items relative to other concurrently inserted items at the same location is only partially specified:
136+
* Concurrently inserting `[A, B]` and `[X, Y]` at the same location may yield
137+
* either `[A, B, X, Y]` or `[X, Y, A, B]`, regardless of the order in which those edits are sequenced.
138+
* No other interleavings are possible. (e.g. `[A, X, B, Y]` is not possible.)
139+
*
137140
* @param value - The content to insert.
138141
*/
139142
push(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;

0 commit comments

Comments
 (0)