Skip to content

Commit 57d0d14

Browse files
authored
Merge pull request #46 from mizdra/remove-const-type-parameter
Do not treat the arguments of `build` method as const type
2 parents f4edafd + b9fc584 commit 57d0d14

File tree

3 files changed

+62
-85
lines changed

3 files changed

+62
-85
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ expect(book0).toStrictEqual({
101101
title: expect.any(String),
102102
author: undefined,
103103
});
104-
assertType<{
104+
expectTypeOf(book0).toEqualTypeOf<{
105105
__typename: 'Book';
106106
id: string;
107107
title: string;
108108
author: undefined;
109-
}>(book0);
109+
}>();
110110

111111
// nested
112112
const book1 = await BookFactory.build({
@@ -123,7 +123,7 @@ expect(book1).toStrictEqual({
123123
books: undefined,
124124
},
125125
});
126-
assertType<{
126+
expectTypeOf(book1).toEqualTypeOf<{
127127
__typename: 'Book';
128128
id: string;
129129
title: string;
@@ -133,7 +133,7 @@ assertType<{
133133
name: string;
134134
books: undefined;
135135
};
136-
}>(book1);
136+
}>();
137137
```
138138

139139
## Notable features

0 commit comments

Comments
 (0)