Re:Microsoft DeviceScript – TypeScript for Tiny IoT Devices
by LudwigNagasena on Sunday June 11, 2023 @09:28AM
(#36281180)
The fact that it compiles is due to the TypeScript’s goal of being pragmatic rather than sound. If an instance isn’t derived from the class Dog, it doesn’t mean that it doesn’t conform to the type/interface Dog, yet TypeScript assumes it means that for the instance of check. It has more to do with TypeScript being a bolt-on over JavaScript that has to take into account existing codebases rather than with TypeScript being structurally typed.
[ Parent
| on HN ]
There are no comments on this comment yet.