RobotWebTools / rclnodejs

Node.js version of ROS 2.0 client
https://docs.ros.org/en/humble/Concepts/Basic/About-Client-Libraries.html?highlight=rclnodejs#community-maintained
Apache License 2.0
311 stars 70 forks source link

Accomodate TS 4.7's new union order in dtslint tests #847

Closed wayneparrott closed 2 years ago

wayneparrott commented 2 years ago

Similar to our test failures, others have struggled with dtslint failing (false negative) due to inconsistent union type ordering. It appears that $ExpectType can be extended to list different orderings for union types (permutations). In our case we have encountered issues with this rule:

// $ExpectType Duration | Time

Extending this rule with an alternative ordering:

// $ExpectType Duration | Time || Time | Duration