I have an interface of this shape: And I need to access the value field of the SingleMatch interface on a variable. To do this I use the following code: In the buildMonoExpressionSingleMatch() function I can access my variable without error if I check before that the function is of the right type for index 0: But if I do
Tag: typechecking
Type checker for JavaScript?
Does anyone know if there’s a good tool for analyzing JavaScript code and detecting type errors? I know that JavaScript itself is weakly and dynamically typed, but it would be really nice if I could have a program that would verify that all my field accesses are sensible and that I don’t try treating a number like a string, for