Skip to content

Commit

Permalink
Fix type of Cursor to extend Promise<Document<T>> instead of Promise<…
Browse files Browse the repository at this point in the history
…T> (#45)
  • Loading branch information
Timothée Rebours committed Jan 10, 2024
1 parent 29cce2d commit d4c096b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down

0 comments on commit d4c096b

Please sign in to comment.