While trying to push data from the input to output, through push event, the parameter passed is showing error
Asked
Active
Viewed 81 times
0
-
declare the post as:`storePost:any[]=[]`. BTW, please, don't post code as images. Copy the code, select it and use CTRL+K to show formatted in the question. If you use an image you force to click the link, if the image is loosed the question is unintelligible, it's not accessible,...) – Eliseo Mar 28 '23 at 06:19
-
Please post code, not pictures of code ... – derpirscher Mar 28 '23 at 06:19
-
Does this answer your question? [What is "not assignable to parameter of type never" error in TypeScript?](https://stackoverflow.com/questions/52423842/what-is-not-assignable-to-parameter-of-type-never-error-in-typescript) – Andrew Allen Apr 02 '23 at 14:27
2 Answers
1
It is not preferrable to use any. Instead of that make an interface and import that interface and use it. For example
public storedPosts: Post[] = [];
If you have any doubt creating the interface do let me know.

Nirav Ghodadra
- 86
- 3