Skip to content

Commit aa51198

Browse files
authored
Merge pull request #2042 from immutable-js/test-seq-concat-typing
2 parents 2127c62 + 7b615ff commit aa51198

File tree

1 file changed

+14
-0
lines changed
  • type-definitions/ts-tests

1 file changed

+14
-0
lines changed

type-definitions/ts-tests/seq.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,17 @@ test('#size', () => {
1010
readonly size: number | undefined;
1111
}>();
1212
});
13+
14+
test('Set.Indexed concat', () => {
15+
let s: Seq.Indexed<number> = Seq([1]);
16+
expect(s).type.toBe<Seq.Indexed<number>>();
17+
expect(s.concat([4, 5, 6])).type.toBe<Seq.Indexed<number>>();
18+
expect(s.concat(Seq([4, 5, 6]))).type.toBe<Seq.Indexed<number>>();
19+
});
20+
21+
test('Set concat', () => {
22+
let s: Seq<unknown, unknown> = Seq([1]);
23+
expect(s).type.toBe<Seq<unknown, unknown>>();
24+
expect(s.concat([4, 5, 6])).type.toBe<Seq<unknown, unknown>>();
25+
expect(s.concat(Seq([4, 5, 6]))).type.toBe<Seq<unknown, unknown>>();
26+
});

0 commit comments

Comments
 (0)