-
Notifications
You must be signed in to change notification settings - Fork 4
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
TypeScript Declarations #27
Conversation
@dengelke - Whenever you have few minutes... :) |
Thanks @pvoisin will give it a look! |
lib/record.js
Outdated
@@ -8,11 +8,12 @@ function Record(record) { | |||
|
|||
Record.prototype = { | |||
get: function (type) { | |||
return this._record.get(type); | |||
return this._record?.get(type); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this syntax breaks older versions of node.js, see failing tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, snap! Let me change this to something backward-compatible then...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just remade the commit - hopefully it works now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks for resolving
e27d9ad
to
922e25a
Compare
Here's an attempt to ship TypeScript declarations with the module so it can be used in TypeScript projects.
Also, while trying out existing code and browsing the source files I found little issues that I've fixed.