Skip to content

fix: Fix v1.lists.$select(id).remove and v1.statuses.$select(id).reblog() types#1381

Merged
neet merged 1 commit into
mainfrom
typecheck-tests
Dec 10, 2025
Merged

fix: Fix v1.lists.$select(id).remove and v1.statuses.$select(id).reblog() types#1381
neet merged 1 commit into
mainfrom
typecheck-tests

Conversation

@neet

@neet neet commented Dec 10, 2025

Copy link
Copy Markdown
Owner

Closes #1379

I'm going to add typechecks within npm test later

Copilot AI review requested due to automatic review settings December 10, 2025 09:07
@github-actions

github-actions Bot commented Dec 10, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
rest 3.9 KB (0%)
streaming 3.86 KB (0%)
oauth 3.9 KB (0%)

@pkg-pr-new

pkg-pr-new Bot commented Dec 10, 2025

Copy link
146f7c1_ " data-view-component="true" class="dropdown-item btn-link"> Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/neet/masto.js/masto@1381

commit: 146f7c1

@neet neet changed the title chore: Add --typecheck as a Vitest argument fix: Fix v1.lists.$select(id).remove and v1.statuses.$select(id).reblog() types Dec 10, 2025
@neet neet enabled auto-merge (squash) December 10, 2025 09:15
@neet neet merged commit f9d0576 into main Dec 10, 2025
7 checks passed
@neet neet deleted the typecheck-tests branch December 10, 2025 09:20
@neet neet mentioned this pull request Dec 10, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.visibility optional (matching its documented default behavior)
  • Fixed Lists$SelectResource.remove method 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

Copilot AI Dec 10, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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."

Suggested change
* Boost a status
* Boost a status.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

typecheck error on rest.v1.lists.$select().remove() and others

2 participants