Issue
Parameter 'post' implicitly has an 'any' type. Argument of type 'any' is not assignable to parameter of type 'never'
storedPosts=[];
OnPostAdded(post){
this.storedPosts.push(post);
}
Solution
Try adding types..
storedPosts: any[] = [];
OnPostAdded(post: any){
this.storedPosts.push(post);
}
As you are using typescript; you should consider providing types for your data instead of any. You can create an interface to describe the data; this will also make the code readable for other developers
Answered By - Petros
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.