4 ms·
If robot0 name is AAA and uid Is BBB, and robot 1 name is BBB and uid AAA, and you call the function checkRobot('AAA'), what sort of assert exactly could differ
by tazard 4y ago
If robot0 name is AAA and uid Is BBB, and robot 1 name is BBB and uid AAA, and you call the function checkRobot('AAA'), what sort of assert exactly could differentiate between a name and a uid?
- roflyear 4y agoI don't think it is possible in Typescript, but in other languages you can do assertations about custom types. Like assert istype(whatever, MyCustomType) Which would throw an exception if whatever is not a "MyCustomType" at runtime.