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

Can sitespeed support TypeScript files for better maintainability of measurement scripts? #3799

Open
linqunhe opened this issue Mar 27, 2023 · 3 comments

Comments

@linqunhe
Copy link

Feature/improvement

Can sitespeed support TypeScript files for maintaining measurement scripts? Currently, without TypeScript, as the number of test scenarios increases, the maintainability of the project becomes very poor. There is no intelligent hinting, no type constraints, and it brings high costs for collaborative work among multiple people.

Thanks...

@soulgalore
Copy link
Member

soulgalore commented Mar 27, 2023

Hi @linqunhe yes that is a good idea. I actually started a couple of years ago adding a types to scripting so that could be used from IDE's. I felt I needed help from someone that worked with TypeScript. I can help/guide and then maintain but I need help with the first setup.

@soulgalore
Copy link
Member

I restructured some code in Browsertime to make it easier to add typescript definition files for context/commands in sitespeedio/browsertime#2047 - when definition files exists for those two objects, it is easy to get code completion in Visual Studio Code.

@soulgalore
Copy link
Member

@linqunhe please try out the latest version and https://www.sitespeed.io/documentation/sitespeed.io/scripting/tutorial-08-Setting-Up-IntelliSense.html for setting it up. Code completion work for scripting now with just enough Typescript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants