-
Notifications
You must be signed in to change notification settings - Fork 13
fix: KnockGuideStep type definition to return a promise from async methods #821
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
fix: KnockGuideStep type definition to return a promise from async methods #821
Conversation
🦋 Changeset detectedLatest commit: 37363d1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
| @@ -1,2 +1,2 @@ | |||
| nodejs 22.17.0 | |||
| nodejs 24.12.0 | |||
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.
Unrelated but upgrading the nodejs to v24, similar to what we did in dashboard: https://github.com/knocklabs/control/pull/6801
| message: { ...message }, | ||
| markAsSeen() { | ||
| // Send a seen event if it has not been previously seen. | ||
| if (this.message.seen_at) return; |
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.
markAsSeen and markAsArchived class methods already check the same thing and noop if already marked as such. This allows the return value types to be cleaner. i.e.
// This
markAsSeen: () => Promise<KnockGuideStep<TContent> | undefined>;
// Instead of
markAsSeen: () => Promise<KnockGuideStep<TContent> | undefined> | undefined;
MikeCarbone
left a comment
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. Can't remember release process off the dome, make sure this doesn't require a version number bump / changeset / something else before merging 👍
@MikeCarbone Yep just need a changeset to trigger the release pipeline. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #821 +/- ##
==========================================
+ Coverage 66.85% 67.10% +0.24%
==========================================
Files 189 189
Lines 7911 7962 +51
Branches 1005 1024 +19
==========================================
+ Hits 5289 5343 +54
- Misses 2597 2599 +2
+ Partials 25 20 -5
|

Description
Updates the
KnockGuideSteptype as reported here: https://knocklabs.slack.com/archives/C079G6X3DD4/p1768330901136269?thread_ts=1767880973.264099&cid=C079G6X3DD4The mark* methods are async so should wrap its return value in a promise.