Skip to content

fix: update match parameter type - #16636

Merged
elliott-with-the-longest-name-on-github merged 3 commits into
version-3from
fix-match-types
Aug 5, 2026
Merged

elliott-with-the-longest-name-on-github merged 3 commits into
version-3from
fix-match-types

Conversation

@Rich-Harris

Copy link
Copy Markdown
Member

match can be given a URL or a string representing a pathname relative to the current location. Path is an enum of valid pathnames relative to the base path. In some cases these overlap, but it's by no means guaranteed, and the fact that there's an autocomplete dropdown is misleading and confusing.

In any case, the general idea of a function like match is that you don't know what the input is, so expecting a member of an enum rather than a string really makes no sense. This PR fixes it.


Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

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

3 participants