Skip to content

Fix Proxy.set type assertion#685

Open
whalderman wants to merge 1 commit intoGoogleChromeLabs:mainfrom
whalderman:proxy-set-type-assertion
Open

Fix Proxy.set type assertion#685
whalderman wants to merge 1 commit intoGoogleChromeLabs:mainfrom
whalderman:proxy-set-type-assertion

Conversation

@whalderman
Copy link

TIL: This is a TypeScript quirk. There's actually no need to return a literal boolean value for Proxy set methods, they've always been coerced.
https://262.ecma-international.org/6.0/#sec-proxy-object-internal-methods-and-internal-slots-set-p-v-receiver

A Promise is returned, so this will of course always evaluate to true.

This is a TypeScript quirk. There's actually no need to return a literal boolean value for Proxy set methods, they've always been coerced.
https://262.ecma-international.org/6.0/#sec-proxy-object-internal-methods-and-internal-slots-set-p-v-receiver

Since a Promise is returned, it'll always be true.
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