-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Upgrade TypeScript to 4.7 #21
Conversation
Bump TypeScript and fix compile errors. Specifically, an error that's caught is now typed as `unknown`, so accessing `message` on that error object won't work anymore. This is fixed using a type guard. Also bump `typedoc` to fix peer dependency warnings.
"typedoc": "^0.22.15", | ||
"typescript": "^4.2.4" | ||
"typedoc": "^0.23.10", | ||
"typescript": "~4.7.4" |
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.
Why ~
instead of ˆ
?
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.
TypeScript doesn't follow SemVer; minor changes are breaking
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.
LGTM!
* @param error - The object to check. | ||
* @returns True or false, depending on the result. | ||
*/ | ||
function isErrorWithMessage(error: unknown): error is { message: string } { |
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.
Oh, I guess it wants a unit test for this
Unit tests added ☝🏻 |
Bump TypeScript and fix compile errors. Specifically, an error that's
caught is now typed as
unknown
, so accessingmessage
on that errorobject won't work anymore. This is fixed using a type guard.
Also bump
typedoc
to fix peer dependency warnings.