Fix type of Cursor to extend Promise<Document<T>> instead of Promise<T> (#45)

feat/compaction-failure-event
Timothée Rebours 11 months ago
parent 29cce2da81
commit d4c096b07a
  1. 1
      CHANGELOG.md
  2. 2
      index.d.ts

@ -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

2
index.d.ts vendored

@ -149,7 +149,7 @@ declare class Nedb<Schema = Record<string, any>> extends EventEmitter {
}
declare namespace Nedb {
interface Cursor<T> extends Promise<T> {
interface Cursor<T> extends Promise<Document<T>> {
sort(query: any): Cursor<T>;
skip(n: number): Cursor<T>;
limit(n: number): Cursor<T>;

Loading…
Cancel
Save