Sosml: An Interpreter for Standard ML Written in TypeScript
github.com
github.com
> function printBasis( state: any, dynamicBasis: any, staticBasis: any, indent: number = 0 ): string { ...
When Microsoft removes the 'any' type this language (and hype) is dead. I've never came across a TS code base that is actually 100% type safe, and that apart from the fact that at run time there is no type checking at all, just Javascript.. That's why I still prefer the ease and security of dynamic type checking, because it is real safety. I know TS can still help in a large code base especially for the less experienced dev's out there, but it comes with a very high price that no TS proponent dears to admit or cannot assess. We live in a world of dreamers.
I’ll be the first person to say that I’m eager for a viable front end solution without any JavaScript (shoutout vugu, an awesome but young and experimental go lib), but TS isn’t going to die with the removal of any lol
It looks to me like you found one of the only functions that use 'any' in the entire codebase. Others are things involving bindings in an environment (where anything really can appear, though one might argue a union type restricting to only ML value types would be more appropriate) or generic functions like for equality testing, which I'm not sure exactly why they take 'any'.
You can turn strict mode on and remove the 'any' type.
It's for transitioning your JS codebase or if you don't need 100% soundness.
I like to type the core of the app and slowly type other less important things when I have time.
I was never confident that the typing I was adding was doing anything other than making the Flow interpreter(for lack of a better word) happy. I had no more confidence in my code that with out it.
So I removed it.
I believe that well maintained linting rules, and good code reviews (you are doing code reviews, aren't you) give you all the same protection, and less false sense(s) of security.
Like you imply (I think), it is still just JS. I beleive you are better served by understanding that, and coding carfully.