-
Notifications
You must be signed in to change notification settings - Fork 211
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
first pass at a typescript declaration file #334
Conversation
Nice! fyi @TimMensch that this is in progress |
Thanks for the update and quick response. :) |
I'm going to merge this so there is something and we can iterate on it further if there are any issues. |
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.
Incorrect declarations of optional types
export = Rollbar; | ||
|
||
declare class Rollbar { | ||
constructor(options: Rollbar.Configuration?); |
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.
should be constructor(options?: Rollbar.Configuration);
|
||
public global(options: Rollbar.Configuration): Rollbar; | ||
public configure(options: Rollbar.Configuration): Rollbar; | ||
public lastError(): Error?; |
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.
should be public lastError(): Error | undefined;
captureUncaught?: boolean; | ||
captureUnhandledRejections?: boolean; | ||
} | ||
export type Callback = (err: Error?, response: object) => void; |
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.
should be export type Callback = (err: Error | undefined, response: object) => void;
first pass at a typescript declaration file
Addresses #302