Skip to content

Disable lambda conversion in normal bindings #1928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 6, 2025

Conversation

exyi
Copy link
Member

@exyi exyi commented Apr 26, 2025

In command bindings, expressions get automatically wrapped in a lambda function. Surprisingly, the behavior was also present in value/resource, which lead to some surprising effects when value/resource was accidentally assigned to a command property (#1742).

We also unify that untyped ICommandBinding and IStaticCommandBinding produce delegate of type Command (i.e. async function with no argument and no return value). Previously Delegate was used for commands,
which had the effect of sending the return value to the client

@exyi exyi requested a review from Copilot April 26, 2025 13:37
Copilot

This comment was marked as resolved.

In command bindings, expressions get automatically wrapped in a lambda function. Surprisingly, the
behavior was also present in value/resource, which lead
to some surprising effects when value/resource was
accidentally assigned to a command property (#1742).

We also unify that untyped ICommandBinding and IStaticCommandBinding
produce delegate of type Command (i.e. async function with no argument and no return value).
Previously Delegate was used for commands,
which had the effect of sending the return value to the client
@exyi exyi force-pushed the disable-lambda-conversion branch from 3cd3081 to 3c2249d Compare June 1, 2025 09:25
@tomasherceg tomasherceg merged commit ba0372c into main Jun 6, 2025
14 of 16 checks passed
@tomasherceg tomasherceg deleted the disable-lambda-conversion branch June 6, 2025 12:42
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.

2 participants