diff --git a/test/types/basics.test.ts b/test/types/basics.test.ts index f7415c76..44445076 100644 --- a/test/types/basics.test.ts +++ b/test/types/basics.test.ts @@ -22,7 +22,7 @@ describe('=> Basics (TypeScript)', function() { } // TODO: should be generated or automated with decorator - id: number; + id: bigint; createdAt: Date; updatedAt: Date; deletedAt: Date; @@ -135,6 +135,8 @@ describe('=> Basics (TypeScript)', function() { it('Post.findOne()', async function() { const post = await Post.findOne({ title: 'Leah' }); assert.equal(post.title, 'Leah'); + const post1 = await Post.findOne({ id: post.id }); + assert.equal(post1.id, post.id); }); it('Post.where()', async function() { diff --git a/types/index.d.ts b/types/index.d.ts index 9f6e6a9e..774c14c8 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -111,7 +111,7 @@ export class Spell | Collection