issue with typescript definition file
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 312
- PR merge metrics
- No merged PRs in 30d
Description
I am using the alt typescript definition file and running into issues with the `actions` field of the `AltJS.ActionsClass`.
Here is what my code looks like:
```
class AbstractActions implements AltJS.ActionsClass {
constructor(alt:AltJS.Alt){}
dispatch: ( ...payload:Array) => void;
actions:AltJS.Actions;
}
interface IRedditActions {
fetchPosts();
}
export class RedditActions extends AbstractActions implements IRedditActions {
fetchPosts() {
this.dispatch();
RedditActions.fetchData().then((data)=> {
this.actions.updatePosts(data);
});
}
updatePosts(posts) {
this.dispatch(posts);
}
}
```
However, on this line:
```
this.actions.updatePosts(data);
```
I get this error:
```
Property 'updatePosts' does not exist on type `{ [action:string]: Action; }`
```
Is there anything I am doing wrong?
Contributor guide
Assessment
This issue has not been assessed yet.