Skip to content

fix: expose CompileError interface, not class #12255

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

Merged
merged 2 commits into from
Jul 2, 2024
Merged

Conversation

Rich-Harris
Copy link
Member

We expose the CompileError interface, but we don't want to expose the class (all compile errors should come from within the compiler; it shouldn't be possible for someone to create their own).

Currently, we get this wrong — we export the class rather than the interface. This fixes it, and removes some duplication.

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests and linting

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

Copy link

changeset-bot bot commented Jul 1, 2024

🦋 Changeset detected

Latest commit: f9fffe2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
svelte Patch

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

@Rich-Harris
Copy link
Member Author

gonna go ahead and merge this to unblock #12239, because if we don't merge that we're gonna end up with hella conflicts

@Rich-Harris Rich-Harris merged commit bcf23ca into main Jul 2, 2024
9 checks passed
@Rich-Harris Rich-Harris deleted the refactor-compile-error branch July 2, 2024 02:05
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.

1 participant