-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: "Don't use Function
as a type."
#28
Comments
This is blocking my work on #25. |
This is done by creating and exporting a SequenceFormula class. In addition, adding this class seemed to spark an additional cascade of the Vue components needing to be (more) strongly typed. So the commit has numerous new type annotations (that should have no effect other than to aid TypeScript type checking) and a slight modification/simplification to the interface between sequences.ts and visualizers.ts on the one hand and ToolMain.vue on the other, since I could not figure out out to type the old interface (and a lot of extraneous information that was never being used was being passed anyway). Hopefully these changes will eliminate issue numberscope#28. Also, again as part of shoring up the typing, finally eliminates the spurious additional copy of the p5 code in src/assets, instead relying on npm install to get the proper copy of p5 in the right place. (The point being that the idiosyncratic copy was not typed, but npm brings in the type definitions automatically if you rely on it.) Resolves numberscope#14.
This is done by creating and exporting a SequenceFormula class. In addition, adding this class seemed to spark an additional cascade of the Vue components needing to be (more) strongly typed. So the commit has numerous new type annotations (that should have no effect other than to aid TypeScript type checking) and a slight modification/simplification to the interface between sequences.ts and visualizers.ts on the one hand and ToolMain.vue on the other, since I could not figure out out to type the old interface (and a lot of extraneous information that was never being used was being passed anyway). Hopefully these changes will eliminate issue numberscope#28. Also, again as part of shoring up the typing, finally eliminates the spurious additional copy of the p5 code in src/assets, instead relying on npm install to get the proper copy of p5 in the right place. (The point being that the idiosyncratic copy was not typed, but npm brings in the type definitions automatically if you rely on it.) Resolves numberscope#14.
If/when #31 is merged, please try rebasing on main and see if the issue resolves. If not, feel free to assign to me at that point, with a minimal example on top of main that displays the problem, as I've now gotten a fair amount of experience under my belt of adding typing to the Vue portions of frontscope (which is the only place that sequences.ts is used). |
@liam-mulhall please advise if this issue remains; if not, please close. |
I've yet to see this one again, so I'll close. |
When I enter
npm run serve
, I occasionally see the following error.I don't think I was seeing this before ESLint was updated. I can't consistently reproduce this error. What am I missing here?
The text was updated successfully, but these errors were encountered: