Skip to content

Conversation

@ryanatkn
Copy link

@ryanatkn ryanatkn commented Dec 9, 2025

Decorators on abstract classes currently fail to parse when not exported:

@decorator
abstract class ExampleClass {}

SyntaxError: Leading decorators must be attached to a class declaration.

Already works:

@decorator
export abstract class ExampleClass {}

This fixes it, adding the test case and a second for when export is included, which already works.

@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2025

🦋 Changeset detected

Latest commit: 0fc2305

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/acorn-typescript 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

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