Skip to content

typescript: accept contextual function names - #52

Merged
PerishCode merged 1 commit into
mainfrom
typescript/function-get-name
Jun 25, 2026
Merged

typescript: accept contextual function names#52
PerishCode merged 1 commit into
mainfrom
typescript/function-get-name

Conversation

@PerishCode

Copy link
Copy Markdown
Owner

Why

TypeScript function declarations can legally use contextual accessor words such
as get as ordinary function names. The parser previously treated get only as
an accessor keyword in this position, so valid wrapper std helpers like
function get(name: string, fallback = ""): string { ... } produced parse
errors.

Refs #51.

What

  • Allow get and set as contextual names in TypeScript function
    declarations.
  • Add parser coverage for a function get(...) declaration followed by an
    exported object shorthand reference.

Tests

  • cargo fmt --all --check
  • cargo test --locked -p flavor-plugin-typescript
  • cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo test --locked --workspace
  • cargo run --locked -p flavor-cli -- check --root . --config flavor.toml
  • Published beta v0.3.5-beta.1 from this branch:
    https://github.com/PerishCode/flavor/actions/runs/28160836591
  • Updated local CLI to flavor v0.3.5-beta.1
  • Verified the reporter scenario in PerishCode/runseal
    feat/deno-tool-surface-slim with:
    • flavor check --root . --config flavor.toml
    • deno check --config .runseal/deno.json --lock deno.lock --frozen=true ...

@PerishCode
PerishCode marked this pull request as ready for review June 25, 2026 10:23
@PerishCode
PerishCode enabled auto-merge (squash) June 25, 2026 10:23
@PerishCode
PerishCode merged commit e2f0f62 into main Jun 25, 2026
11 checks passed
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