fix: Fix v1.lists.$select(id).remove and v1.statuses.$select(id).reblog() types#1381
Conversation
size-limit report 📦
|
commit: |
8e44d0c to
146f7c1
Compare
v1.statuses.$select(id).reblog() types
There was a problem hiding this comment.
Pull request overview
This PR appears to fix type-checking issues that were discovered when adding the --typecheck flag to Vitest. The changes correct type definitions in the Mastodon REST API client to better reflect actual API usage patterns.
- Made
ReblogStatusParams.visibilityoptional (matching its documented default behavior) - Fixed
Lists$SelectResource.removemethod signature to not require redundant parameters - Updated documentation comments and URLs for the reblog endpoint
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/mastodon/rest/v1/statuses.ts | Made visibility parameter optional in ReblogStatusParams (aligns with "Defaults to public" comment), updated "Re-share" to "Boost" terminology, and updated documentation URL |
| src/mastodon/rest/v1/lists.ts | Removed redundant string parameter from remove method (id is already provided via $select(id)) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| /** | ||
| * Re-share a status. | ||
| * Boost a status |
There was a problem hiding this comment.
The comment "Boost a status" is missing a period at the end, unlike other similar comments in this file (e.g., "Re-share a status." on line 238, "Feature one of your own public statuses at the top of your profile." on line 245). For consistency, it should be "Boost a status."
| * Boost a status | |
| * Boost a status. |
Closes #1379
I'm going to add typechecks within
npm testlater