router icon indicating copy to clipboard operation
router copied to clipboard

Convert tests to TypeScript

Open platosha opened this issue 6 years ago • 2 comments

Having test suits in TypeScript would help to verify and ensure that typescript definitions cover all the use cases from test suites.

This should also help to reveal missing definitions, if any.

Currently, having a lot of test suites in .html format, going directly to TypeScript is not possible. We have to convert .html test suites to .js first.

platosha avatar Aug 20 '19 13:08 platosha

What do you think about convert the Router itself to Typescript?

abdonrd avatar Aug 20 '19 13:08 abdonrd

Converting the router code itself to TS is on the roadmap, but is not a priority at the moment. It's going to be a considerable effort to rewrite the full code base.

The good thing is that the TypeScript compiler does accept untyped JS code so the change can be gradual.

The bad thing is that the API docs and demos on GitHub pages currently rely on polymer analyzer. And that would likely break when switching to TypeScript because it JSDoc-annotated JS code as input.

Generating the API docs and demos site from TypeScript is a separate task: https://github.com/vaadin/vaadin-router/issues/363. Once there is a working solution to it then conversion to TypeScript can proceed.

vlukashov avatar Aug 20 '19 13:08 vlukashov