From d4c096b07ade20e89d6c4f965309519a35f76da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Rebours?= Date: Wed, 10 Jan 2024 16:29:22 +0100 Subject: [PATCH] Fix type of Cursor to extend Promise> instead of Promise (#45) --- CHANGELOG.md | 1 + index.d.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bfd2a20..a696c7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased ### Fixed - Explicitly import `buffer` [#34](https://github.com/seald/nedb/pull/34). +- Fix `Cursor`'s typings [#45](https://github.com/seald/nedb/issues/45) ## [4.0.3] - 2023-12-13 ### Fixed diff --git a/index.d.ts b/index.d.ts index 9c43a04..733b3c4 100644 --- a/index.d.ts +++ b/index.d.ts @@ -149,7 +149,7 @@ declare class Nedb> extends EventEmitter { } declare namespace Nedb { - interface Cursor extends Promise { + interface Cursor extends Promise> { sort(query: any): Cursor; skip(n: number): Cursor; limit(n: number): Cursor;