Skip to content

Conversation

@dummdidumm
Copy link
Member

closes #9339

Please don't delete this checklist! 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
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

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

ts.isFunctionDeclaration(statement) &&
statement.name &&
statement.modifiers?.[0]?.kind === ts.SyntaxKind.ExportKeyword
ts.getModifiers(statement)?.[0]?.kind === ts.SyntaxKind.ExportKeyword
Copy link
Member

Choose a reason for hiding this comment

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

I'm wondering why you checked ts.canHaveModifiers in the other two files but not this one

Copy link
Member Author

@dummdidumm dummdidumm Mar 8, 2023

Choose a reason for hiding this comment

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

Because the statement node already is marked as being able to have modifiers through its type.

@benmccann benmccann merged commit 18d7e81 into master Mar 8, 2023
@benmccann benmccann deleted the replace-modifiers branch March 8, 2023 16:06
@github-actions github-actions bot mentioned this pull request Mar 8, 2023
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.

TypeScript 5 support

3 participants