typescript: accept contextual function names - #52
Merged
Conversation
PerishCode
marked this pull request as ready for review
June 25, 2026 10:23
PerishCode
enabled auto-merge (squash)
June 25, 2026 10:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
TypeScript function declarations can legally use contextual accessor words such
as
getas ordinary function names. The parser previously treatedgetonly asan accessor keyword in this position, so valid wrapper std helpers like
function get(name: string, fallback = ""): string { ... }produced parseerrors.
Refs #51.
What
getandsetas contextual names in TypeScript functiondeclarations.
function get(...)declaration followed by anexported object shorthand reference.
Tests
cargo fmt --all --checkcargo test --locked -p flavor-plugin-typescriptcargo clippy --locked --workspace --all-targets -- -D warningscargo test --locked --workspacecargo run --locked -p flavor-cli -- check --root . --config flavor.tomlv0.3.5-beta.1from this branch:https://github.com/PerishCode/flavor/actions/runs/28160836591
flavor v0.3.5-beta.1PerishCode/runsealfeat/deno-tool-surface-slimwith:flavor check --root . --config flavor.tomldeno check --config .runseal/deno.json --lock deno.lock --frozen=true ...