Closed kalwalt closed 2 years ago
I completely converted the code to Typescript. I think it will still require some improvements, above all some arguments definitions and need to create some tests, I have not decided with which system/framework, this will be the work for the future.
I added a simple transpiler for the typescript definitions thanks to the tsc compiler but this approach has some disadvantages, look for example at definitions of the matrix_t constructor: https://github.com/kalwalt/jsfeatNext/blob/63ca6ce8aab4691d063db818b35d304edcc2e751/types/matrix_t/matrix_t.d.ts#L2 For example
c
andr
( width and height of thematrix_t
) should be asnumber
type but are definded asany
type. This isn't safe because i could pass also a string as width. I think the only way to keep safe the arguments is to rewrite the project in Typescript, I don't know if there are other options.