Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed type on getTimestamp() #47

Merged
merged 1 commit into from
Mar 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion objectid.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ declare interface ObjectID {

toHexString(): string;
equals(other: ObjectID): boolean;
getTimestamp(): number;
getTimestamp(): Date;
}

declare interface ObjectIDCtor {
Expand Down
305 changes: 289 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"homepage": "https://github.com/williamkapke/bson-objectid",
"devDependencies": {
"@types/node": "^8.0.31",
"mocha": "^5.2.0",
"should": "^4.1.0",
"typescript": "^2.5.3",
"mocha": "^5.2.0"
"typescript": "^4.6.2"
}
}
2 changes: 1 addition & 1 deletion typing-tests/objectid-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ oid = ObjectID(idString);

// ----------------------------------------------------------------------------
// should correctly retrieve timestamp
const timestamp:number = oid.getTimestamp();
const timestamp:Date = oid.getTimestamp();

// ----------------------------------------------------------------------------
// should validate valid hex strings
Expand Down