Skip to content

Commit 18f77ce

Browse files
committed
StackCursor
1 parent 808b1e9 commit 18f77ce

File tree

7 files changed

+313
-197
lines changed

7 files changed

+313
-197
lines changed

__tests__/Cursor.ts

+6
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ describe('Cursor', () => {
4040
var aCursor = cursor.cursor('a');
4141
expect(cursor instanceof Immutable.Map).toBe(true);
4242
expect(aCursor instanceof Immutable.Vector).toBe(true);
43+
expect(
44+
aCursor.update(() => Immutable.Set.empty()) instanceof Immutable.Set
45+
).toBe(true);
46+
expect(
47+
aCursor.update(() => Immutable.Stack.empty()) instanceof Immutable.Stack
48+
).toBe(true);
4349
});
4450

4551
it('gets return new cursors', () => {

dist/Immutable.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1843,6 +1843,12 @@ declare module 'immutable' {
18431843
*/
18441844
push(...values: T[]): Stack<T>;
18451845

1846+
/**
1847+
* Alias for `Stack#unshiftAll`.
1848+
*/
1849+
pushAll(seq: Sequence<any, T>): Stack<T>;
1850+
pushAll(seq: Array<T>): Stack<T>;
1851+
18461852
/**
18471853
* Alias for `Stack#shift` and is not equivalent to `Vector#pop`.
18481854
*/

0 commit comments

Comments
 (0)