TypeScript: Property 'invalidateStore' does not exist on type 'RecordSourceProxy'
Open
- Dominant language
- Rust
- Stars
- 19k
- Forks
- 1.9k
- PR merge metrics
- No merged PRs in 30d
Description
When using `commitLocalUpdate` to invalidate the store the TS compiler throws and error:
```
Property 'invalidateStore' does not exist on type 'RecordSourceProxy'
```
You can reproduce by writing the following in a TypeScript project:
```
commitLocalUpdate(relayEnvironment, (store : RecordSourceProxy) => {
store.invalidateStore(); // Property 'invalidateStore' does not exist on type 'RecordSourceProxy'
});
```
I believe that `RecordSourceProxy` needs to be updated in `updater: StoreUpdater` to `RecordSourceSelectorProxy`.
If someone points me in the right direction on where to make this change, I can make a PR.
Contributor guide
Assessment
This issue has not been assessed yet.