Skip to content

typescript: accept Deno wrapper syntax - #49

Merged
PerishCode merged 1 commit into
mainfrom
typescript/deno-wrapper-syntax
Jun 25, 2026
Merged

typescript: accept Deno wrapper syntax#49
PerishCode merged 1 commit into
mainfrom
typescript/deno-wrapper-syntax

Conversation

@PerishCode

Copy link
Copy Markdown
Owner

Why

Flavor reported TypeScript parse errors for Deno wrapper syntax that Deno accepts in issue #48: inline object return types, intersection return types with inline objects, and for await loops.

Closes #48.

What

  • Treat { ... } as an object or mapped type operand when parsing return types that also use { as the function body boundary.
  • Accept optional await after for before the parenthesized loop header.
  • Add parser regression coverage for the reported Deno wrapper syntax shapes.

Tests

  • cargo fmt --all --check
  • cargo clippy --locked --workspace --all-targets -- -D warnings
  • cargo test --locked --workspace
  • cargo test --locked -p flavor-plugin-typescript
  • cargo run --locked -p flavor-cli -- check --root . --config flavor.toml

@PerishCode
PerishCode enabled auto-merge (squash) June 25, 2026 07:45
@PerishCode
PerishCode merged commit fbd8960 into main Jun 25, 2026
1 check passed
@PerishCode
PerishCode deleted the typescript/deno-wrapper-syntax branch June 25, 2026 07:47
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 parser rejects valid Deno wrapper syntax

1 participant