Skip to content
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

refactor: add typing's for typescript #556

Merged
merged 1 commit into from
Jun 25, 2022

Conversation

philstenning
Copy link
Contributor

The typescript compiler in vs-code was giving lots of red squiggly lines so have added the needed types and type definition files to help when editing in the future.

added app/javascript/src/globals.d.ts so now you get intelligence when typing

There were also a few methods called that do not exist, I did check the three docs and also initially wrapped them in a try/catch block and they threw, so removed them also.

bbox.dispose()
centre.dispose()
bsphere.dispose()

In app/javascript/src/model_edit.ts

removed the maxitem= null as this is the default, and ts requires a number if a value is supplied

In package.json added a script option to run the ts-standard as used in husky so you can now do a: yarn run lint:ts

Would it be useful to run a tslint and prettier and or add a config to the project to keep things tidy and consistent? I'm not a ruby guy so not shure how it does things just yet.

Some of the typings were missing and lots of red lines appeared in vs-code, their should now be no errors  shown by the ts compiler.
@Floppy
Copy link
Collaborator

Floppy commented Jun 25, 2022

Thanks! I'm a huge fan of linters, so yeah, it would be great to run ts-standard over it all, if I've not already set that up (though I thought I had).

@Floppy Floppy merged commit dd2d192 into manyfold3d:main Jun 25, 2022
@Floppy Floppy added the improvement Refactors and behind-the-scenes improvements label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Refactors and behind-the-scenes improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants