GoogleChromeLabs / GoogleChromeLabs/comlink
Typescript RemoteObject does not allow assignment of non-promise value
Open
- Dominant language
- TypeScript
- Stars
- 12.8k
- Forks
- 435
- PR merge metrics
- No merged PRs in 30d
Description
The following code does not appear to compile using `comlink@4.3.0`
```typescript
type RA = Remote<{foo:string}>
declare const a: RA
a.foo = "bar"
```
On account of `a.foo` being a `Promise` and `"bar"` being a `string`. I understand there's currently [no way to allow separate setter and getter types](https://github.com/microsoft/TypeScript/issues/2521), but it seemed like the code worked differently before moving to `4.3.0`?
Contributor guide
Assessment
This issue has not been assessed yet.