Revocable Proxies are incorrectly Types
- Dominant language
- Rust
- Stars
- 22.3k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
Revocable proxies do not return proxy in the object:
```
type Proxy$revocable = T & {
revoke(): void;
};
```
Believe it should be
```
type Proxy$revocable = {
proxy: Proxy;
revoke(): void;
};
```
### Example
```javascript
const { proxy, revoke } = Proxy.revocable({}, {
get: proxyGet,
set: proxySet,
});
```
---
In addition, it seems like it should maybe return an `Object` or similar as its type. It current returns the same type that is received but since Proxies allow you to handle things as desired, they will generally behave like objects (depending on what is defined - I can see how these would be very challenging to provide types for appropriately.
Contributor guide
Assessment
This issue has not been assessed yet.