Skip to content

Add missing strict mode reserved keywords - #298

Merged
joetannenbaum merged 1 commit into
nextfrom
additional-reserved-keywords
Aug 10, 2026
Merged

Add missing strict mode reserved keywords#298
joetannenbaum merged 1 commit into
nextfrom
additional-reserved-keywords

Conversation

@joetannenbaum

Copy link
Copy Markdown
Collaborator

The RESERVED_KEYWORDS list was missing everything that JavaScript only reserves in strict mode, plus await and enum. Since Wayfinder generates ES modules, and modules are always strict, a route method or enum case named public produced export const public = ..., which is a syntax error.

Adds await, enum, implements, interface, let, package, private, protected, public, static and yield, so those names now get the usual suffix treatment (public becomes publicMethod).

@joetannenbaum
joetannenbaum merged commit 405c71f into next Aug 10, 2026
11 checks passed
@joetannenbaum
joetannenbaum deleted the additional-reserved-keywords branch August 10, 2026 22:00
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