Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"rollup": "3.28.1",
"size-limit": "^8.2.6",
"transducers-js": "0.4.174",
"tstyche": "^2.1.1",
"tstyche": "^3.0.0-rc.2",
"typescript": "5.1"
},
"size-limit": [
Expand Down
2 changes: 1 addition & 1 deletion tstyche.config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://tstyche.org/schemas/config.json",
"testFileMatch": [
"**/type-definitions/ts-tests/*.ts"
"type-definitions/ts-tests/*.ts"
]
}
6 changes: 2 additions & 4 deletions type-definitions/ts-tests/list.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test } from 'tstyche';
import { expect, pick, test } from 'tstyche';
import {
List,
get,
Expand All @@ -21,9 +21,7 @@ test('#constructor', () => {
});

test('#size', () => {
expect(List().size).type.toBeNumber();

expect(List()).type.toMatch<{ readonly size: number }>();
expect(pick(List(), 'size')).type.toBe<{ readonly size: number }>();
});

test('#setSize', () => {
Expand Down
6 changes: 2 additions & 4 deletions type-definitions/ts-tests/map.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test } from 'tstyche';
import { expect, pick, test } from 'tstyche';
import { Map, List, MapOf, OrderedMap } from 'immutable';

test('#constructor', () => {
Expand Down Expand Up @@ -45,9 +45,7 @@ test('#constructor', () => {
});

test('#size', () => {
expect(Map().size).type.toBeNumber();

expect(Map()).type.toMatch<{ readonly size: number }>();
expect(pick(Map(), 'size')).type.toBe<{ readonly size: number }>();
});

test('#get', () => {
Expand Down
6 changes: 2 additions & 4 deletions type-definitions/ts-tests/ordered-map.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test } from 'tstyche';
import { expect, pick, test } from 'tstyche';
import { OrderedMap, List } from 'immutable';

test('#constructor', () => {
Expand All @@ -20,9 +20,7 @@ test('#constructor', () => {
});

test('#size', () => {
expect(OrderedMap().size).type.toBeNumber();

expect(OrderedMap()).type.toMatch<{ readonly size: number }>();
expect(pick(OrderedMap(), 'size')).type.toBe<{ readonly size: number }>();
});

test('#get', () => {
Expand Down
6 changes: 2 additions & 4 deletions type-definitions/ts-tests/ordered-set.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test } from 'tstyche';
import { expect, pick, test } from 'tstyche';
import { Collection, OrderedSet, Map } from 'immutable';

test('#constructor', () => {
Expand All @@ -12,9 +12,7 @@ test('#constructor', () => {
});

test('#size', () => {
expect(OrderedSet().size).type.toBeNumber();

expect(OrderedSet()).type.toMatch<{ readonly size: number }>();
expect(pick(OrderedSet(), 'size')).type.toBe<{ readonly size: number }>();
});

test('.of', () => {
Expand Down
10 changes: 3 additions & 7 deletions type-definitions/ts-tests/record.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test } from 'tstyche';
import { expect, pick, test } from 'tstyche';
import { List, Map, MapOf, Record, RecordOf, Set } from 'immutable';

test('Factory', () => {
Expand All @@ -14,13 +14,9 @@ test('Factory', () => {
Record<{ x: number; y: number }> & Readonly<{ x: number; y: number }>
>();

expect(pointXY.x).type.toBeNumber();
expect(pick(pointXY, 'x')).type.toBe<{ readonly x: number }>();

expect(pointXY).type.toMatch<{ readonly x: number }>();

expect(pointXY.y).type.toBeNumber();

expect(pointXY).type.toMatch<{ readonly y: number }>();
expect(pick(pointXY, 'y')).type.toBe<{ readonly y: number }>();

expect(pointXY.toJS()).type.toBe<{ x: number; y: number }>();

Expand Down
8 changes: 4 additions & 4 deletions type-definitions/ts-tests/seq.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { expect, test } from 'tstyche';
import { expect, pick, test } from 'tstyche';
import { Seq } from 'immutable';

test('#constructor', () => {
expect(Seq([1, 2, 3])).type.toBe<Seq.Indexed<number>>();
});

test('#size', () => {
expect(Seq().size).type.toBe<number | undefined>();

expect(Seq()).type.toMatch<{ readonly size: number | undefined }>();
expect(pick(Seq(), 'size')).type.toBe<{
readonly size: number | undefined;
}>();
});
6 changes: 2 additions & 4 deletions type-definitions/ts-tests/set.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test } from 'tstyche';
import { expect, pick, test } from 'tstyche';
import { Set, Map, Collection, OrderedSet } from 'immutable';

test('#constructor', () => {
Expand All @@ -12,9 +12,7 @@ test('#constructor', () => {
});

test('#size', () => {
expect(Set().size).type.toBeNumber();

expect(Set()).type.toMatch<{ readonly size: number }>();
expect(pick(Set(), 'size')).type.toBe<{ readonly size: number }>();
});

test('.of', () => {
Expand Down
6 changes: 2 additions & 4 deletions type-definitions/ts-tests/stack.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test } from 'tstyche';
import { expect, pick, test } from 'tstyche';
import { Collection, Stack } from 'immutable';

test('#constructor', () => {
Expand All @@ -10,9 +10,7 @@ test('#constructor', () => {
});

test('#size', () => {
expect(Stack().size).type.toBeNumber();

expect(Stack()).type.toMatch<{ readonly size: number }>();
expect(pick(Stack(), 'size')).type.toBe<{ readonly size: number }>();
});

test('.of', () => {
Expand Down